[SCM] Sun multi-schema XML validator branch, master, updated. upstream/2009.1-23-g514691a

Giovanni Mascellani gio at alioth.debian.org
Tue Aug 16 13:02:58 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Sun multi-schema XML validator".

The branch, master has been updated
       via  514691ab786c25a5d938d67265e73f787ff99a65 (commit)
       via  b6b655e60a92f77d69a69fcabd3a34ea485f3393 (commit)
       via  830de2e28035e9fc6040fa8793b15d1349380121 (commit)
       via  1b0722a0bc9975b9fc76674dd11be823ddd2f220 (commit)
       via  b1416a149bf10e345f6d6f6753e48f4043a07839 (commit)
       via  903c9db27e1a93a55d35a3449aed77912e57b255 (commit)
       via  dd116e28f070ab421fa968234cc3f62ed823c168 (commit)
       via  36e8b6105b00c162c5dbb61f01b3d0d492637d03 (commit)
       via  0b1a2663a240922a41010e605c35778d6bdc81a5 (commit)
       via  764fd033b01c9f889d1e1e98bfda6cadb7c1a91d (commit)
       via  4895c22f7f21a922561f0aad8a72cdcc2d121538 (commit)
       via  acdc2a8e9b3ae143319e9cd8fa0079a0cd2772b7 (commit)
       via  8e92d6bbc75e70b78944cebacefc359c9139d1a7 (commit)
       via  16ef8ed5b0d37832e75c97fe45a9e78cb24e4070 (commit)
       via  b1e46ba2d7548990e2a51a4b0ecf16c99268ce5e (commit)
      from  b4a1bf0f247beca1bcfeacc8c8013508b0bab855 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 514691ab786c25a5d938d67265e73f787ff99a65
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 14:34:13 2011 +0200

    Copyright file fixed.

commit b6b655e60a92f77d69a69fcabd3a34ea485f3393
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 14:13:29 2011 +0200

    Adding patch to exclude module generator.

commit 830de2e28035e9fc6040fa8793b15d1349380121
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 14:09:07 2011 +0200

    Updating version number.

commit 1b0722a0bc9975b9fc76674dd11be823ddd2f220
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 13:39:48 2011 +0200

    Removing reference to the deleted generator/ directory.

commit b1416a149bf10e345f6d6f6753e48f4043a07839
Merge: dd116e2 903c9db
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 13:39:14 2011 +0200

    Merge commit 'upstream/2009.1+dfsg1'

commit dd116e28f070ab421fa968234cc3f62ed823c168
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 13:35:11 2011 +0200

    README.source fixed.

commit 36e8b6105b00c162c5dbb61f01b3d0d492637d03
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Tue Aug 16 13:32:06 2011 +0200

    Missing file in debian/copyright.

commit 0b1a2663a240922a41010e605c35778d6bdc81a5
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 15:07:42 2011 +0200

    README.source written.

commit 764fd033b01c9f889d1e1e98bfda6cadb7c1a91d
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 14:44:31 2011 +0200

    Compile also relames.

commit 4895c22f7f21a922561f0aad8a72cdcc2d121538
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 14:10:05 2011 +0200

    Missing ant dependency.

commit acdc2a8e9b3ae143319e9cd8fa0079a0cd2772b7
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 14:00:34 2011 +0200

    Releasing.

commit 8e92d6bbc75e70b78944cebacefc359c9139d1a7
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 14:00:21 2011 +0200

    Build dependencies added.

commit 16ef8ed5b0d37832e75c97fe45a9e78cb24e4070
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 13:52:31 2011 +0200

    Write copyright file.

commit b1e46ba2d7548990e2a51a4b0ecf16c99268ce5e
Author: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
Date:   Mon Aug 15 10:59:51 2011 +0200

    Fix a few lintian issues.

-----------------------------------------------------------------------

Summary of changes:
 debian/README.Debian                               |    6 -
 debian/README.source                               |   15 +-
 debian/changelog                                   |    4 +-
 debian/control                                     |    8 +-
 debian/copyright                                   |  259 +++++++++-
 debian/libmsv-java.poms                            |    2 +-
 .../0002-Do-not-compile-module-generator.patch     |   23 +
 debian/patches/series                              |    1 +
 generator/.cvsignore                               |    1 -
 generator/BCL for generator.txt                    |  230 ---------
 generator/MANIFEST.MF                              |    5 -
 generator/build.xml                                |  188 -------
 generator/doc/Apache-LICENSE-1.1.txt               |   58 ---
 generator/doc/HowToUse.html                        |  339 -------------
 generator/doc/README.txt                           |   58 ---
 generator/doc/copyright.txt                        |   44 --
 generator/doc/license.txt                          |  210 --------
 generator/generator.iml                            |   43 --
 generator/pom.xml                                  |   99 ----
 generator/setenv.bat                               |    8 -
 .../com/sun/msv/generator/ContextProviderImpl.java |   98 ----
 .../src/com/sun/msv/generator/DOM2toSAX2.java      |  111 -----
 .../src/com/sun/msv/generator/DOMDecorator.java    |  134 -----
 .../com/sun/msv/generator/DataTypeGenerator.java   |   27 -
 .../sun/msv/generator/DataTypeGeneratorImpl.java   |  328 -------------
 generator/src/com/sun/msv/generator/Driver.java    |  463 ------------------
 .../sun/msv/generator/ElementDeclCollector.java    |   62 ---
 .../src/com/sun/msv/generator/ExampleReader.java   |   38 --
 generator/src/com/sun/msv/generator/Generator.java |  512 --------------------
 .../src/com/sun/msv/generator/GeneratorOption.java |  147 ------
 .../src/com/sun/msv/generator/NameGenerator.java   |  124 -----
 .../src/com/sun/msv/generator/NoneTypeRemover.java |   66 ---
 generator/src/com/sun/msv/generator/Rand.java      |   41 --
 .../sun/msv/generator/SchemaLocationRemover.java   |   64 ---
 generator/test/Generator.java                      |    6 -
 generator/test/batch/generator/GeneratorTest.java  |   38 --
 .../test/batch/generator/GeneratorTester.java      |   31 --
 .../test/batch/generator/TestBuilderImpl.java      |  125 -----
 .../msv/reader/xmlschema/doc-files/redefine.vsd    |  Bin 45056 -> 0 bytes
 .../msv/writer/relaxng/doc-files/RELAXNGWriter.vsd |  Bin 72192 -> 0 bytes
 40 files changed, 286 insertions(+), 3730 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 5debee4..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,6 +0,0 @@
-msv for Debian
---------------
-
-<possible notes regarding this package - if none, delete this file>
-
- -- Giovanni Mascellani <gio at debian.org>  Thu, 10 Feb 2011 16:28:28 +0100
diff --git a/debian/README.source b/debian/README.source
index 28a0235..8995f58 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,9 +1,16 @@
-msv for Debian
---------------
 
-<this file describes information about the source package, see Debian policy
-manual section 4.14. You WILL either need to modify or delete this file>
+msv package for Debian
+----------------------
 
+The original tarball for the package msv was obtained exporting
+a copy of the tag msv-2009.1 from the upstream SVN repository
+(https://svn.java.net/svn/msv~svn) and then performing the
+following actions to make it DFSG-compliant:
 
+ * remove all the precompiled .zip and .jar files;
+ * remove the whole generator/ subdirectory, that is
+   non-free;
+ * remove two documentation .vsd files, that are non-free.
 
+Giovanni Mascellani <gio at debian.org>
 
diff --git a/debian/changelog b/debian/changelog
index 15c071a..04b761a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
-msv (2009.1-1) unstable; urgency=low
+msv (2009.1+dfsg1-1) unstable; urgency=low
 
   * Initial release (closes: #612440).
 
- -- Giovanni Mascellani <gio at debian.org>  Wed, 16 Feb 2011 00:03:23 +0100
+ -- Giovanni Mascellani <gio at debian.org>  Mon, 15 Aug 2011 13:58:12 +0200
diff --git a/debian/control b/debian/control
index f46a782..0114aa7 100644
--- a/debian/control
+++ b/debian/control
@@ -1,10 +1,12 @@
 Source: msv
-Section: unknown
+Section: java
 Priority: extra
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Giovanni Mascellani <gio at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), maven-debian-helper, default-jdk
-Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7.0.50~), maven-debian-helper, default-jdk, cdbs,
+ libisorelax-java, libjdom1-java, librelaxng-datatype-java, libxalan2-java,
+ libxerces2-java, libxml-commons-resolver1.1-java, ant
+Standards-Version: 3.9.2
 Homepage: http://java.net/projects/msv
 Vcs-Git: git://git.debian.org/pkg-java/msv.git
 Vcs-Browser: http://git.debian.org/?p=pkg-java/msv.git;a=summary
diff --git a/debian/copyright b/debian/copyright
index 9f59c3c..61d0f84 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,24 +1,254 @@
 Format: http://dep.debian.net/deps/dep5
 Upstream-Name: msv
-Source: <url://example.com>
+Source: http://java.net/projects/msv
 
 Files: *
-Copyright: <years> <put author's name and email here>
-           <years> <likewise for another author>
-License: <special license>
- <Put the license of the package here indented by 1 space>
- <This follows the format of Description: lines in control file>
+Copyright: © 1998-2009, Sun Microsystems, Inc.
+License: BSD
+ All Rights Reserved.
  .
- <Including paragraphs>
+ Redistribution and  use in  source and binary  forms, with  or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+ - Redistributions  of  source code  must  retain  the above  copyright
+   notice, this list of conditions and the following disclaimer.
+ .
+ - Redistribution  in binary  form must  reproduct the  above copyright
+   notice, this list of conditions  and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+ .
+ Neither  the  name   of  Sun  Microsystems,  Inc.  or   the  names  of
+ contributors may be  used to endorse or promote  products derived from
+ this software without specific prior written permission.
+ .
+ This software is provided "AS IS," without a warranty of any kind. ALL
+ EXPRESS  OR   IMPLIED  CONDITIONS,  REPRESENTATIONS   AND  WARRANTIES,
+ INCLUDING  ANY  IMPLIED WARRANTY  OF  MERCHANTABILITY,  FITNESS FOR  A
+ PARTICULAR PURPOSE  OR NON-INFRINGEMENT, ARE HEREBY  EXCLUDED. SUN AND
+ ITS  LICENSORS SHALL  NOT BE  LIABLE  FOR ANY  DAMAGES OR  LIABILITIES
+ SUFFERED BY LICENSEE  AS A RESULT OF OR  RELATING TO USE, MODIFICATION
+ OR DISTRIBUTION OF  THE SOFTWARE OR ITS DERIVATIVES.  IN NO EVENT WILL
+ SUN OR ITS  LICENSORS BE LIABLE FOR ANY LOST  REVENUE, PROFIT OR DATA,
+ OR  FOR  DIRECT,   INDIRECT,  SPECIAL,  CONSEQUENTIAL,  INCIDENTAL  OR
+ PUNITIVE  DAMAGES, HOWEVER  CAUSED  AND REGARDLESS  OF  THE THEORY  OF
+ LIABILITY, ARISING  OUT OF  THE USE OF  OR INABILITY TO  USE SOFTWARE,
+ EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+X-Comment: The licensing terms are not consistently reported in every
+ subproject. However, since the upstream site reports the project as being
+ under the BSD license, I assume that these terms apply to any file and
+ directory not having other explicit licensing statements.
 
-# If you want to use GPL v2 or later for the /debian/* files use 
-# the following clauses, or change it to suit. Delete these two lines
-Files: debian/*
-Copyright: 2011 Giovanni Mascellani <gio at debian.org>
+Files: testharness/*
+Copyright: © 2001, Sun Microsystems, Inc.
+License: BSD__
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer. 
+ .
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution. 
+ .
+ * Neither the name of Sun Microsystems, Inc. nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission. 
+ .
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: msv/src/com/sun/msv/util/Uri.java
+Copyright: © 2001, 2002, Thai Open Source Software Center Ltd
+License: BSD_
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+     Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+ .
+     Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+ .
+     Neither the name of the Thai Open Source Software Center Ltd nor
+     the names of its contributors may be used to endorse or promote
+     products derived from this software without specific prior written
+     permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: msv/src/com/sun/msv/reader/xmlschema/DOMLSInputImpl.java
+Copyright: Contributors of the Apache Software Foundation
+License: Apache-2.0
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ .
+ On Debian systems, the complete text of the Apache License version 2.0
+ can be found in `/usr/share/common-licenses/Apache-2.0'.
+
+Files: xsdlib/src-apache/com/sun/msv/datatype/regexp/RegexParser.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/ParseException.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/Token.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/RegularExpression.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/RangeToken.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/Op.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/REUtil.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/Match.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/ParserForXMLSchema.java,
+       xsdlib/src-apache/com/sun/msv/datatype/regexp/BMPattern.java
+Copyright: © 1999-2002, The Apache Software Foundation
+License: Apache-1.1
+ This product includes software developed by the
+ Apache Software Foundation (http://www.apache.org/).
+ .
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer. 
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ 3. The end-user documentation included with the redistribution,
+    if any, must include the following acknowledgment:  
+       "This product includes software developed by the
+        Apache Software Foundation (http://www.apache.org/)."
+    Alternately, this acknowledgment may appear in the software itself,
+    if and wherever such third-party acknowledgments normally appear.
+ .
+ 4. The names "Xerces" and "Apache Software Foundation" must
+    not be used to endorse or promote products derived from this
+    software without prior written permission. For written 
+    permission, please contact apache at apache.org.
+ .
+ 5. Products derived from this software may not be called "Apache",
+    nor may "Apache" appear in their name, without prior written
+    permission of the Apache Software Foundation.
+ .
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+ .
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the Apache Software Foundation and was
+ originally based on software copyright (c) 1999, International
+ Business Machines, Inc., http://www.apache.org.  For more
+ information on the Apache Software Foundation, please see
+ <http://www.apache.org/>.
+
+Files: msv/contrib/sunmsv.el
+Copyright: © Stuart Popejoy <spopejoy at pinksheets.com>
 License: GPL-2+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+ .
+ 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 the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+Files: parent/pom.xml
+Copyright: © 2009, Benson I. Margulies
+License: BSD___
+ All rights reserved.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+     * Neither the name of the <organization> nor the
+       names of its contributors may be used to endorse or promote products
+       derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY Benson I. Margulies ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: © 2011, Giovanni Mascellani <gio at debian.org>
+License: GPL-3+
  This package is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  .
  This package is distributed in the hope that it will be useful,
@@ -30,7 +260,4 @@ License: GPL-2+
  along with this program. If not, see <http://www.gnu.org/licenses/>
  .
  On Debian systems, the complete text of the GNU General
- Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/libmsv-java.poms b/debian/libmsv-java.poms
index c5e6b20..51e16dd 100644
--- a/debian/libmsv-java.poms
+++ b/debian/libmsv-java.poms
@@ -28,5 +28,5 @@ parent/pom.xml
 xsdlib/pom.xml
 testharness/pom.xml
 msv/pom.xml
-generator/pom.xml
 rngconverter/pom.xml
+relames/pom.xml
diff --git a/debian/patches/0002-Do-not-compile-module-generator.patch b/debian/patches/0002-Do-not-compile-module-generator.patch
new file mode 100644
index 0000000..bc7b787
--- /dev/null
+++ b/debian/patches/0002-Do-not-compile-module-generator.patch
@@ -0,0 +1,23 @@
+From: Giovanni Mascellani <mascellani at poisson.phc.unipi.it>
+Date: Tue, 16 Aug 2011 14:12:30 +0200
+Subject: Do not compile module generator.
+
+Module generator is distributed with a non-free license, so it must
+be removed from the Debian package.
+---
+ pom.xml |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/pom.xml b/pom.xml
+index e1d0a50..dd1af49 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -60,7 +60,6 @@ EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+         <module>xsdlib</module>
+         <module>testharness</module>
+         <module>msv</module>
+-        <module>generator</module>
+         <module>rngconverter</module>
+     </modules>
+ 
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 46d855a..772fc7c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Add-classpath-to-JAR.patch
+0002-Do-not-compile-module-generator.patch
diff --git a/generator/.cvsignore b/generator/.cvsignore
deleted file mode 100644
index 1521c8b..0000000
--- a/generator/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-dist
diff --git a/generator/BCL for generator.txt b/generator/BCL for generator.txt
deleted file mode 100644
index 78a974c..0000000
--- a/generator/BCL for generator.txt	
+++ /dev/null
@@ -1,230 +0,0 @@
-GENERAL INFORMATION 
-
- Your Name: ____Kohsuke Kawaguchi____ 
-
-  Your Title:  ________________________ 
-
-  Your Business Unit:  ______________________________ 
-  
-
-SOFTWARE INFORMATION 
-
- Full Name of Software: __________Sun XML Generator______ 
-
- Software Code Name: ________generator_____________ 
-
- Briefly Describe the Software (functionality, etc.):
- 
- Sun XML Generator is a Java tool to generate various XML instances from
- several kinds of schemata. It supports DTD, RELAX Namespace, RELAX Core,
- TREX, and a subset of W3C XML Schema Part 1
-
-Note: If this a pre-FCS release, alpha or beta release then an Evaluation Agreement 
-is needed NOT a BCL and you should return to http://javaweb.eng/help/swat_legal/
-for further information and instructions on how to submit an Evaluation License request.
- 
-FCS date of the Software: _______________________
-Date BCL is needed: _____________________________
-Is this a "dot" Software release or "bug fix" release of the Software?  [ X ] Yes [   ] No 
-  
-
-     If you answered "yes" to the "dot"/"bug fix" question above, 
-     answer Question A., B. and C. below and follow the instructions provided thereafter. 
-
-     If you answered "no" to the "dot"/"bug fix" question above, move to the next section 
-     entitled "Type of Technology - Check One " and continue completing this BCL License 
-     Request Form.
-
-     A. Does this "dot" Software release or "bug fix" release of the Software 
-         change the existing BCL licensing mode in ANY way?   [   ]Yes [ X ] No 
-
-     B. Has ANY Third Party Code, including freeware downloaded from the web, 
-         such as GNU, BSD, etc. been added to this "dot" Software release 
-         or "bug fix" release of the Software?   [   ] Yes [ X ] No 
-
-     C. Have ANY features or functionality, such as new Java components or a compiler, 
-         been added to this "dot" Software release or "bug fix" release of the Software? 
-         [   ] Yes [ X ] No 
-
-     If you answered "yes" to questions A., B. OR C. then you will need to complete 
-     the remainder of this BCL Request Form and find a copy of the existing BCL 
-     for this Software  for forwarding with your completed Request. 
-
-     If you answered "no" to ALL questions (A., B. AND C.) then forward a copy of 
-     the existing BCL for this Software to the Contract Services Group at 
-     stdcontracts at eng and submit this form now without answering any more questions.
-
-
-TYPE OF TECHNOLOGY - CHECK ONE of the descriptive boxes or 
-                                                           complete the "Other" section below: 
-
-Is your Software a(n): 
-
-[   ] Application, Java Applet or Java Bean 
-
-[   ] Java Runtime Environment 
-
-[   ] Java 2 Software Development Kit 
-
-[   ] Optional Package 
-
-[   ] Solaris Operating Environment 
-
-[   ] Specification Interface Class - If the Software is an Interface Class, is it in : 
-         [   ] Binary Only    [   ] Source Only     [   ] Both Binary and Source 
-
-     Important Note:  Interface Classes can ONLY be distributed in conjunction with 
-     a Specification License. A separate Specification License will also need to be 
-     prepared for distribution to occur. After completing and submitting this form, 
-     you will need to return to http://javaweb.eng/help/swat_legal/ for further 
-     information and instructions on how to submit a Specification License Request.
-
-[    ] Tool - If a tool, is this a Java tool or non-Java tool? 
-           [    ] This is a Java tool.  [   ] This is not a Java tool. 
-
-     If the Software is a Java tool, does it contain a Java compiler? 
-      [  ] Yes [   ] No [   ] Not applicable 
-
-     If the Software is NOT a Java tool, does it contain any Java components? 
-     [   ] Yes [   ] No 
-
-     If the Software contains Java components, name the components: 
-     _______________________________
-
-[   ] Other 
-
-     If your Software fills into the Other category, describe the Software 
-      with particularity: _______________________
-
-PLATFORM AND JAVA INFORMATION: 
-
-Is your technology a Platform? [   ] yes [   ] No 
-
-What platform does your technology support? [   ] Solaris [   ] Java [   ] Other 
-
-If this a core Java platform, is it? 
-        [   ] Enterprise Edition [   ] Standard Edition [   ] Micro Edition 
-
-Does your Software contain a Java Virtual Machine? [   ] Yes [   ] No 
-
-Does the Software contain multiple components meeting more than one 
-        of the characteristics described in the Type of Technology section above? 
-         [   ] Yes [   ] No   If yes, please describe: ___________________________ 
-
-USE 
-
-[   ] License for "internal" use and development (no rights to distribute any 
-        portion of Sun Software) 
-
-[   ] License to reproduce and distribute Sun Software either: 
-
-        [   ] Bundled with Licensee's Programs. 
-
-        OR 
-
-        [   ] Stand Alone (distribution without value add or bundling by the Licensee). 
-  
-
-     Note additional approvals will be required for stand alone distribution. 
-     You will be contacted about the additional approvals required 
-     after your BCL Request Form has been submitted.
-
-
-DISTRIBUTION 
-
-Will the bundled or stand alone Software being distributed by Licensee 
-be comprised of: 
-  
-
-     [   ] The entire Software program 
-
-     OR 
-
-     [   ] A discrete subset of the Software program 
-
-          If a discrete subset of the Software program is being redistributed, 
-          describe with particularity the subset of code being released: 
-          ___________________________
-
-
-     OR 
-
-     [   ] Both of the above
-
-
-How will the Software be delivered to Licensee? 
-  
-
-     [   ] Source only.     If source, is this source example code only? [ X ] Yes [   ] No 
-       
-
-          If you answered "yes" to the above question, continue completing this form. 
-
-          If you answered "no" to the above question, then you will need to contact 
-          the appropriate attorney representing your sales group to request 
-          a different type of license and you should not submit this BCL Request Form.
-
-     [   ] Binary Only 
-
-     [   ] Both Source Example Code and Binary
-
-
-Indicate the Method of Distribution for the Software by Sun 
-
-     [   ] CD (a BCL with a part number will be needed) 
-     [   ] Web Download 
-     [   ] Both CD )a BCL with a part number will be needed) and Web Download
-
-
-THIRD PARTY CODE 
-
-**THIS SECTION IS EXTREMELY IMPORTANT - DO NOT GUESS AT THE ANSWERS** 
-
-Is there ANY Third Party Software or technology embedded or included in your Software? 
-[e.g. Is there code or any portion of code in this software that is licensed or 
-that has been received from another company ? Note, this includes any freeware 
-(such as GNU, BSD, etc.) that may have been downloaded from the web.]     [   ] Yes [   ] No 
-
-       
-     If "yes", please provide the following details: 
-
-     The name of the company licensing the code: ________________________________
-
-     The name and version number of the code:_____________________________
-
-     A description of the Third Party Code contained in the Software and 
-     an explanation of how it is used in Sun's Software:
-     ______________________________________________
-
-     The name of the Program Manager who can provide the Contract Services Group 
-     with information about and copies of all third party contracts relating to 
-     this Third Party Code.: __________________________________
-
-
-ENCRYPTION 
-
-Does your Software contain any security or encryption code, such as BSafe or SSL? 
- [   ] Yes [   ] No 
-
-     If "yes", please provide the following details: 
-     The name of the company owning the code: ___________________ 
-
-     A description of the Encryption Code contained in the Software: ____________ 
-
-     The name of the Program Manager who can provide the Contract Services Group 
-     with information about and copies of any contracts and export approvals 
-     relating to the Encryption Code: ____________________________
-
-
-IN CONCLUSION 
-
-Is there additional information that Legal needs to know that will affect licensing 
-of this Software? [   ] Yes [   ] No 
-
-if so, please provide particulars: ___________________________ 
-
-Send completed Request Form to your Director for approval and forwarding 
-to stdcontracts at eng. 
-
-       
-     THANK YOU!
diff --git a/generator/MANIFEST.MF b/generator/MANIFEST.MF
deleted file mode 100644
index a5254fb..0000000
--- a/generator/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: com.sun.msv.generator.Driver
-Created-By: 1.2.2 (Sun Microsystems Inc.)
-Class-Path: msv.jar xsdlib.jar relaxngDatatype.jar isorelax.jar xercesImpl.jar xmlParserAPIs.jar
-
diff --git a/generator/build.xml b/generator/build.xml
deleted file mode 100644
index 4758572..0000000
--- a/generator/build.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0"?>
-<!--
-	Ant build script for XSDLib.
-	
-	$Id: build.xml 1723 2006-08-14 17:24:38Z kohsuke $
-	
-	
-	
-	Tasks to help development
-	=========================
-	javacc
-		run JavaCC
-	binary
-		compile everything to the bin directory.
-	javadoc
-		run javadoc on the working copy. Useful to check the documentation
-		without actually creating a distribution package.
-	test
-		test core msv codes. parser, verifier and several related codes.
-	release
-		create a distribution package
-	
--->
-<project name="xsdlib" basedir="." default="binary">
-	
-	<!-- import the global configuration file -->
-	<property file="../shared/ant.config"/>
-	
-	<!-- compile Java source files -->
-	<target name="binary">
-		<mkdir dir="./bin"/>
-		<javac
-			srcdir="./src:./test"
-			destdir="./bin"
-			debug="on"
-			optimize="off">
-			
-			<classpath path="../msv/bin" />
-			<classpath path="../xsdlib/bin" />
-			<classpath path="../testharness/bin" />
-			<classpath path="${xerces.jar}:${relaxngDatatype.jar}:${isorelax.jar}:${junit.jar}"/>
-		</javac>
-	</target>
-	
-	<target name="jar" description="make a jar file out of the bin/ directory">
-		<jar	jarfile="xmlgen.jar"
-				manifest="./MANIFEST.MF"
-				compress="${compress}">
-			<fileset dir="src" includes="**/*.properties" />
-			<fileset dir="bin" includes="**/*.*" />
-		</jar>
-	</target>
-	
-	
-	
-	
-	
-	
-	
-	<!-- test the working directory -->
-	<target name="test">
-		<ant antfile="../shared/ant.test.xml" target="test" />
-	</target>
-	
-	
-	<!-- test the distribution package -->
-	<target name="test_release">
-		<ant antfile="../shared/ant.test.xml" target="test_release">
-			<property name="testJar" value="../package/xmlgen.jar"/>
-		</ant>
-	</target>
-	
-	
-	
-	
-	
-	
-	<!-- generator release -->
-	<target name="dist" description="build the distribution package into the dist/ dir">
-    <tstamp>
-      <format property="YEAR" pattern="yyyy" locale="en"/>
-    </tstamp>
-		
-		<delete	dir="dist" />
-		<mkdir	dir="dist/src" />
-		
-		<!-- copy source code -->
-		<copy todir="dist/src">
-			<fileset dir="src" />
-		</copy>
-		
-		<!-- copy document files -->
-		<copy todir="dist">
-			<fileset dir="doc" />
-		</copy>
-		
-    <replace dir="dist">
-      <include name="**/*.html"/>
-      <include name="**/*.txt"/>
-      <replacefilter token="@@VERSION@@" value="${DSTAMP}" />
-      <replacefilter token="@@YEAR@@" value="${YEAR}" />
-    </replace>
-		
-		
-		
-		<!-- compile files -->
-		<mkdir	dir="temp" />
-		<javac	srcdir="dist/src"
-				debug="on"
-				destdir="temp">
-			
-			<classpath path="../package/msv.jar"/>
-			<classpath path="../package/xsdlib.jar"/>
-			<classpath path="${java.class.path}"/>
-			<classpath path="${xerces.jar}"/>
-			<classpath path="${relaxngDatatype.jar}"/>
-			<classpath path="${isorelax.jar}"/>
-			
-			<include name="**/*.java" />
-		</javac>
-		
-		<!-- create a time stamp file -->
-		<echo file="temp/version.properties">version=${DSTAMP}</echo>
-		
-		<!-- creates the binary jar -->
-		<jar	jarfile="dist/xmlgen.jar"
-				manifest="./MANIFEST.MF"
-				compress="${compress}">
-			<fileset dir="dist/src" includes="**/*.properties" />
-			<fileset dir="temp" includes="**/*.*" />
-		</jar>
-		<delete dir="temp" />
-		
-		
-		<!-- creates javadoc -->
-		<mkdir		dir="dist/javadoc" />
-		<javadoc	locale="en_US"
-					packagenames="com.sun.msv.generator.*"
-					sourcepath="dist/src"
-					destdir="dist/javadoc"
-					windowtitle="Sun XML Generator"
-					public="yes"
-					author="yes"
-					>
-			<link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api"
-				packagelistLoc="../shared/ExternalPackageLists/CoreAPI" />
-			<link offline="true" href="http://xml.apache.org/apiDocs/"
-				packagelistLoc="../shared/ExternalPackageLists/XML" />
-			<link offline="true" href="http://relaxng.sourceforge.net/datatype/java/apiDocs/"
-				packagelistLoc="../shared/ExternalPackageLists/RELAXNG" />
-		</javadoc>
-		
-		
-<!-- temporarily, remove source codes -->
-		<delete dir="dist/src" />
-		
-		<!-- copy additional jars -->
-		<copy file="../package/xsdlib.jar" tofile="dist/xsdlib.jar" />
-		<copy file="../package/msv.jar" tofile="dist/msv.jar" />
-		<copy file="${relaxngDatatype.jar}" tofile="dist/relaxngDatatype.jar" />
-		<copy file="${isorelax.jar}" tofile="dist/isorelax.jar" />
-		<copy file="${xerces.jar}" tofile="dist/xercesImpl.jar" />
-		<copy file="${xmlParserAPIs.jar}" tofile="dist/xmlParserAPIs.jar" />
-	</target>
-	
-	
-	
-	
-  <!-- generate release -->
-  <target name="release" depends="dist" description="build the distribution zip file">
-  	<tstamp />
-		<property name="stageName" value="xmlgen-${DSTAMP}"/>
-		
-		<!-- copy jar file to package dir -->
-		<copy file="dist/xmlgen.jar" tofile="../package/xmlgen.jar" />
-		
-		<!-- creates distribution package -->
-    <zip  zipfile="../package/xmlgen.${DSTAMP}.zip">
-    	<zipfileset dir="dist" prefix="${stageName}" />
-    </zip>
-	</target>
-	
-	<target name="clean">
-		<delete dir="bin" />
-		<delete dir="dist" />
-		<delete dir="temp" />
-	</target>
-</project>
diff --git a/generator/doc/Apache-LICENSE-1.1.txt b/generator/doc/Apache-LICENSE-1.1.txt
deleted file mode 100644
index de6706f..0000000
--- a/generator/doc/Apache-LICENSE-1.1.txt
+++ /dev/null
@@ -1,58 +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 "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * Portions of this software are based upon public domain software
- * originally written at the National Center for Supercomputing Applications,
- * University of Illinois, Urbana-Champaign.
- */
-
diff --git a/generator/doc/HowToUse.html b/generator/doc/HowToUse.html
deleted file mode 100644
index 3c51228..0000000
--- a/generator/doc/HowToUse.html
+++ /dev/null
@@ -1,339 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
-	<TITLE>USER'S GUIDE FOR SUN XML GENERATOR</TITLE>
-	<style>
-		.title
-		{
-			text-align:center;
-			font-weight:bold;
-		}
-		PRE
-		{
-			background-color: rgb(240,240,240);
-		}
-	</style>
-</HEAD>
-<BODY>
-<P ALIGN=center><B>
-USER'S GUIDE FOR SUN XML GENERATOR<BR>
-Version @@VERSION@@<BR>
-<BR>
-Copyright (c) Sun Microsystems, 2001-@@YEAR@@</B>
-</P>
-<P><BR></P>
-<P ALIGN=right>Document written by <A href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</A> <BR>
-$Id: HowToUse.html 1509 2003-02-25 19:20:47Z kk122374 $ </P>
-<P>
-  Sun XML Generator is a tool to generate XML instances from various kinds of schemas.
-</P>
-<H1>Contents of This Document</H1>
-<OL>
-	<LI><A href="#quick">Quick Start</A>
-	<LI><A href="#root">Specifying the Root Element</A>
-	<LI><A href="#example">Providing Examples</A>
-	<LI><A href="#size">Controlling the Size of Documents</A>
-	<LI><A href="#error">Generating Invalid Documents</A>
-<!--	<LI><A href="#custom">Writing Code to Customize Behavior</A>	-->
-</OL>
-
-
-
-<H1><A name="quick">Quick Start</A></H1>
-<P>
-  To generate a valid instance from a RELAX grammar, enter the following command:
-</P>
-<PRE>
-$ java -jar xmlgen.jar myGrammar.rxg
-</PRE>
-
-<P>
-  To generate 100 valid instances from a TREX pattern, enter the command:
-</P>
-<PRE>
-$ java -jar xmlgen.jar -n 100 myPattern.trex out$.xml
-</PRE>
-<P>
-  This will create out00.xml, out01.xml, ... out99.xml.
-</P>
-
-<P>
-  XML Generator is also capable of generating invalid instances.
-  The following example generates one instance(<code>invalid.xml</code>)
-  from a W3C XML Schema(<code>mine.xsd</code>).
-  The generated file is usually almost valid.
-</P>
-<PRE>
-$ java -jar xmlgen.jar -error 1/100 mine.xsd invalid.xml
-</PRE>
-<P>
-  The next example also generates an invalid instance. But this time
-  the generated instance is almost completely wrong.
-</P>
-<PRE>
-$ java -jar xmlgen.jar -error 1/2 mine.xsd terrible.xml
-</PRE>
-
-
-<A name="root">
-<H1>Specifying the Root Element</H1></A>
-<P>
-  With schema languages like XML Schema, the generator cannot tell what element should be used as the root element. Therefore, by default it picks one randomly. The "-root" option allows you to change this behavior by telling the generator to use a specific element.
-</P><P>
-  To generate XML files that start with a <code>foo</code> element of the namespace <code>http://my.name.space/</code>, specify:
-</P>
-<PRE>
-$ java -jar xmlgen.jar mine.xsd -root {http://my.name.space/}foo
-</PRE>
-<P>
-  If you are not using XML namespaces, you say
-</P>
-<PRE>
-$ java -jar xmlgen.jar mine.xsd -root {}foo
-</PRE>
-
-
-<A name="example">
-<H1>Providing Examples</H1></A>
-<P>
-  Due to the expressiveness of W3C XML Schema Part 2, sometimes it is difficult
-  to generate a string that satisfies a given datatype, especially when the type is derived with
-  many facets.
-</P>
-<P>
-  If this is the case, XML Generator reports the following error and stops.
-</P>
-<PRE>
-unable to generate value for this datatype: XXXX
-</PRE>
-<P>
-  You can provide example instances to avoid this problem. If you have a valid instance
-  <code>abc.xml</code> that conforms to <code>joe.trex</code>,
-  then enter the following command:
-</P>
-<PRE>
-$ java -jar xmlgen.jar joe.trex <b>-example abc.xml</b>
-</PRE>
-<P>
-  XML Generator will read that file and extract literals found in it. Those literals
-  are then used to generate instances. 
-  The "-example" option can be used more than once to provide additional examples.
-</P>
-<PRE>
-$ java -jar xmlgen.jar joe.trex -example ex1.xml -example ex2.xml
-</PRE>
-
-<H1><A NAME="intro">Controlling the Size of Documents</A></H1>
-<P>
-	The size of generated documents can be controlled with two parameters:
-	cut-back depth and width.
-</P>
-<P>
-	Cut-back depth decides how deep a document can be. Once the depth exceeds this value,
-	the generator is switched to "cut back" mode. In this mode, the generator skips any optional
-	expressions (like <code>'?'</code> or <code>'*'</code> in a DTD) and tries to stop
-	further generation.
-	Therefore if the cut-back depth is set to a bigger value,
-	generated documents tend to be big.
-</P>
-<P>
-	Width decides how many times repeatable items are repeated.
-	If you set this value to 5, then
-	<code>'*'</code> will be repeated from 0 to 5 times (uniformly distributed),
-	and <code>'+'</code> will be repeated from 1 to 6 times (uniformly distributed).
-	Therefore if width is set to a bigger value, generated documents tend to be also big.
-</P>
-<P>
-	Depending on the schema used,
-	the correlation between the size of generated documents and these parameters
-	varies.
-	So you may need to tune these parameters through trial-and-error.	
-</P>
-
-
-<H1><A NAME="error">Generating Invalid Documents</A></H1>
-<P>
-	Generator is capable of generating invalid instances.
-	In this mode, generator randomly inserts errors into the document.
-	Errors are made by manipulating the document according to several predefined patterns.
-</P>
-<P>
-	You can control the probability of each pattern,
-	or you can set all probabilities to the same value with the "-error" option.
-</P>
-<P>
-	Probabilities are set by a fractional number "m/n".
-	"2/100" indicates probability of 2%.
-</P>
-<P>
-	The following sub-sections enumerates each pattern and command line option to control the probability.
-</P>
-
-
-<H3>Greedy Choice</H3>
-<P>
-	A "greedy choice" error is one that selects more than one choice at a time.
-</P>
-<PRE><XMP>
-Schema:
-<choice>
-  <element name="A"> .... </element>
-  <element name="B"> .... </element>
-</choice>
-
-Instance:
-<A> ... </A>
-<B> ... </B>
-</XMP></PRE>
-<P>
-	This probability can be controlled through the "-error-greedyChoice" option.
-</P>
-
-
-<H3>Missing Attribute</H3>
-<P>
-	A "missing attribute" error is made by intentionally skipping a required attribute.
-	This probability can be controlled through the "-error-missingAttribute" option.
-</P>
-<PRE><XMP>
-Schema:
-<element name="foo">
-  <attribute name="bar">
-  ...
-</element>
-
-Instance:
-<foo>
-   ...
-</foo>
-</XMP></PRE>
-
-
-
-<H3>Missing Element</H3>
-<P>
-	A "missing element" error is made by intentionally skipping a required element.
-	This probability can be controlled through the "-error-missingElement" option.
-</P>
-
-
-
-<H3>Mutated Attribute</H3>
-<P>
-	A "mutated attribute" error is made by intentionally replacing an attribute
-	by another completely irrelevant attribute.
-	This probability can be controlled through the "-error-mutatedAttribute" option.
-</P>
-<PRE><XMP>
-Schema:
-<element name="foo">
-  <attribute name="bar">
-  ...
-</element>
-...
-<attribute name="zoo" />
-
-Instance:
-<foo zoo="...">
-   ...
-</foo>
-</XMP></PRE>
-
-
-
-<H3>Mutated Element</H3>
-<P>
-	A "mutated element" error is made by intentionally replacing an element
-	by another completely irrelevant element.
-	This probability can be controlled through the "-error-mutatedElement" option.
-</P>
-
-
-
-<H3>Sequence Error</H3>
-<P>
-	A "sequence error" is made by swapping the order of items of a sequence.
-	This probability can be controlled through the "-error-sequenceError" option.
-</P>
-<PRE><XMP>
-Schema:
-<sequence>
-  <element name="foo"/>
-  <element name="bar"/>
-</sequence>
-
-Instance:
-<bar/>
-<foo/>
-</XMP></PRE>
-
-
-<H3>Slip-in Attribute</H3>
-<P>
-	A "slip-in attribute" error is made by adding an irrelevant attribute to an element.
-	This probability can be controlled through the "-error-slipinAttribute" option.
-</P>
-<PRE><XMP>
-Schema:
-<element name="foo"/>
-  <attribute name="a"/>
-  ...
-</element>
-
-Instance:
-<foo a="..." xyz="...">
-  ...
-</foo>
-</XMP></PRE>
-
-
-<H3>Slip-in Element</H3>
-<P>
-	A "slip-in element" error is the element counterpart of the "slip-in attribute" error.
-	This probability can be controlled through the "-error-slipinElement" option.
-</P>
-
-
-<H3>Missing '+'</H3>
-<P>
-	A "missing plus" error is made by not generating a
-	non-optional repeatable item.
-	This probability can be controlled through the "-error-missingPlus" option.
-</P>
-<PRE><XMP>
-Schema:
-<!ELEMENT foo  (a,b+,c)>
-
-Instance:
-<foo>
-  <a/><c/>
-</foo>
-</XMP></PRE>
-
-
-<H3>Attribute Name Typo</H3>
-<P>
-	An "attribute name typo" error is made by modifying several characters of 
-	an attribute name.
-	This probability can be controlled through the "-error-attributeNameTypo" option.
-</P>
-<PRE><XMP>
-Schema:
-<!ATTLIST foo  bar CDATA #IMPLIED>
-
-Instance:
-<foo bbr="..." />
-</XMP></PRE>
-
-
-<H3>Element Name Typo</H3>
-<P>
-	An "element name typo" error is the element version of the "attribute name typo" error.
-	It is made by modifying several characters of an element name.
-	This probability can be controlled through the "-error-elementNameTypo" option.
-</P>
-
-
-</BODY>
-</HTML>
\ No newline at end of file
diff --git a/generator/doc/README.txt b/generator/doc/README.txt
deleted file mode 100644
index 2354eec..0000000
--- a/generator/doc/README.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-======================================================================
-                  README FILE FOR SUN XML GENERATOR
-                            version @@VERSION@@
-             Copyright (c) Sun Microsystems, 2001-@@YEAR@@
-Document written by Kohsuke Kawaguchi (kohsuke.kawaguchi at eng.sun.com)
-                                                    $Revision: 1509 $
-======================================================================
-
-Sun XML Generator is a Java tool to generate various XML instances from
-several kinds of schemas. It supports DTD, RELAX Namespace, RELAX Core,
-TREX, and a subset of W3C XML Schema Part 1. This release includes
-software developed by the Apache Software Foundation [1].
-
-
-----------------------------------------------------------------------
-OVERVIEW
-----------------------------------------------------------------------
-
-This is a command-line tool that can generate both valid and invalid
-instances from schemas. It can be used for generating test cases for XML
-applications that need to conform to a particular schema. For example:
-
-* to load-test applications against large documents
-* to ensure that documents are processed correctly
-* to check the behavior of XSL stylesheets
-
-
-See HowToUse.html for details.
-
-
-----------------------------------------------------------------------
-CHANGE LOG
-----------------------------------------------------------------------
-
-- Added a new option "-root" to specify the root element name of the
-  generated XML.
-
-
-
-----------------------------------------------------------------------
-CURRENT STATUS
-----------------------------------------------------------------------
-
-This release relies on Sun Multi Schema Validator[2] for parsing
-schemas. Therefore, any limitation that applies to MSV will apply to
-this release.
-
-
-----------------------------------------------------------------------
-REFERENCES
-----------------------------------------------------------------------
-[ 1] Apache Software Foundation
-      http://www.apache.org/
-[ 2] Sun Multi Schema Validator
-      http://www.sun.com/xml
-
-======================================================================
-END OF README
diff --git a/generator/doc/copyright.txt b/generator/doc/copyright.txt
deleted file mode 100644
index dc405bc..0000000
--- a/generator/doc/copyright.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Copyright 2001-@@YEAR@@ Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto,
-California, 94303, U.S.A. All rights reserved.
-
-Sun Microsystems, Inc. has intellectual property rights relating to
-technology embodied in this product. In particular, and without
-limitation, these intellectual property rights may include one or more
-of the U.S. patents listed at http://www.sun.com/patents and one or
-more additional patents or pending patent applications in the U.S. and
-other countries. This product is distributed under licenses
-restricting its use, copying, distribution, and decompilation. No part
-of this product may be reproduced in any form by any means without
-prior written authorization of Sun and its licensors, if any. Third
-party software, including font technology, is copyrighted and licensed
-from Sun suppliers. Sun, the Sun logo, and Sun Microsystems are
-trademarks or registered trademarks of Sun Microsystems, Inc. in the
-U.S. and other countries. This product includes software developed by
-the Apache Software Foundation (http://www.apache.org/). Federal
-Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-----------------------------------------------------------------------
-
-Copyright 2001-@@YEAR@@ Sun Microsystems, Inc., 901 San Antonio Road, Palo
-Alto, Californie 94303 États-Unis. Tous droits réservés. Distribueé
-par des licences qui en restreignent l'utilisation. Sun Microsystems,
-Inc. a les droits de propriété intellectuels relatants à la
-technologie incorporée dans ce produit. En particulier, et sans la
-limitation, ces droits de propriété intellectuels peuvent inclure un
-ou plus des brevets américains énumérés à http://www.sun.com/patents
-et un ou les brevets plus supplémentaires ou les applications de
-brevet en attente dans les Etats Unis et les autres pays. Ce produit
-ou document est protégé par un copyright et distribué avec des
-licences qui en restreignent l'utilisation, la copie, la distribution,
-et la décompilation. Aucune partie de ce produit ou document ne peut
-être reproduite sous aucune forme, par quelque moyen que ce soit, sans
-l'autorisation préalable et écrite de Sun et de ses bailleurs de
-licence, s'il y en a. Le logiciel détenu par des tiers, et qui
-comprend la technologie relative aux polices de caractères, est
-protégé par un copyright et licencié par des fournisseurs de Sun. Sun,
-le logo Sun, Sun Microsystems et sont des marques de fabrique ou des
-marques d?pos?es de Sun Microsystems, Inc. aux Etats-Unis et dans
-d'autres pays. Ce produit inclut le logiciel développé par la base de
-Apache Software Foundation (http://www.apache.org/). L'accord du
-gouvernement des États Unis est requis avant l'exportation du produit.
diff --git a/generator/doc/license.txt b/generator/doc/license.txt
deleted file mode 100644
index 02108da..0000000
--- a/generator/doc/license.txt
+++ /dev/null
@@ -1,210 +0,0 @@
-Sun Microsystems, Inc.  
-Binary Code License Agreement
-
-READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED
-SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT")
-CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE.  BY
-OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS
-OF THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE
-ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY
-SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT.
-IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE
-UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR,
-IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE
-"DECLINE" BUTTON AT THE END OF THIS AGREEMENT.
-
-1.  LICENSE TO USE.  Sun grants you a non-exclusive and
-non-transferable license for the internal use only of the
-accompanying software and documentation and any error
-corrections provided by Sun (collectively "Software"), by
-the number of users and the class of computer hardware for
-which the corresponding fee has been paid.
-
-2.  RESTRICTIONS.  Software is confidential and copyrighted.
-Title to Software and all associated intellectual property
-rights is retained by Sun and/or its licensors.  Except as
-specifically authorized in any Supplemental License Terms,
-you may not make copies of Software, other than a single
-copy of Software for archival purposes.  Unless enforcement
-is prohibited by applicable law, you may not modify,
-decompile, or reverse engineer Software.  You acknowledge
-that Software is not designed, licensed or intended for use
-in the design, construction, operation or maintenance of any
-nuclear facility.  Sun disclaims any express or implied
-warranty of fitness for such uses.  No right, title or
-interest in or to any trademark, service mark, logo or trade
-name of Sun or its licensors is granted under this
-Agreement.
-
-3.  LIMITED WARRANTY.  Sun warrants to you that for a period
-of ninety (90) days from the date of purchase, as evidenced
-by a copy of the receipt, the media on which Software is
-furnished (if any) will be free of defects in materials and
-workmanship under normal use.  Except for the foregoing,
-Software is provided "AS IS".  Your exclusive remedy and
-Sun's entire liability under this limited warranty will be
-at Sun's option to replace Software media or refund the fee
-paid for Software.
-
-4.  DISCLAIMER OF WARRANTY.  UNLESS SPECIFIED IN THIS
-AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,
-REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
-WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE
-EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-5.  LIMITATION OF LIABILITY.  TO THE EXTENT NOT PROHIBITED
-BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
-ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT,
-CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
-CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
-OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN
-IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-In no event will Sun's liability to you, whether in
-contract, tort (including negligence), or otherwise, exceed
-the amount paid by you for Software under this Agreement.
-The foregoing limitations will apply even if the above
-stated warranty fails of its essential purpose.
-
-6.  Termination.  This Agreement is effective until
-terminated.  You may terminate this Agreement at any time by
-destroying all copies of Software.  This Agreement will
-terminate immediately without notice from Sun if you fail to
-comply with any provision of this Agreement.  Upon
-Termination, you must destroy all copies of Software.
-
-7.  Export Regulations.  All Software and technical data
-delivered under this Agreement are subject to US export
-control laws and may be subject to export or import
-regulations in other countries.  You agree to comply
-strictly with all such laws and regulations and acknowledge
-that you have the responsibility to obtain such licenses to
-export, re-export, or import as may be required after
-delivery to you.
-
-8.  U.S.  Government Restricted Rights.  If Software is
-being acquired by or on behalf of the U.S.  Government or by
-a U.S.  Government prime contractor or subcontractor (at any
-tier), then the Government's rights in Software and
-accompanying documentation will be only as set forth in this
-Agreement; this is in accordance with 48 CFR 227.7201
-through 227.7202-4 (for Department of Defense (DOD)
-acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
-acquisitions).
-
-9.  Governing Law.  Any action related to this Agreement
-will be governed by California law and controlling U.S.
-federal law.  No choice of law rules of any jurisdiction
-will apply.
-
-10.  Severability.  If any provision of this Agreement is
-held to be unenforceable, this Agreement will remain in
-effect with the provision omitted, unless omission would
-frustrate the intent of the parties, in which case this
-Agreement will immediately terminate.
-
-11.  Integration.  This Agreement is the entire agreement
-between you and Sun relating to its subject matter.  It
-supersedes all prior or contemporaneous oral or written
-communications, proposals, representations and warranties
-and prevails over any conflicting or additional terms of any
-quote, order, acknowledgment, or other communication between
-the parties relating to its subject matter during the term
-of this Agreement.  No modification of this Agreement will
-be binding, unless in writing and signed by an authorized
-representative of each party.
-
-
-SUN XML INSTANCE GENERATOR, VERSION 1.0 SUPPLEMENTAL LICENSE
-       TERMS
-
-These supplemental license terms ("Supplemental Terms") add
-to or modify the terms of the Binary Code License Agreement
-(collectively, the "Agreement").  Capitalized terms not
-defined in these Supplemental Terms shall have the same
-meanings ascribed to them in the Agreement.  These
-Supplemental Terms shall supersede any inconsistent or
-conflicting terms in the Agreement, or in any license
-contained within the Software.
-
-1.  Software Internal Use and Development License Grant.
-Subject to the terms and conditions of this Agreement,
-including, but not limited to Section 4 (Java(TM) Technology
-Restrictions) of these Supplemental Terms, Sun grants to
-you, a non-exclusive, non-transferable, royalty-free and
-limited license to reproduce, modify, and create derivative
-works of the Software for the sole purpose of adding value
-and improving the Software for the development of
-applications ("Programs").
-
-2.  License to Distribute Software.  Subject to the terms
-and conditions of this Agreement, including, but not limited
-to Section 4 (Java (TM) Technology Restrictions) of these
-Supplemental Terms, Sun grants you a non-exclusive,
-non-transferable, limited license to reproduce and
-distribute the Software modified by you as permitted in
-Section 1 of these Supplemental Terms ("Modified Software")
-in source or binary code form, provided that (i) you
-distribute the Modified Software only bundled as part of,
-and for the sole purpose of running, your Programs, (ii) the
-Modified Software adds value and improveS the function of
-the Software, (iv) you do not remove or alter any
-proprietary legends or notices contained in the Software,
-(v) you only distribute the Modified Software subject to a
-license agreement that protects Sun's interests consistent
-with the terms contained in this Agreement, and (vi) you
-agree to defend and indemnify Sun and its licensors from and
-against any damages, costs, liabilities, settlement amounts
-and/or expenses (including attorneys' fees) incurred in
-connection with any claim, lawsuit or action by any third
-party that arises or results from the use or distribution of
-any and all Programs and/or Modified Software.
-
-3.  Experimental Software.  You acknowledge that the
-Software is experimental and may contain errors, defects, or
-deficiencies which cannot or will not be corrected by Sun.
-You shall have the sole responsibility to protect adequately
-and backup your data and/or equipment used in connection
-with the Software.  You shall not claim against Sun for lost
-data, re-run time, inaccurate output, work delays or lost
-profits resulting from your use of the Licensed Software.
-
-4.  Java Technology Restrictions.  You may not modify the
-Java Platform Interface ("JPI", identified as classes
-contained within the "java" package or any subpackages of
-the "java" package), by creating additional classes within
-the JPI or otherwise causing the addition to or modification
-of the classes in the JPI.  In the event that you create an
-additional class and associated API(s) which (i) extends the
-functionality of the Java platform, and (ii) is exposed to
-third party software developers for the purpose of
-developing additional software which invokes such additional
-API, you must promptly publish broadly an accurate
-specification for such API for free use by all developers.
-You may not create, or authorize your licensees to create,
-additional classes, interfaces, or subpackages that are in
-any way identified as "java", "javax", "sun" or similar
-convention as specified by Sun in any naming convention
-designation.
-
-5.  Trademarks and Logos.  You acknowledge and agree as
-between you and Sun that Sun owns the SUN, SOLARIS, JAVA,
-JINI, FORTE, and iPLANET trademarks and all SUN, SOLARIS,
-JAVA, JINI, FORTE, and iPLANET-related trademarks, service
-marks, logos and other brand designations ("Sun Marks"), and
-you agree to comply with the Sun Trademark and Logo Usage
-Requirements currently located at
-http://www.sun.com/policies/trademarks.  Any use you make of
-the Sun Marks inures to Sun's benefit.
-
-6.  Termination for Infringement.  Either party may
-terminate this Agreement immediately should any Software
-become, or in either party's opinion be likely to become,
-the subject of a claim of infringement of any intellectual
-property right.
-
-For inquiries please contact:  
-Sun Microsystems, Inc.  
-901 San Antonio Road, Palo Alto, California 94303
-(LFI#100313/Form ID#011801)
diff --git a/generator/generator.iml b/generator/generator.iml
deleted file mode 100644
index a313fc7..0000000
--- a/generator/generator.iml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="JAVA_MODULE">
-  <component name="ModuleRootManager" />
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/bin" />
-    <exclude-output />
-    <exclude-exploded />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="msv" />
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../shared/lib/xercesImpl.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MODULE_DIR$/../shared/Xerces-src.zip!/src" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../shared/lib/junit.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntryProperties />
-  </component>
-  <component name="org.mevenide.idea.module.ModuleSettings">
-    <favoriteGoals>
-      <list size="0" />
-    </favoriteGoals>
-  </component>
-</module>
-
diff --git a/generator/pom.xml b/generator/pom.xml
deleted file mode 100644
index 156553c..0000000
--- a/generator/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>net.java.dev.msv</groupId>
-  <artifactId>msv-generator</artifactId>
-  <version>2009.1</version>
-  <name>MSV Generator</name>
-  <parent>
-    <groupId>net.java.dev.msv</groupId>
-    <artifactId>msv-parent</artifactId>
-    <version>2009.1</version>
-    <relativePath>../parent/pom.xml</relativePath>
-  </parent>
-
-  <scm>
-    <connection>scm:svn:http://msv.dev.java.net/svn/msv/tags/msv-2009.1/generator</connection>
-    <developerConnection>scm:svn:https://msv.dev.java.net/svn/msv/tags/msv-2009.1/generator</developerConnection>
-  </scm>
-
-  <build>
-    <plugins>
-      <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-jar-plugin</artifactId>
-	<configuration>
-	  <archive>
-	    <index>true</index>
-	  </archive>
-	  <manifest>
-	    <mainClass>com.sun.msv.generator.Driver</mainClass>
-	  </manifest>
-	  <addClasspath>true</addClasspath>
-	</configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>com.sun.msv.datatype.xsd</groupId>
-      <artifactId>xsdlib</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.sun.msv.datatype.xsd</groupId>
-      <artifactId>xsdlib</artifactId>
-      <version>${project.version}</version>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>net.java.dev.msv</groupId>
-      <artifactId>msv-testharness</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>net.java.dev.msv</groupId>
-      <artifactId>msv-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>net.java.dev.msv</groupId>
-      <artifactId>msv-core</artifactId>
-      <version>${project.version}</version>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>xml-resolver</groupId>
-      <artifactId>xml-resolver</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>isorelax</groupId>
-      <artifactId>isorelax</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>relaxngDatatype</groupId>
-      <artifactId>relaxngDatatype</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/generator/setenv.bat b/generator/setenv.bat
deleted file mode 100644
index 6fd6bd7..0000000
--- a/generator/setenv.bat
+++ /dev/null
@@ -1,8 +0,0 @@
- at echo off
-set CLASSPATH=%CLASSPATH%;..\..\msv\bin
-set CLASSPATH=%CLASSPATH%;..\..\msv\src
-set CLASSPATH=%CLASSPATH%;..\..\xsdlib\bin
-set CLASSPATH=%CLASSPATH%;..\..\xsdlib\src
-set CLASSPATH=%CLASSPATH%;c:\kohsuke\sun\msv\shared\lib\relaxngDatatype.jar
-set CLASSPATH=%CLASSPATH%;c:\kohsuke\sun\msv\shared\lib\isorelax.jar
-set CLASSPATH=%CLASSPATH%;c:\kohsuke\sun\msv\shared\lib\xerces.jar
diff --git a/generator/src/com/sun/msv/generator/ContextProviderImpl.java b/generator/src/com/sun/msv/generator/ContextProviderImpl.java
deleted file mode 100644
index f33a8b9..0000000
--- a/generator/src/com/sun/msv/generator/ContextProviderImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * @(#)$Id: ContextProviderImpl.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import org.relaxng.datatype.ValidationContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-import com.sun.msv.datatype.SerializationContext;
-
-/**
- * dummy implementation of ValidationContextProvider.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-final public class ContextProviderImpl
-	implements ValidationContext, SerializationContext {
-	
-	public ContextProviderImpl( Element parent ) {
-		this.element = parent;
-	}
-	
-	protected final Element element;
-	
-	public String getNamespacePrefix( String uri ) {
-		// find the already declared prefix.
-		String prefix = findPredeclaredPrefix(element,uri);
-		if(prefix!=null)	return prefix;
-		
-		// make sure that this prefix is not in use.
-		int cnt=1;
-		while( resolvePrefix(element,"qns"+cnt)!=null )		cnt++;
-		
-		// declare attribute
-		element.setAttributeNS( XMLNS_URI, "xmlns:qns"+cnt, uri );
-		return "qns"+cnt;
-	}
-	
-	public String resolveNamespacePrefix( String prefix ) {
-		return resolvePrefix(element,prefix);
-	}
-	
-	public boolean isUnparsedEntity( String name ) {
-		// accept anything.
-		// ENTITY is used with enumeration, so again
-		// this implementation is not a problem.
-		return true;
-	}
-	public boolean isNotation( String name ) {
-		// accept anything.
-		return true;
-	}
-
-	public String getBaseUri() { return null; }
-	
-	public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
-	
-	/**
-	 * finds a prefix for this URI. If no prefix is declared for this URI,
-	 * returns null.
-	 */
-	protected static String findPredeclaredPrefix( Element e, String uri ) {
-		NamedNodeMap m = e.getAttributes();
-		for( int i=0; i<m.getLength(); i++ ) {
-			Attr a = (Attr)m.item(i);
-			if(a.getNamespaceURI().equals(XMLNS_URI)
-			&& a.getValue().equals(uri)) {
-				int idx = a.getName().indexOf(':');
-				if(idx<0)	return "";	// default mapping
-				else		return a.getName().substring(idx+1);
-			}
-		}
-		// not found. try parent
-		if( e.getParentNode() instanceof Element )
-			return findPredeclaredPrefix( (Element)e.getParentNode(), uri );
-		return null;	// not found
-	}
-	
-	protected static String resolvePrefix( Element e, String prefix ) {
-		String qName = prefix.equals("")?"xmlns":("xmlns:"+prefix);
-		
-		if(e.getAttributeNode(qName)!=null)
-			return e.getAttribute(qName);	// find it.
-		
-		// not found. try parent
-		if( e.getParentNode() instanceof Element )
-			return resolvePrefix( (Element)e.getParentNode(), prefix );
-		return null;	// not found
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/DOM2toSAX2.java b/generator/src/com/sun/msv/generator/DOM2toSAX2.java
deleted file mode 100644
index 681543e..0000000
--- a/generator/src/com/sun/msv/generator/DOM2toSAX2.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.sun.msv.generator;
-
-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.w3c.dom.Text;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-public class DOM2toSAX2 {
-	
-	public DOM2toSAX2() {}
-
-	private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
-	
-	protected ContentHandler handler;
-	public void setContentHandler( ContentHandler handler ) {
-		this.handler = handler;
-	}
-	public ContentHandler getContentHandler() {
-		return this.handler;
-	}
-	
-	public void traverse(Document dom) throws SAXException {
-		if(handler==null)
-			throw new IllegalArgumentException("content handler is not set");
-		
-		handler.startDocument();
-		onElement(dom.getDocumentElement());
-		handler.endDocument();
-	}
-	
-	/** converts DOM attributes into SAX attributes. */
-	protected Attributes convertAttributes( Element e ) {
-		NamedNodeMap atts =	e.getAttributes();
-		AttributesImpl sa = new AttributesImpl();
-		for( int i=0; i<atts.getLength(); i++ ) {
-			Attr a = (Attr)atts.item(i);
-			
-            String value = a.getValue();
-			if(value==null)	value="";
-            
-            String uri = nullAdjust(a.getNamespaceURI());
-            
-            String localName = a.getLocalName();
-            if(localName==null) localName=a.getName();
-
-            if(XMLNS_URI.equals(uri))   continue;
-                        
-			sa.addAttribute( uri, localName, a.getName(), "CDATA", value );
-		}
-		return sa;
-	}
-	
-	protected void onElement( Element e ) throws SAXException {
-		
-		// declare namespace prefix
-		NamedNodeMap atts =	e.getAttributes();
-		for( int i=0; i<atts.getLength(); i++ ) {
-			Attr a = (Attr)atts.item(i);
-			if(!a.getName().startsWith("xmlns"))	continue;
-			
-			String prefix = a.getName();
-			int idx = prefix.indexOf(':');
-			if(idx<0)	handler.startPrefixMapping("",a.getValue());
-			else		handler.startPrefixMapping(prefix.substring(idx+1),a.getValue());
-		}
-		
-		handler.startElement(
-			nullAdjust(e.getNamespaceURI()), e.getLocalName(), e.getTagName(),
-			convertAttributes(e) );
-		
-		NodeList children = e.getChildNodes();
-		for( int i=0; i<children.getLength(); i++ ) {
-			Node n = children.item(i);
-			if( n instanceof Element )
-				onElement((Element)n);
-			if( n instanceof Text )
-				onText((Text)n);
-		}
-		
-		handler.endElement(
-            nullAdjust(e.getNamespaceURI()), e.getLocalName(), e.getTagName() );
-
-		// end namespace mapping
-		for( int i=0; i<atts.getLength(); i++ ) {
-			Attr a = (Attr)atts.item(i);
-			if(!a.getName().startsWith("xmlns"))	continue;
-			
-			String prefix = a.getName();
-			int idx = prefix.indexOf(':');
-			if(idx<0)	handler.endPrefixMapping("");
-			else		handler.endPrefixMapping(prefix.substring(idx+1));
-		}
-	}
-	
-	protected void onText( Text t ) throws SAXException {
-		String s = t.getData();
-		if(s!=null)
-			handler.characters( s.toCharArray(), 0, s.length() );
-	}
-    
-    private static String nullAdjust(String s) {
-        return s==null?"":s;
-    }
-}
diff --git a/generator/src/com/sun/msv/generator/DOMDecorator.java b/generator/src/com/sun/msv/generator/DOMDecorator.java
deleted file mode 100644
index 99f59f4..0000000
--- a/generator/src/com/sun/msv/generator/DOMDecorator.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package com.sun.msv.generator;
-
-import java.util.Map;
-import java.util.Set;
-
-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;
-
-/**
- * Decorates DOM with missing information so that it will be nicely serialized.
- */
-public class DOMDecorator {
-	private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
-	
-	public static void decorate( Document doc ) {
-		// collect namespace URIs that are used.
-		final Set usedURIs = new java.util.HashSet();
-		// also, collect prefixes that are already in use.
-		final Set usedPrefixes = new java.util.HashSet();
-		
-		Element root = doc.getDocumentElement();
-		
-		visit( root, new DOMVisitor(){
-			public void onElement( Element e ) {
-				usedURIs.add(nullAdjust(e.getNamespaceURI()));
-			}
-			public void onAttr( Attr a ) {
-				String uri = nullAdjust(a.getNamespaceURI());
-				if(!"".equals(uri) && !uri.equals(XMLNS_URI))
-					usedURIs.add(nullAdjust(a.getNamespaceURI()));
-				
-				if(nullAdjust(a.getNamespaceURI()).equals(XMLNS_URI)) {
-					String qname = a.getName();
-					int idx = qname.indexOf(':');
-					if(idx<0)
-						usedPrefixes.add(qname.substring(idx+1));
-				}
-                
-                // compute the value of a child attribute by
-                // concatanating child nodes.
-                // With Xerces, a.getValue() works but witih Crimson,
-                // this doesn't work. So as a workaround, we need to
-                // process child nodes and recompute the attribute value here
-                StringBuffer buf = new StringBuffer();
-                NodeList lst = a.getChildNodes();
-                for( int j=0; j<lst.getLength(); j++ )
-                    buf.append( lst.item(j).getNodeValue() );
-                a.setValue( buf.toString() );
-			}
-		});
-		
-		// if an empty namespace "" is not used, then namespace URI of 
-		// the root element is considered as the default namespace URI.
-		final String defaultNs =
-			(!usedURIs.contains(""))?
-				nullAdjust(root.getNamespaceURI()):"";
-        
-		if( !defaultNs.equals("") )	// declare the default ns
-			root.setAttributeNS( XMLNS_URI, "xmlns", defaultNs );
-		
-		// map from prefix to URI.
-		final Map uri2prefix = new java.util.HashMap();
-		
-		// assign prefixes for other URIs.
-		int cnt=1;
-		String[] uris = (String[])usedURIs.toArray(new String[0]);
-		for( int i=0; i<uris.length; i++ ) {
-			if( uris[i].equals(defaultNs) ) continue;   // skip.
-            
-			String prefix;
-			do {
-				prefix = "ns"+(cnt++);
-			} while( uri2prefix.containsValue(prefix) );
-			
-			uri2prefix.put( uris[i], prefix );
-			// add this declaration to the document element.
-			root.setAttributeNS( XMLNS_URI, "xmlns:"+prefix, uris[i] );
-		}
-		
-		
-		// visit nodes and set prefixes
-		visit( root, new DOMVisitor(){
-			public void onElement( Element e ) {
-                String uri = nullAdjust(e.getNamespaceURI()); 
-				if( uri.equals(defaultNs) )
-					; // don't touch
-				else
-					e.setPrefix((String)uri2prefix.get(uri));
-			}
-			public void onAttr( Attr a ) {
-				String uri = nullAdjust(a.getNamespaceURI());
-				if("".equals(uri))
-					return;	// do nothing.
-				
-				if(uri.equals(XMLNS_URI))
-					return;	// don't touch xmlns declarations.
-				
-				String prefix = (String)uri2prefix.get(uri);
-				a.setPrefix(prefix);
-			}
-		});
-	}
-	
-	
-	/** visits Elements and Attrs by using a DOMVisitor. */
-	public static void visit( Element e, DOMVisitor visitor ) {
-		visitor.onElement(e);
-		// visit attributes
-		NamedNodeMap map = e.getAttributes();
-		for( int i=0; i<map.getLength(); i++ )
-			visitor.onAttr( (Attr)map.item(i) );
-		
-		// visit children
-		NodeList children = e.getChildNodes();
-		for( int i=0; i<children.getLength(); i++ ) {
-			Node n = children.item(i);
-			if( n instanceof Element )
-				visit((Element)n,visitor);
-		}
-	}
-	
-	static interface DOMVisitor {
-		void onElement(Element e);
-		void onAttr(Attr a);
-	}
-	
-    private static String nullAdjust(String s) {
-        return s==null?"":s;
-    }
-}
diff --git a/generator/src/com/sun/msv/generator/DataTypeGenerator.java b/generator/src/com/sun/msv/generator/DataTypeGenerator.java
deleted file mode 100644
index 4755cdc..0000000
--- a/generator/src/com/sun/msv/generator/DataTypeGenerator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * @(#)$Id: DataTypeGenerator.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import org.relaxng.datatype.Datatype;
-
-/**
- * generates an text value that matchs to a datatype.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DataTypeGenerator {
-	String generate( Datatype dt, ContextProviderImpl context );
-	
-	public static class GenerationException extends RuntimeException {
-		public GenerationException( String msg ) {
-			super(msg);
-		}
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/DataTypeGeneratorImpl.java b/generator/src/com/sun/msv/generator/DataTypeGeneratorImpl.java
deleted file mode 100644
index bfd30d3..0000000
--- a/generator/src/com/sun/msv/generator/DataTypeGeneratorImpl.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * @(#)$Id: DataTypeGeneratorImpl.java 1722 2006-08-14 17:19:11Z kohsuke $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
-import org.relaxng.datatype.Datatype;
-
-import com.sun.msv.datatype.xsd.AnyURIType;
-import com.sun.msv.datatype.xsd.BooleanType;
-import com.sun.msv.datatype.xsd.DoubleType;
-import com.sun.msv.datatype.xsd.EnumerationFacet;
-import com.sun.msv.datatype.xsd.FinalComponent;
-import com.sun.msv.datatype.xsd.FloatType;
-import com.sun.msv.datatype.xsd.IntType;
-import com.sun.msv.datatype.xsd.IntegerType;
-import com.sun.msv.datatype.xsd.LengthFacet;
-import com.sun.msv.datatype.xsd.ListType;
-import com.sun.msv.datatype.xsd.LongType;
-import com.sun.msv.datatype.xsd.MaxLengthFacet;
-import com.sun.msv.datatype.xsd.MinLengthFacet;
-import com.sun.msv.datatype.xsd.NcnameType;
-import com.sun.msv.datatype.xsd.NmtokenType;
-import com.sun.msv.datatype.xsd.NonNegativeIntegerType;
-import com.sun.msv.datatype.xsd.NormalizedStringType;
-import com.sun.msv.datatype.xsd.NumberType;
-import com.sun.msv.datatype.xsd.PositiveIntegerType;
-import com.sun.msv.datatype.xsd.QnameType;
-import com.sun.msv.datatype.xsd.ShortType;
-import com.sun.msv.datatype.xsd.StringType;
-import com.sun.msv.datatype.xsd.TokenType;
-import com.sun.msv.datatype.xsd.UnionType;
-import com.sun.msv.datatype.xsd.UnsignedIntType;
-import com.sun.msv.datatype.xsd.XSDatatype;
-import com.sun.msv.datatype.xsd.XSDatatypeImpl;
-import com.sun.msv.datatype.xsd.XmlNames;
-import com.sun.msv.datatype.xsd.Base64BinaryType;
-import com.sun.msv.datatype.xsd.ByteType;
-import com.sun.xml.util.XmlChars;
-
-/**
- * default implementation of DataTypeGenerator.
- * 
- * You may want to override this class to implement custom generator for
- * unimplemented datatype or datatype local to your schema.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class DataTypeGeneratorImpl implements DataTypeGenerator {
-	private final Random random;
-	
-	public DataTypeGeneratorImpl() { this(new Random()); }
-	public DataTypeGeneratorImpl( Random random ) {
-		this.random = random;
-	}
-	
-	/**
-	 * if this flag is set to true, then non-ASCII characters will not be used.
-	 */
-	public boolean asciiOnly = false;
-	
-	/**
-	 * map from DataType to Set that holds generated values for types.
-	 * This map is used when we fail to generate an appropriate value for a type.
-	 */
-	protected Map generatedValues = new java.util.HashMap();
-	
-	/**
-	 * set that contains tokens that are found in example files.
-	 * This set is used as the last resort to generate a value for a type.
-	 */
-	protected Set tokens;
-
-	public String generate( Datatype dt, ContextProviderImpl context ) {
-		String s=null; int i;
-
-		// obtain previously generated values.
-		Set vs = (Set)generatedValues.get(dt);
-		if(vs==null) {
-			generatedValues.put(dt, vs=new java.util.HashSet() );
-			
-			// copy values from examples.
-			Iterator itr = tokens.iterator();
-			while(itr.hasNext()) {
-				String token = (String)itr.next();
-				try {// we have to be able to verify this without depending on the context.
-					if(dt.isValid(token,null))
-						vs.add(token);
-				}catch(Exception e){}
-			}
-		}
-
-		if(vs.size()<32 || random.nextBoolean() ) {
-			// we need more diversity. generate more.
-			// we have to continue producing values, especially for
-			// ID values.
-			
-			for( i=0; i<100; i++ ) {
-				s = _generate(dt,context);
-				if( s!=null && dt.isValid(s,context) ) {
-					// memorize generated values so that we can use them later.
-					vs.add(s);
-					break;	// this value is OK.
-				}
-			}
-			if(i==100) {
-				if( vs.size()==0 )
-					// we retried 10 times but failed to generate a value.
-					// and no example is available.
-					// So this situation is an absolute failure.
-					fail(dt);
-				else
-					s = (String)vs.toArray()[random.nextInt(vs.size())];
-			}
-		} else {
-			// we have enough diversity. use it.
-			s = (String)vs.toArray()[random.nextInt(vs.size())];
-		}
-		
-		return s;
-	}
-		
-	/**
-	 * actual generation.
-	 * this method can return an invalid value.
-	 */
-	protected String _generate( Datatype dt, ContextProviderImpl context ) {
-		if( dt instanceof AnyURIType ) {
-			// anyURI
-			String r;
-			do {
-				r = generateString();	// any string should work
-			}while(!dt.isValid(r,context));
-			return r;
-		}
-		
-		if( dt instanceof NonNegativeIntegerType ) {
-			long r;
-			do { r=random.nextLong(); }while(r<0);
-			return Long.toString(r);
-		}
-		
-		if( dt instanceof PositiveIntegerType ) {
-			long r;
-			do { r=random.nextLong(); }while(r<=0);
-			return Long.toString(r);
-		}
-		
-		if( dt.getClass()==UnsignedIntType.class )
-			return Long.toString( random.nextLong()&0x7FFFFFFF );
-		
-		if( dt.getClass()== ByteType.class )     return Long.toString( random.nextInt(256) );
-		if( dt.getClass()==ShortType.class )	return Long.toString( (short)random.nextInt() );
-		if( dt.getClass()==IntType.class )		return Long.toString( random.nextInt() );
-		if( dt.getClass()==LongType.class )		return Long.toString( random.nextLong() );
-		if( dt instanceof IntegerType )			return Long.toString( random.nextLong() );
-		if( dt.getClass()==StringType.class )	return generateString();
-		if( dt.getClass()==TokenType.class )	return generateString();
-		if( dt.getClass()==NormalizedStringType.class )	return generateString();
-		if( dt.getClass()==NmtokenType.class )	return generateNMTOKEN();
-		if( dt.getClass()==NcnameType.class )	return generateNCName();
-		if( dt.getClass()==NumberType.class )	return generateDecimal();
-		if( dt.getClass()==BooleanType.class )	return generateBoolean();
-        if( dt.getClass()==Base64BinaryType.class )	return generateBase64Binary();
-		if( dt instanceof FloatType || dt instanceof DoubleType )
-			return generateFloating();
-		
-		// TODO: implement this method better.
-		if( dt.getClass()==QnameType.class )	return generateNCName();
-		
-		if( dt instanceof FinalComponent )	// ignore final component
-			return generate( ((FinalComponent)dt).baseType, context );
-		
-		if( dt instanceof com.sun.msv.grammar.relax.EmptyStringType )
-			return "";
-		
-		
-		
-		// getting desparate...
-		
-		if( dt instanceof XSDatatypeImpl ) {
-			// if it contains EnumerationFacet, we can try that.
-			XSDatatypeImpl dti = (XSDatatypeImpl)dt;
-			EnumerationFacet e = (EnumerationFacet)dti.getFacetObject( XSDatatype.FACET_ENUMERATION );
-			if(e!=null) {
-				Object[] items = e.values.toArray();
-				for( int i=0; i<10; i++ ) {
-					try {
-						return dti.convertToLexicalValue(items[random.nextInt(items.length)],context);
-					} catch( Exception x ) {  }
-				}
-			}
-			
-			XSDatatype baseType = dti.getConcreteType();
-			
-			if( baseType instanceof ListType )
-				return generateList(dti,context);
-			if( baseType instanceof UnionType )
-				return generateUnion((UnionType)baseType,context);
-			
-			if( baseType!=dti )
-				return generate(baseType,context);
-		}
-		
-		// use previously generated value if such a thing exists.
-		Set vs = (Set)generatedValues.get(dt);
-		if(vs!=null && vs.size()!=0 )
-			return (String)vs.toArray()[random.nextInt(vs.size())];
-		
-		
-		return null;
-	}
-
-    private String generateBase64Binary() {
-        int len = random.nextInt(16)*4;
-        StringBuffer b = new StringBuffer(len);
-        for( int i=0; i<len; i++ )
-            b.append(random.nextInt(26)+'A');
-        return b.toString();
-    }
-
-    protected void fail( Datatype dt ) {
-		
-		throw new GenerationException("unable to generate value for this datatype: " +
-			(( dt instanceof XSDatatype )?((XSDatatype)dt).displayName():dt.toString()) );
-		
-	}
-
-	protected String generateNMTOKEN() {
-		// string
-		int len = random.nextInt(15)+1;
-		String r = "";
-		for( int i=0; i<len; i++ ) {
-			char ch;
-			do {
-				if( asciiOnly )
-					ch = (char)random.nextInt(128);
-				else
-					ch = (char)random.nextInt(Character.MAX_VALUE);
-			}while( !XmlChars.isNameChar(ch) );
-			r += ch;
-		}
-		return r;
-	}
-	
-	protected String generateUnion(UnionType ut, ContextProviderImpl context ) {
-		try {
-			return generate( ut.memberTypes[random.nextInt(ut.memberTypes.length)], context );
-		} catch( GenerationException ge ) { return null; }
-	}
-		
-	protected String generateList(XSDatatypeImpl dti, ContextProviderImpl context) {
-		try {
-			ListType base = (ListType)dti.getConcreteType();
-			LengthFacet lf = (LengthFacet)dti.getFacetObject(XSDatatype.FACET_LENGTH);
-			int n;	// compute # of items into this value.
-		
-			if(lf!=null) {
-				n = lf.length;
-			} else {
-				MaxLengthFacet xlf = (MaxLengthFacet)dti.getFacetObject(XSDatatype.FACET_MAXLENGTH);
-				int max = (xlf!=null)?xlf.maxLength:16;
-				MinLengthFacet nlf = (MinLengthFacet)dti.getFacetObject(XSDatatype.FACET_MINLENGTH);
-				int min = (nlf!=null)?nlf.minLength:0;
-				
-				n = random.nextInt(max-min)+min;
-			}
-		
-			String s="";
-			for( int i=0; i<n; i++ )
-				s += " " + generate(base.itemType,context) + " ";
-			return s;
-		} catch( GenerationException ge ) { return null; }
-	}
-	
-	protected String generateNCName() {
-		String r;
-		do {
-			r = generateNMTOKEN();
-		}while( !XmlNames.isNCName(r) );
-		return r;
-	}
-	
-	protected String generateDecimal() {
-		return random.nextLong()+"."+random.nextInt(1000);
-	}
-		
-	protected String generateBoolean() {
-		switch(random.nextInt(4)) {
-		case 0:		return "true";
-		case 1:		return "false";
-		case 2:		return "0";
-		case 3:		return "1";
-		default:	throw new Error();
-		}
-	}
-		
-	protected String generateString() {
-		// string
-		int len = random.nextInt(16);
-		String r = "";
-		for( int i=0; i<len; i++ ) {
-			char ch;
-			do {
-				if( asciiOnly )
-					ch = (char)random.nextInt(128);
-				else
-					ch = (char)random.nextInt(Character.MAX_VALUE);
-			}while( !XmlChars.isChar(ch) || Character.isISOControl(ch) );
-			r += ch;
-		}
-		return r;
-	}
-
-	protected String generateFloating() {
-		return Float.toString(random.nextFloat());
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/Driver.java b/generator/src/com/sun/msv/generator/Driver.java
deleted file mode 100644
index 7053e8f..0000000
--- a/generator/src/com/sun/msv/generator/Driver.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * @(#)$Id: Driver.java 1579 2003-07-16 20:49:53Z kohsuke $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.Random;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-import com.sun.msv.driver.textui.DebugController;
-import com.sun.msv.grammar.ElementExp;
-import com.sun.msv.grammar.Expression;
-import com.sun.msv.grammar.ExpressionPool;
-import com.sun.msv.grammar.Grammar;
-import com.sun.msv.grammar.relax.RELAXModule;
-import com.sun.msv.grammar.util.RefExpRemover;
-import com.sun.msv.grammar.xmlschema.XMLSchemaGrammar;
-import com.sun.msv.reader.dtd.DTDReader;
-import com.sun.msv.reader.util.GrammarLoader;
-import com.sun.msv.relaxns.grammar.RELAXGrammar;
-import com.sun.msv.util.StringPair;
-import com.sun.msv.verifier.Verifier;
-import com.sun.msv.verifier.regexp.ElementsOfConcernCollector;
-import com.sun.msv.verifier.regexp.REDocumentDeclaration;
-import com.sun.msv.verifier.util.ErrorHandlerImpl;
-import com.sun.msv.verifier.util.IgnoreErrorHandler;
-
-/**
- * command line driver.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class Driver {
-	
-	private static void usage() {
-		System.err.println(
-			"Sun XMLGenerator\n"+
-			"----------------\n"+
-			"Usage: XMLGenerator <options> <schema> [<output name>]\n"+
-			"Options:\n"+
-			"  -dtd      : use a DTD as a schema\n"+
-			"  -ascii    : use US-ASCII characters only\n"+
-			"  -seed <n> : set random seed\n"+
-			"  -depth <n>: set cut back depth\n"+
-			"  -width <n>: maximum number of times '*'/'+' are repeated\n" +
-			"  -n <n>    : # of files to be generated\n" +
-			"  -warning  : show warnings.\n"+
-			"  -quiet    : be quiet.\n"+
-            "  -root {<namespaceURI>}<localName>\n"+
-            "      fix the root element to the given element\n"+
-			"  -encoding <str>\n"+
-			"      output encoding (Java name)\n"+
-			"  -example <filename>\n"+
-			"      use the given file as an example. tokens found in the example\n"+
-			"      is used to generate documents\n"+
-			"  -error <n>/<m>\n"+
-			"      error ratio. generate n errors per m elemnts (average).\n"+
-			"      to control error generation, see manual for details.\n"+
-			"  -nocomment: suppress insertion of comments that indicate generated errors.\n"+
-			"\n"+
-			"  <output name> must include one '$'. '$' will be replaced by number.\n"+
-			"  e.g., test.$.xml -> test.1.xml test.2.xml test.3.xml ...\n"+
-			"  if omitted, generated file will be sent to stdout.\n"
-			);
-	}
-
-	public static void main( String[] args ) throws Exception {
-		try {
-			Driver driver = new Driver();
-			try {
-				driver.parseArguments(args);
-			} catch( CommandLineException e ) {
-                System.err.println(e.getMessage());
-				usage();
-				System.exit(-1);
-			}
-			
-			System.exit( driver.run(System.err) );
-		} catch( DataTypeGenerator.GenerationException e ) {
-			System.err.println(e.getMessage());
-		}
-	}
-	
-	protected double getRatio( String s ) {
-		int idx = s.indexOf('/');
-		double n = Double.parseDouble(s.substring(0,idx));
-		double m = Double.parseDouble(s.substring(idx+1));
-						
-		double ratio = n/m;
-						
-		if( ratio<=0 || ratio>1 ) {
-			System.err.println("error ratio out of range");
-			usage();
-			System.exit(-1);
-		}
-		return ratio;
-	}
-	
-	public Grammar grammar;
-	public String outputName=null;
-	private String encoding="UTF-8";
-	private boolean createError = false;
-	private boolean validate = true;
-	private boolean debug = false;
-	private boolean quiet = false;
-	private boolean warning = false;
-	private GeneratorOption opt = new GeneratorOption();
-	{
-		opt.random = new Random();
-	}
-	private int number = 1;
-	
-    /** designated root element name. */
-    private StringPair rootName = null;
-	
-	private SAXParserFactory factory = SAXParserFactory.newInstance();
-	{
-		factory.setNamespaceAware(true);
-		factory.setValidating(false);
-		try {
-			factory.setFeature("http://xml.org/sax/features/validation",false);
-			factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false);
-		} catch(Exception e) { ; }
-	}
-
-	private DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
-	{
-		domFactory.setNamespaceAware(true);
-		domFactory.setValidating(false);
-	}
-	
-	// this set will receive tokens found in the given examples.
-	public final Set exampleTokens = new java.util.HashSet();
-	private DataTypeGeneratorImpl dtgi = new DataTypeGeneratorImpl();
-	{
-		opt.dtGenerator = dtgi;
-		dtgi.tokens = exampleTokens;
-	}
-	
-	/** Command line argument error. */
-    private static class CommandLineException extends Exception {
-        public CommandLineException( String msg ) { super(msg); }
-    }
-    
-	/**
-	 * Parses the arguments and fill the fields accordingly.
-	 */
-    public void parseArguments( String[] args ) throws CommandLineException, ParserConfigurationException {
-		String grammarName=null;
-		boolean dtdAsSchema = false;
-
-		for( int i=0; i<args.length; i++ ) {
-			if( args[i].equalsIgnoreCase("-debug") )	// secret option
-				debug = true;
-			else
-			if( args[i].equalsIgnoreCase("-dtd") )
-				dtdAsSchema = true;
-			else
-			if( args[i].equalsIgnoreCase("-quiet") )
-				quiet = true;
-			else
-			if( args[i].equalsIgnoreCase("-warning") )
-				warning = true;
-			else
-			if( args[i].equalsIgnoreCase("-ascii") )
-				((DataTypeGeneratorImpl)opt.dtGenerator).asciiOnly = true;
-			else
-			if( args[i].equalsIgnoreCase("-nocomment") )
-				opt.insertComment = false;
-			else
-			if( args[i].equalsIgnoreCase("-depth") )
-				opt.cutBackDepth = new Integer(args[++i]).intValue();
-			else
-			if( args[i].equalsIgnoreCase("-example") ) {
-                String fileName = args[++i];
-                try {
-				    XMLReader p = factory.newSAXParser().getXMLReader();
-				    p.setContentHandler( new ExampleReader(exampleTokens) );
-				    p.parse( getInputSource(fileName) );
-                } catch( IOException e ) {
-                    throw new CommandLineException("unable to parse "+fileName+" :"+e.getMessage());
-                } catch( SAXException e ) {
-                    throw new CommandLineException("unable to parse "+fileName+" :"+e.getMessage());
-                }
-			} else
-			if( args[i].equalsIgnoreCase("-width") )
-				opt.width = new Rand.UniformRand( opt.random, new Integer(args[++i]).intValue() );
-			else
-			if( args[i].equalsIgnoreCase("-n") ) {
-				number = new Integer(args[++i]).intValue();
-				if( number<1 )	number=1;
-			}
-			else
-            if( args[i].equals("-root") ) {
-                String root = args[++i];
-                int idx = root.indexOf('}');
-                if(idx<0)
-                    // short form XXX
-                    rootName = new StringPair( "", root );
-                else
-                    // full form {XXX}YYY
-                    rootName = new StringPair( root.substring(1,idx), root.substring(idx+1) );
-            }
-            else
-			if( args[i].equalsIgnoreCase("-encoding") )
-				encoding = args[++i];
-			else
-			if( args[i].equalsIgnoreCase("-seed") )
-				opt.random.setSeed( new Long(args[++i]).longValue() );
-			else
-			if( args[i].equalsIgnoreCase("-nonvalidate") )	// secret option
-				validate = false;
-			else
-			if( args[i].startsWith("-error") ) {
-				createError = true;
-				if( args[i].equalsIgnoreCase("-error") ) {
-					opt.probGreedyChoiceError=
-					opt.probMissingAttrError=
-					opt.probMissingElemError=
-					opt.probMutatedAttrError=
-					opt.probMutatedElemError=
-					opt.probSeqError=
-					opt.probSlipInAttrError=
-					opt.probSlipInElemError=
-					opt.probMissingPlus=
-					opt.probAttrNameTypo=
-					opt.probElemNameTypo=
-						getRatio(args[++i]);
-				}
-				else
-				if( args[i].equalsIgnoreCase("-error-greedyChoice") )
-					opt.probGreedyChoiceError	= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-missingAttribute") )
-					opt.probMissingAttrError	= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-missingElement") )
-					opt.probMissingElemError	= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-mutatedAttribute") )
-					opt.probMutatedAttrError	= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-mutatedElement") )
-					opt.probMutatedElemError	= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-sequenceError") )
-					opt.probSeqError			= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-slipInAttribute") )
-					opt.probSlipInAttrError		= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-slipInElement") )
-					opt.probSlipInElemError		= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-missingPlus") )
-					opt.probMissingPlus			= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-attributeNameTypo") )
-					opt.probAttrNameTypo		= getRatio(args[++i]);
-				else
-				if( args[i].equalsIgnoreCase("-error-attributeNameTypo") )
-						opt.probElemNameTypo	= getRatio(args[++i]);
-				else
-					throw new CommandLineException("unrecognized option :" + args[i]);
-				
-			}
-			else {
-				if( args[i].charAt(0)=='-' )
-					throw new CommandLineException("unrecognized option :" + args[i]);
-					
-				if( grammarName==null )	grammarName = args[i];
-				else
-				if( outputName==null ) outputName = args[i];
-				else
-                    throw new CommandLineException("too many parameters");
-			}
-		}
-		
-		
-		if(grammarName!=null) {
-			// load a schema
-			if(!quiet)
-				System.err.println("parsing a grammar: "+grammarName);
-		
-			InputSource is = getInputSource(grammarName);
-		
-            try {
-			    if(dtdAsSchema) {
-			    	grammar = DTDReader.parse(
-			    		is,
-			    		new DebugController(warning,quiet),
-			    		new ExpressionPool());
-			    } else {
-			    	grammar = GrammarLoader.loadSchema(
-			    		is,
-			    		new DebugController(warning,quiet),
-			    		factory);
-			    }
-            } catch( IOException e ) {
-                throw new CommandLineException("unable to parse "+grammarName+" :"+e.getMessage());
-            } catch( SAXException e ) {
-                throw new CommandLineException("unable to parse "+grammarName+" :"+e.getMessage());
-            }
-		}
-	}
-	
-	/**
-	 * Generate XML instances.
-	 * 
-	 * @return 0 if it run successfully. Non-zero if any error is encountered.
-	 */
-	public int run( PrintStream out ) throws Exception {
-		
-		if( grammar==null ) {
-			usage();
-			return -1;
-		}
-		
-		
-		Expression topLevel  = grammar.getTopLevel();
-		
-		// polish up this AGM for instance generation.
-		if( grammar instanceof RELAXGrammar
-		||  grammar instanceof RELAXModule )
-			topLevel = topLevel.visit( new NoneTypeRemover(grammar.getPool()) );
-		
-		if( grammar instanceof XMLSchemaGrammar )
-			topLevel = topLevel.visit( new SchemaLocationRemover(grammar.getPool()) );
-		
-	
-		topLevel = topLevel.visit( new RefExpRemover(grammar.getPool(),true) );
-        
-        if(rootName!=null) {
-            topLevel = findElement(topLevel,rootName);
-            if(topLevel==null) {
-                out.println("unable to find the specified root element: "+rootName);
-                return -1;
-            }
-        }
-        
-		opt.pool = grammar.getPool();
-		
-		// generate instances
-		//===========================================
-		for( int i=0; i<number; i++ ) {
-			if(!quiet) {
-				if(number<=10 )	out.println("generating document #"+(i+1));
-				else			out.print(">");
-			}
-			
-			org.w3c.dom.Document dom;
-			int retry=0;
-			
-			while(true) {
-				dom = domFactory.newDocumentBuilder().newDocument();
-				Generator.generate(topLevel,dom,opt);
-				
-				if(!validate)		break;
-				
-				// check the validity of generated document.
-				DOM2toSAX2 d2s = new DOM2toSAX2();
-				Verifier v = new Verifier(
-					new REDocumentDeclaration(grammar),
-					debug?
-						(ErrorHandler)new ErrorHandlerImpl():
-						(ErrorHandler)new IgnoreErrorHandler() );
-				d2s.setContentHandler(v);
-				d2s.traverse(dom);
-				
-				if( createError && !v.isValid() )	break;
-				if( !createError && v.isValid() )	break;
-				
-				// do it again
-				if( retry++ == 100 ) {
-					out.println("unable to generate a proper instance.");
-					return -1;
-				}
-			}
-		
-			// serialize it
-			OutputStream os;
-			if( outputName==null )		os = System.out;	// in case no output file name is specified
-			else {
-				int idx = outputName.indexOf('$');
-				if( idx!=-1 ) {
-					String s = Integer.toString(i);
-					for( int j=s.length(); j<Integer.toString(number-1).length(); j++ )
-						s = "0"+s;
-					
-					os = new FileOutputStream( outputName.substring(0,idx)+s+outputName.substring(idx+1) );
-				}
-				else
-					os = new FileOutputStream( outputName );
-			}
-			
-			DOMDecorator.decorate(dom);
-			
-			// write generated instance.
-			XMLSerializer s = new XMLSerializer( os, new OutputFormat("XML",encoding,true) );
-			s.serialize(dom);
-			
-			if( os!=System.out )	os.close();
-		}
-
-		out.println();
-		
-		return 0;
-	}
-	
-    private Expression findElement( Expression exp, StringPair name ) {
-        
-        Vector vec = new Vector();
-        new ElementsOfConcernCollector().collect( exp, vec );
-        
-        for( int i=0; i<vec.size(); i++ ) {
-            ElementExp eexp = (ElementExp)vec.get(i);
-            if(eexp.getNameClass().accepts(name))
-                return eexp;
-        }
-        
-        return null;
-    }
-    
-	private static InputSource getInputSource( String fileOrURL ) {
-		try {
-			// try it as a file
-			String path = new File(fileOrURL).getAbsolutePath();
-			if (File.separatorChar != '/')
-				path = path.replace(File.separatorChar, '/');
-			if (!path.startsWith("/"))
-				path = "/" + path;
-//			if (!path.endsWith("/") && isDirectory())
-//				path = path + "/";
-			return new InputSource( new URL("file", "", path).toExternalForm() );
-		} catch( Exception e ) {
-			// try it as an URL
-			return new InputSource(fileOrURL);
-		}
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/ElementDeclCollector.java b/generator/src/com/sun/msv/generator/ElementDeclCollector.java
deleted file mode 100644
index 6b6510b..0000000
--- a/generator/src/com/sun/msv/generator/ElementDeclCollector.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * @(#)$Id: ElementDeclCollector.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Set;
-
-import com.sun.msv.grammar.AttributeExp;
-import com.sun.msv.grammar.ConcurExp;
-import com.sun.msv.grammar.ElementExp;
-import com.sun.msv.grammar.Expression;
-import com.sun.msv.grammar.util.ExpressionWalker;
-
-/**
- * collects all distinct element declaration in the grammar.
- * As a side effect, it also collects all distinct attribute declarations.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class ElementDeclCollector extends ExpressionWalker {
-	public void onConcur( ConcurExp exp ) {
-		throw new Error("concur is not supported");
-	}
-	
-	private final Set elements = new java.util.HashSet();
-	public void onElement( ElementExp exp ) {
-		if( elements.contains(exp) )	return;	// prevent infinite recursion
-		elements.add(exp);
-		super.onElement(exp);
-	}
-	
-	private final Set attributes = new java.util.HashSet();
-	public void onAttribute( AttributeExp exp ) {
-		attributes.add(exp);
-		super.onAttribute(exp);
-	}
-	
-	private ElementDeclCollector(){}
-	
-	/**
-	 * collects all element and attribute declarations.
-	 * 
-	 * @return
-	 *		r[0] : set of all distinct ElementExps.<br>
-	 *		r[1] : set of all distinct AttributeExps.
-	 */
-	public static Set[] collect( Expression exp ) {
-		Set[] r = new Set[2];
-		ElementDeclCollector col = new ElementDeclCollector();
-		exp.visit(col);
-		
-		r[0] = col.elements;
-		r[1] = col.attributes;
-		return r;
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/ExampleReader.java b/generator/src/com/sun/msv/generator/ExampleReader.java
deleted file mode 100644
index 0834db8..0000000
--- a/generator/src/com/sun/msv/generator/ExampleReader.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * @(#)$Id: ExampleReader.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Set;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * collects all string literals appeared in the text.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class ExampleReader extends DefaultHandler {
-	
-	private Set tokens;
-	
-	public ExampleReader( Set s ) {
-		tokens = s;
-	}
-	
-	public void characters( char[] buf, int start, int len ) {
-		tokens.add( new String(buf,start,len) );
-	}
-	public void startElement( String uri, String local, String qname, Attributes at ) {
-		int len = at.getLength();
-		for( int i=0; i<len; i++ )
-			tokens.add( at.getValue(i) );
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/Generator.java b/generator/src/com/sun/msv/generator/Generator.java
deleted file mode 100644
index 77b3dfc..0000000
--- a/generator/src/com/sun/msv/generator/Generator.java
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * @(#)$Id: Generator.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import org.relaxng.datatype.Datatype;
-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.Text;
-
-import com.sun.msv.datatype.xsd.NmtokenType;
-import com.sun.msv.datatype.xsd.StringType;
-import com.sun.msv.datatype.xsd.XSDatatype;
-import com.sun.msv.grammar.AttributeExp;
-import com.sun.msv.grammar.BinaryExp;
-import com.sun.msv.grammar.ChoiceExp;
-import com.sun.msv.grammar.ConcurExp;
-import com.sun.msv.grammar.DataExp;
-import com.sun.msv.grammar.ElementExp;
-import com.sun.msv.grammar.Expression;
-import com.sun.msv.grammar.ExpressionPool;
-import com.sun.msv.grammar.ExpressionVisitorVoid;
-import com.sun.msv.grammar.InterleaveExp;
-import com.sun.msv.grammar.ListExp;
-import com.sun.msv.grammar.MixedExp;
-import com.sun.msv.grammar.NameClass;
-import com.sun.msv.grammar.OneOrMoreExp;
-import com.sun.msv.grammar.OtherExp;
-import com.sun.msv.grammar.ReferenceExp;
-import com.sun.msv.grammar.SequenceExp;
-import com.sun.msv.grammar.ValueExp;
-import com.sun.msv.grammar.util.ExpressionPrinter;
-import com.sun.msv.util.StringPair;
-import com.sun.xml.util.XmlChars;
-
-/**
- * generates an XML DOM instance that conforms to the given schema.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class Generator implements ExpressionVisitorVoid {
-	
-	/** generation parameters */
-	private final GeneratorOption opts;
-	private final ExpressionPool pool;
-	private final Document domDoc;
-	/** current generated node */
-	private Node node;
-	
-	/** current nest level (depth of elements). */
-	private int depth = 0;
-	
-	/** this flag is set to true once an error is generated. */
-	private boolean errorGenerated = false;
-
-	/** returns true if generator should cut back. */
-	protected boolean cutBack() { return depth>5; }
-	
-	/** ID tokens that are used */
-	private final Set ids = new HashSet();
-	/** Text nodes of IDREFs that should be "patched" by IDs. */
-	private final Set idrefs = new HashSet();
-	
-	/** all ElementExps in the grammar. */
-	private final ElementExp[] elementDecls;
-	/** all AttributeExps in the grammar. */
-	private final AttributeExp[] attributeDecls;
-	
-	/** generates instance by using default settings. */
-	public static void generate( Expression exp, Document emptyDoc ) {
-		generate( exp, emptyDoc, new GeneratorOption() );
-	}
-	
-	/** generates instance by custom settings. */
-	public static void generate( Expression exp, Document emptyDoc, GeneratorOption opts ) {
-		Generator g;
-		
-		for( int i=0; i<10; i++ ) {
-			// make it empty.
-			while( emptyDoc.hasChildNodes())
-				emptyDoc.removeChild(emptyDoc.getFirstChild());
-			
-			do {
-				while( emptyDoc.getFirstChild()!=null ) // delete any existing children
-					emptyDoc.removeChild( emptyDoc.getFirstChild() );
-				
-				g = new Generator(exp,emptyDoc,opts);
-				exp.visit(g);
-				// if error ratio is specified and no error is generated, do it again.
-			}while( !g.errorGenerated && opts.errorSpecified() );
-		
-		
-			Object[] ids = g.ids.toArray();
-			if( ids.length==0 && g.idrefs.size()!=0 )
-				continue;	// IDREF is generated but no ID is generated.
-							// try again.
-		
-			// patch IDREF.
-			Iterator itr = g.idrefs.iterator();
-			while( itr.hasNext() ) {
-				Text node = (Text)itr.next();
-				node.setData( (String)ids[opts.random.nextInt(ids.length)] );
-			}
-			return;
-		}
-		
-		throw new Error("no ID");
-	}
-	
-	protected Generator( Expression exp, Document emptyDoc, GeneratorOption opts ) {
-		opts.fillInByDefault();
-		this.opts = opts;
-		this.pool = opts.pool;
-		node = domDoc = emptyDoc;
-		
-		// collect element and attribute decls.
-		Set[] s= ElementDeclCollector.collect(exp);
-		elementDecls = new ElementExp[s[0].size()];
-		s[0].toArray(elementDecls);
-		attributeDecls = new AttributeExp[s[1].size()];
-		s[1].toArray(attributeDecls);
-	}
-	
-	/** annotate DOM by adding a comment that an error is generated. */
-	private void noteError( String error ) {
-		errorGenerated = true;
-		if( !opts.insertComment )	return;
-		
-		Node com = domDoc.createComment("  "+error+"  ");
-		
-		Node n = node;
-		if( n.getNodeType()==Node.ATTRIBUTE_NODE ) {
-			n = ((Attr)n).getOwnerElement();
-			n.insertBefore( com, n.getFirstChild() );
-		} else {
-			n.appendChild(com);
-		}
-	}
-	
-	
-	public void onEpsilon() {}
-	public void onNullSet() { throw new Error(); }	// assertion failed
-	
-	public void onSequence( SequenceExp exp ) {
-		if(!(exp.exp1 instanceof AttributeExp)
-		&& !(exp.exp2 instanceof AttributeExp) ) {
-			// sequencing error of attribute is meaningless.
-			if( opts.random.nextDouble() < opts.probSeqError ) {
-				// generate sequencing error
-				noteError("swap sequence to "+
-						  ExpressionPrinter.printSmallest(exp.exp2)+","+
-						  ExpressionPrinter.printSmallest(exp.exp1) );
-				exp.exp2.visit(this);
-				exp.exp1.visit(this);
-				return;
-			}
-		}
-		
-		// generate valid instance.
-		exp.exp1.visit(this);
-		exp.exp2.visit(this);
-	}
-	
-	public void onInterleave( InterleaveExp ip ) {
-		// collect children
-		Vector vec = getChildren(ip);
-		
-		Node old = node;
-		// generate XML fragment for each child.
-		for( int i=0; i<vec.size(); i++ ) {
-			node = domDoc.createElement("dummy");
-			((Expression)vec.get(i)).visit(this);
-			
-			vec.set(i,node);
-		}
-		node = old;
-		
-		// interleave them.
-		while( vec.size()!=0 ) {
-			int idx = opts.random.nextInt(vec.size());
-			Element e = (Element)vec.get(idx);
-			if(!e.hasChildNodes()) {
-				// this one has no more child.
-				vec.remove(idx);
-				
-				// copy attributes
-				// note that removing an attribute
-				// will change the index of the rest.
-				NamedNodeMap m = e.getAttributes();
-				for( int i=0; i<m.getLength(); i++ ) {
-					Attr a = (Attr)m.item(0);
-					
-					// due to the bug(?) of DOM (or Xercs), we cannot use
-					// removeAttributeNode.
-					e.removeAttributeNS(a.getNamespaceURI(),a.getLocalName());
-					
-					if( !((Element)node).hasAttribute(a.getName()) )
-						// due to the error generation, two attributes may collide.
-						((Element)node).setAttributeNodeNS(a);
-				}
-				
-				continue;
-			}
-			node.appendChild( e.getFirstChild() );
-		}
-	}
-	
-	public void onChoice( ChoiceExp cp ) {
-		// "A*" is modeled as (epsilon|A+)
-		if( cp.exp1==Expression.epsilon && cp.exp2 instanceof OneOrMoreExp ) {
-			onZeroOrMore( (OneOrMoreExp)cp.exp2 );
-			return;
-		}
-		if( cp.exp2==Expression.epsilon && cp.exp1 instanceof OneOrMoreExp ) {
-			onZeroOrMore( (OneOrMoreExp)cp.exp1 );
-			return;
-		}
-		
-		if( cutBack() && cp.isEpsilonReducible() )	return;	// cut back
-		
-		
-		// gather candidates
-		Vector vec = getChildren(cp);
-
-		if( opts.random.nextDouble() < opts.probGreedyChoiceError ) {
-			// greedy choice error. visit twice.
-			Expression[] es = new Expression[2];
-			for( int i=0; i<2; i++ )
-				do {
-					es[i] = (Expression)vec.get(opts.random.nextInt(vec.size()));
-				}while(es[i]==Expression.epsilon);
-
-			noteError("greedy choice "+
-					  ExpressionPrinter.printSmallest(es[0])+ " & "+
-					  ExpressionPrinter.printSmallest(es[1]));
-			
-			for( int i=0; i<2; i++ )
-				es[i].visit(this);
-			return;
-		}
-		
-		// randomly select one candidate.
-		((Expression)vec.get(opts.random.nextInt(vec.size()))).visit(this);
-	}
-	
-	public void onMixed( MixedExp exp ) {
-		// convert it to interleave so that we can generate some pcdata.
-		pool.createInterleave(
-			pool.createZeroOrMore(Expression.anyString),
-			exp.exp ).visit(this);
-	}
-	
-	public void onList( ListExp exp ) {
-		Node oldNode = node;
-		
-		Element child = domDoc.createElement("dummy");
-		node = child;
-		
-		// generate children
-		exp.exp.visit(this);
-		
-		// several TextNode should have been appended to Element.
-		// so copy them to the parent with separators.
-		Node text;
-		while( (text = node.getFirstChild())!=null ) {
-			// append a delimiter
-			oldNode.appendChild( domDoc.createTextNode(" ") );
-			// append a token
-			node.removeChild(text);
-			oldNode.appendChild(text);
-		}
-	}
-	
-	public void onRef( ReferenceExp exp ) {
-		exp.exp.visit(this);
-	}
-	
-	public void onOther( OtherExp exp ) {
-		exp.exp.visit(this);
-	}
-	
-	public void onAttribute( AttributeExp exp ) {
-		if( opts.random.nextDouble() < opts.probMutatedAttrError ) {
-			// mutated element error. generate a random attribute and ignore this declaration.
-			noteError("mutated attribute "+exp.nameClass);
-			onAttribute( attributeDecls[opts.random.nextInt(attributeDecls.length)] );
-			return;
-		}
-		
-		if( opts.random.nextDouble() < opts.probMissingAttrError ) {
-			// missing attribute error. skip generating this instance.
-			noteError("missing attribute "+exp.nameClass);
-			return;
-		}
-		
-		if( opts.random.nextDouble() < opts.probSlipInAttrError ) {
-			// slip-in error. generate random attribute.
-			AttributeExp a = attributeDecls[opts.random.nextInt(attributeDecls.length)];
-			noteError("slip-in attribute "+a.nameClass);
-			onAttribute( a );
-		}
-		
-		
-		// generate attribute name
-		StringPair name;
-		int retry=0;
-		do {
-			name = getName(exp.nameClass);
-		}while( ((Element)node).getAttributeNodeNS(name.namespaceURI,name.localName)!=null
-			&&  retry++<100/*abort after several retries*/ );
-
-		if( opts.random.nextDouble() < opts.probAttrNameTypo ) {
-			noteError("attribute name typo: "+name.localName);
-			name = generateTypo(name);
-		}
-		
-		// It is possible
-		// that this attribute is already added as a result of
-		// generating an error.
-		Attr a = domDoc.createAttributeNS( name.namespaceURI, name.localName );
-		((Element)node).setAttributeNodeNS(a);
-
-		Node old = node;
-		node = a;
-		exp.exp.visit(this);	// generate attribute value
-		node = old;
-	}
-	
-	public void onElement( ElementExp exp ) {
-		
-		if( node instanceof Document && ((Document)node).getDocumentElement()!=null ) {
-			// document has the root element. so abort.
-			return;
-		}
-		
-		if( opts.random.nextDouble() < opts.probMutatedElemError ) {
-			// mutated element error. generate a random element and ignore this declaration.
-			noteError("mutated element");
-			onElement( elementDecls[opts.random.nextInt(elementDecls.length)] );
-			return;
-		}
-				
-		if( node.getNodeType()!=Node.DOCUMENT_NODE ) {
-			// these errors cannot be generated for the document element
-			if( opts.random.nextDouble() < opts.probMissingElemError ) {
-				// missing element error. skip generating this instance.
-				noteError("missing element: "+ExpressionPrinter.printSmallest(exp) );
-				return;
-			}
-		
-			if( opts.random.nextDouble() < opts.probSlipInElemError ) {
-				// slip-in error. generate random element.
-				ElementExp e = elementDecls[opts.random.nextInt(elementDecls.length)];
-				noteError("slip-in element: "+ExpressionPrinter.printSmallest(e) );
-				onElement( e );
-			}
-		}
-		
-		StringPair name = getName(exp.getNameClass());
-
-		if( opts.random.nextDouble() < opts.probElemNameTypo ) {
-			noteError("element name typo: "+name.localName);
-			name = generateTypo(name);
-		}
-		
-		Element child = domDoc.createElementNS( name.namespaceURI, name.localName );
-		node.appendChild( child );
-		node = child;
-		
-		// generate children
-		depth++;
-		exp.contentModel.visit(this);
-		depth--;
-		
-		node = child.getParentNode();
-	}
-	
-	public void onAnyString() {
-		node.appendChild( domDoc.createTextNode(opts.dtGenerator.generate(StringType.theInstance,getContext())) );
-	}
-	
-	public void onOneOrMore( OneOrMoreExp exp ) {
-		if( opts.random.nextDouble() < opts.probMissingPlus ) {
-			noteError("missing " + ExpressionPrinter.printSmallest(exp) );
-			return;
-		}
-		
-		int m = opts.width.next()+1;
-		if( cutBack() )	m=1;
-		for( int i=0; i<m; i++ )
-			exp.exp.visit(this);
-	}
-	
-	public void onZeroOrMore( OneOrMoreExp exp ) {
-		int m = opts.width.next();
-		if( cutBack() )	m=0;
-		for( int i=0; i<m; i++ )
-			exp.exp.visit(this);
-	}
-	
-	public void onValue( ValueExp exp ) {
-		String text;
-		if( exp.dt instanceof XSDatatype ) {
-			XSDatatype xsd = (XSDatatype)exp.dt;
-			text = xsd.convertToLexicalValue(exp.value,getContext());
-		} else {
-			text = exp.value.toString();
-			if(!exp.dt.sameValue( exp.value, exp.dt.createValue(text,getContext()) ) )
-				throw new Error("unable to produce a value for the datatype:"+exp.name);
-		}
-		
-		node.appendChild( domDoc.createTextNode(text) );
-		return;
-	}
-	public void onData( DataExp exp ) {
-		String value;
-		if( exp.dt==com.sun.msv.datatype.xsd.IDType.theInstance ) {
-			do {
-				value = opts.dtGenerator.generate(NmtokenType.theInstance,getContext());
-			}while( ids.contains(value) );
-			ids.add(value);
-		}
-		else
-		if( exp.dt.getIdType()==Datatype.ID_TYPE_IDREF
-		||  exp.dt.getIdType()==Datatype.ID_TYPE_IDREFS ) {
-			Node n = domDoc.createTextNode("{TmpIDRef}");
-			node.appendChild(n);
-			idrefs.add(n); // memorize this node so that we can patch it later.
-			return;
-		} else {
-			value = opts.dtGenerator.generate(exp.dt,getContext());
-		}
-		
-		node.appendChild( domDoc.createTextNode(value) );
-	}
-	
-	public void onConcur( ConcurExp exp ) {
-		throw new Error("concur is not supported");
-	}
-	
-	protected ContextProviderImpl getContext() {
-		Node n = node;
-		while(!(n instanceof Element) && n!=null) {
-			if(n instanceof Attr)
-				n = ((Attr)n).getOwnerElement();
-			else
-				n = n.getParentNode();
-		}
-		if(n==null)		throw new Error();	// impossible
-		return new ContextProviderImpl((Element)n);
-	}
-	
-	/** generaets a name that satisfies given NameClass */
-	private StringPair getName( NameClass nc ) {
-		StringPair name = opts.nameGenerator.generate(nc);
-		
-		if( !nc.accepts( name.namespaceURI, name.localName ) )
-			throw new Error();	// invalid
-		
-		return name;
-	}
-	
-	
-	/** enumerates children of BinaryExp into a vector. */
-	private Vector getChildren( BinaryExp exp ) {
-		final Vector vec = new Vector();
-		Iterator itr = exp.children();
-		while( itr.hasNext() )	vec.add( itr.next() );
-		return vec;
-	}
-
-	/**
-	 * generates 'typo'.
-	 */
-	protected StringPair generateTypo( StringPair pair ) {
-		// in this implementation, typo is made only to localName.
-		StringBuffer buf = new StringBuffer(pair.localName);
-		
-		int idx = opts.random.nextInt(buf.length());
-		
-		char ch = buf.charAt(idx);
-		if( XmlChars.isNCNameChar((char)(ch-1)) )
-			ch = (char)(ch-1);
-		else
-		if( XmlChars.isNCNameChar((char)(ch+1)) )
-			ch = (char)(ch+1);
-		else
-		do
-		{
-			ch = (char)opts.random.nextInt();
-		}while(!XmlChars.isNCNameChar(ch));
-		
-		buf.setCharAt( idx, ch );
-		
-		return new StringPair(pair.namespaceURI,buf.toString());
-	}
-	
-}
diff --git a/generator/src/com/sun/msv/generator/GeneratorOption.java b/generator/src/com/sun/msv/generator/GeneratorOption.java
deleted file mode 100644
index 71e0581..0000000
--- a/generator/src/com/sun/msv/generator/GeneratorOption.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * @(#)$Id: GeneratorOption.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Random;
-
-import com.sun.msv.grammar.ExpressionPool;
-
-/**
- * set of options that controls generation behavior.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class GeneratorOption
-{
-	/** random number generator. */
-	public Random random;
-	
-	/**
-	 * if the generated element exceeds this depth,
-	 * the generator tries to cut back.
-	 */
-	public int cutBackDepth = 0;
-	
-	/**
-	 * this object is responsible to calculate how many times '*' or '+' is repeated.
-	 */
-	public Rand width;
-
-	public NameGenerator nameGenerator;
-	public DataTypeGenerator dtGenerator;
-	
-	public ExpressionPool pool;
-	
-	/**
-	 * probability of "sequencing error" per # of sequences.
-	 * 0: no error, 1.0: error at every occurence of sequence.
-	 * 
-	 * sequencing error is to generate B,A where its content model is A,B.
-	 */
-	public double probSeqError = 0;
-	
-	/**
-	 * probability of "missing element error" per # of elements.
-	 * Missing element error is to generate epsilon where its content model is A.
-	 */
-	public double probMissingElemError = 0;
-	
-	/**
-	 * probability of "missing plus error" per # of '+' operator.
-	 * Missing plus error is to generate epsilon where the content model is A+.
-	 * Similar to "missing element error"
-	 */
-	public double probMissingPlus = 0;
-	
-	/**
-	 * probability of "slip-in element error" per # of elements.
-	 * 
-	 * slip-in element error is to generate a random element before valid element X.
-	 */
-	public double probSlipInElemError = 0;
-
-	/**
-	 * probability of "mutated element error" per # of elements.
-	 * 
-	 * mutated element error is to replace a valid element by a random element.
-	 * Or this error can be considered as combination of "missing element error"
-	 * and "slip-in element error".
-	 */
-	public double probMutatedElemError = 0;
-	
-	/**
-	 * probability of "missing attribute error" per # of attributes.
-	 */
-	public double probMissingAttrError = 0;
-	
-	/**
-	 * probability of "slip-in attribute error" per # of attributes.
-	 * 
-	 * slip-in attribute error is to generate a random attribute before valid attribute X.
-	 */
-	public double probSlipInAttrError = 0;
-
-	/**
-	 * probability of "mutated attribute error" per # of attributes.
-	 * 
-	 * mutated attribute error is to replace a valid attribute by a random attribute.
-	 * Or this error can be considered as combination of "missing attribute error"
-	 * and "slip-in attribute error".
-	 */
-	public double probMutatedAttrError = 0;
-	
-	/**
-	 * probability of "greedy choice error" per # of choice.
-	 * 
-	 * greedy choice error is to generate A,B (or B,A) where its content model is (A|B).
-	 */
-	public double probGreedyChoiceError = 0;
-	
-	/**
-	 * probability of "element name typo" per # of elements.
-	 */
-	public double probElemNameTypo = 0;
-	
-	/**
-	 * probability of "attribute name typo" per # of attributes.
-	 */
-	public double probAttrNameTypo = 0;
-	
-	/**
-	 * if set to true, comments are inserted whenever an error is generated.
-	 */
-	public boolean insertComment = true;
-	
-	/**
-	 * fills unspecified parameters by default values.
-	 */
-	public void fillInByDefault()
-	{
-		if( random==null )			random = new Random();
-		if( cutBackDepth==0 )		cutBackDepth=5;
-		if( width==null )			width = new Rand.UniformRand( random, 3 );
-		if( nameGenerator==null )	nameGenerator = new NameGenerator(random);
-		if( dtGenerator==null )		dtGenerator = new DataTypeGeneratorImpl();
-		if( pool==null )			pool = new ExpressionPool();
-	}
-	
-	public boolean errorSpecified()
-	{
-		return probGreedyChoiceError!=0
-			|| probMissingAttrError!=0
-			|| probMissingElemError!=0
-			|| probMissingPlus!=0
-			|| probMutatedAttrError!=0
-			|| probMutatedElemError!=0
-			|| probSeqError!=0
-			|| probSlipInAttrError!=0
-			|| probSlipInElemError!=0;
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/NameGenerator.java b/generator/src/com/sun/msv/generator/NameGenerator.java
deleted file mode 100644
index 400cd0f..0000000
--- a/generator/src/com/sun/msv/generator/NameGenerator.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * @(#)$Id: NameGenerator.java 1581 2003-07-18 22:10:51Z kohsuke $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Iterator;
-import java.util.Random;
-import java.util.Set;
-
-import com.sun.msv.grammar.AnyNameClass;
-import com.sun.msv.grammar.ChoiceNameClass;
-import com.sun.msv.grammar.DifferenceNameClass;
-import com.sun.msv.grammar.NameClass;
-import com.sun.msv.grammar.NameClassVisitor;
-import com.sun.msv.grammar.NamespaceNameClass;
-import com.sun.msv.grammar.NotNameClass;
-import com.sun.msv.grammar.SimpleNameClass;
-import com.sun.msv.util.StringPair;
-
-/**
- * generates a namespaceURI/localName pair that satisfies given {@link NameClass}
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-class NameGenerator {
-	
-	private final Random random;
-	NameGenerator( Random random ) { this.random = random; }
-	
-	
-	
-	public StringPair generate( NameClass nc ) {
-		if( nc instanceof SimpleNameClass ) {
-			// 90% is SimpleNameClass. So this check makes
-			// the computation faster.
-			return new StringPair(
-				((SimpleNameClass)nc).namespaceURI,
-				((SimpleNameClass)nc).localName );
-        }
-		
-		final String MAGIC = ".";
-		final Set possibleNames = new java.util.HashSet();
-		
-		// collect possible names
-		nc.visit( new NameClassVisitor(){
-			public Object onNsName( NamespaceNameClass nc ) {
-				possibleNames.add( new StringPair(nc.namespaceURI, MAGIC) );
-				return null;
-			}
-	
-			public Object onSimple( SimpleNameClass nc ) {
-				possibleNames.add( new StringPair(nc.namespaceURI, nc.localName) );
-				return null;
-			}
-	
-			public Object onAnyName( AnyNameClass nc ){
-				possibleNames.add( new StringPair(MAGIC, MAGIC) );
-				return null;
-			}
-	
-			public Object onChoice( ChoiceNameClass nc ) {
-				nc.nc1.visit(this);
-				nc.nc2.visit(this);
-				return null;
-			}
-	
-			public Object onNot( NotNameClass nc ) {
-				possibleNames.add( new StringPair(MAGIC, MAGIC) );
-				nc.child.visit(this);
-				return null;
-			}
-	
-			public Object onDifference( DifferenceNameClass nc ) {
-				nc.nc1.visit(this);
-				nc.nc2.visit(this);
-				return null;
-			}
-		});
-		
-		// remove failed items
-		Iterator itr = possibleNames.iterator();
-		while( itr.hasNext() ) {
-			StringPair p = (StringPair)itr.next();
-			if( !nc.accepts( p.namespaceURI, p.localName ) )
-				itr.remove();
-		}
-		
-		if( possibleNames.size()==0 )
-			throw new Error("name class that accepts nothing");
-		
-		// randomly pick one.
-		StringPair model = (StringPair)
-			possibleNames.toArray()[ random.nextInt(possibleNames.size()) ];
-		
-		StringPair answer;
-		do {
-			// expand wild card
-			answer = new StringPair(
-				model.namespaceURI==MAGIC?getRandomURI():model.namespaceURI,
-				model.localName==MAGIC?getRandomName():model.localName );
-		}while( !nc.accepts(answer.namespaceURI,answer.localName) );
-		
-		return answer;
-	}
-	
-	private String getRandomName() {
-		int len = random.nextInt(8)+2;
-		StringBuffer tagName = new StringBuffer();
-		for( int i=0; i<len; i++ )
-			tagName.append( (char)('A'+random.nextInt(26)) );
-		return tagName.toString();
-	}
-	
-	private String getRandomURI() {
-		// TODO: should be better implemented
-		return getRandomName();
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/NoneTypeRemover.java b/generator/src/com/sun/msv/generator/NoneTypeRemover.java
deleted file mode 100644
index 8d2c2bc..0000000
--- a/generator/src/com/sun/msv/generator/NoneTypeRemover.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * @(#)$Id: NoneTypeRemover.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Set;
-
-import com.sun.msv.grammar.AttributeExp;
-import com.sun.msv.grammar.DataExp;
-import com.sun.msv.grammar.ElementExp;
-import com.sun.msv.grammar.Expression;
-import com.sun.msv.grammar.ExpressionCloner;
-import com.sun.msv.grammar.ExpressionPool;
-import com.sun.msv.grammar.OtherExp;
-import com.sun.msv.grammar.ReferenceExp;
-import com.sun.msv.grammar.relax.NoneType;
-
-/**
- * removes "none" type of RELAX from AGM.
- * 
- * "none" type is harmful for instance generation. This visitor changes
- * "none" type to nullSet.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class NoneTypeRemover extends ExpressionCloner {
-	
-	/** set of visited ElementExps */
-	private final Set visitedElements = new java.util.HashSet();
-	
-	public NoneTypeRemover( ExpressionPool pool ) { super(pool); }
-	
-	public Expression onElement( ElementExp exp ) {
-		// this check is necessary to prevent infinite recursion.
-		if( visitedElements.contains(exp) )	return exp;
-		visitedElements.add(exp);
-		exp.contentModel = exp.contentModel.visit(this);
-		return exp;
-	}
-	
-	public Expression onAttribute( AttributeExp exp ) {
-		Expression content = exp.exp.visit(this);
-		if( content==Expression.nullSet )
-			return Expression.epsilon;
-		else
-			return pool.createAttribute( exp.nameClass, content );
-	}
-	
-	public Expression onData( DataExp exp ) {
-		if( exp.dt == NoneType.theInstance )	return Expression.nullSet;
-		else									return exp;
-	}
-	public Expression onRef( ReferenceExp exp ) {
-		exp.exp = exp.exp.visit(this);
-		return exp;
-	}
-	public Expression onOther( OtherExp exp ) {
-		return exp.exp.visit(this);
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/Rand.java b/generator/src/com/sun/msv/generator/Rand.java
deleted file mode 100644
index 66798a8..0000000
--- a/generator/src/com/sun/msv/generator/Rand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * @(#)$Id: Rand.java 517 2001-05-09 21:09:03Z Bear $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Random;
-
-/**
- * creates random integer.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface Rand
-{
-	int next();
-	
-	/**
-	 * uniform distribution of [0,x).
-	 * 
-	 * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
-	 */
-	public static class UniformRand implements Rand
-	{
-		private final Random rand;
-		private int max;
-		
-		public UniformRand( Random rand, int max ) {
-			this.rand = rand;
-			this.max = max;
-		}
-		public int next() {
-			return rand.nextInt(max);
-		}
-	}
-}
diff --git a/generator/src/com/sun/msv/generator/SchemaLocationRemover.java b/generator/src/com/sun/msv/generator/SchemaLocationRemover.java
deleted file mode 100644
index 7930752..0000000
--- a/generator/src/com/sun/msv/generator/SchemaLocationRemover.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * @(#)$Id: SchemaLocationRemover.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package com.sun.msv.generator;
-
-import java.util.Set;
-
-import com.sun.msv.grammar.AttributeExp;
-import com.sun.msv.grammar.ElementExp;
-import com.sun.msv.grammar.Expression;
-import com.sun.msv.grammar.ExpressionCloner;
-import com.sun.msv.grammar.ExpressionPool;
-import com.sun.msv.grammar.OtherExp;
-import com.sun.msv.grammar.ReferenceExp;
-
-/**
- * removes "xsi:schemaLocation" from AGM.
- * 
- * Because we don't want to see those attributes in generated instances.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class SchemaLocationRemover extends ExpressionCloner {
-	
-	/** set of visited ElementExps */
-	private final Set visitedElements = new java.util.HashSet();
-	
-	public SchemaLocationRemover( ExpressionPool pool ) { super(pool); }
-	
-	public Expression onElement( ElementExp exp ) {
-		// this check is necessary to prevent infinite recursion.
-		if( visitedElements.contains(exp) )	return exp;
-		visitedElements.add(exp);
-		exp.contentModel = exp.contentModel.visit(this);
-		return exp;
-	}
-	
-	public Expression onAttribute( AttributeExp exp ) {
-		return exp;
-	}
-	
-	public Expression onRef( ReferenceExp exp ) {
-		if( com.sun.msv.reader.xmlschema.XMLSchemaReader.XMLSchemaSchemaLocationAttributes
-			== exp.name )
-			// use == operator instead of equals method to
-			// correctly compare the signature.
-			
-			// remove xsi:schemaLocation attributes from AGM.
-			return Expression.epsilon;
-		
-		exp.exp = exp.exp.visit(this);
-		return exp;
-	}
-
-	public Expression onOther( OtherExp exp ) {
-		return exp.exp.visit(this);
-	}
-}
diff --git a/generator/test/Generator.java b/generator/test/Generator.java
deleted file mode 100644
index 83d43a5..0000000
--- a/generator/test/Generator.java
+++ /dev/null
@@ -1,6 +0,0 @@
-/** typing saver. */
-public class Generator {
-	public static void main( String[] args ) throws Exception {
-		com.sun.msv.generator.Driver.main(args);
-	}
-}
diff --git a/generator/test/batch/generator/GeneratorTest.java b/generator/test/batch/generator/GeneratorTest.java
deleted file mode 100644
index bc65191..0000000
--- a/generator/test/batch/generator/GeneratorTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * @(#)$Id: GeneratorTest.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package batch.generator;
-
-import junit.framework.TestSuite;
-
-/**
- * batch test class that is called from ant as a part of the whole test.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class GeneratorTest {
-	
-	public static void main( String[] args ) throws Exception {
-		junit.textui.TestRunner.run(GeneratorTest.suite());
-	}
-	
-	public static TestSuite suite() throws Exception {
-		TestSuite s = new TestSuite();
-
-		append( s, "RELAXBatchTestDir", "relax" );
-		append( s, "TREXBatchTestDir", "trex" );
-		append( s, "XSDBatchTestDir", "xsd" );
-		append( s, "DTDBatchTestDir", "dtd" );
-		return s;
-	}
-	
-	private static void append( TestSuite s, String propName, String target ) throws Exception {
-		s.addTest( new GeneratorTester().createFromProperty(target,propName) );
-	}
-}
diff --git a/generator/test/batch/generator/GeneratorTester.java b/generator/test/batch/generator/GeneratorTester.java
deleted file mode 100644
index d916004..0000000
--- a/generator/test/batch/generator/GeneratorTester.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package batch.generator;
-
-import batch.model.TestReader;
-
-/**
- * command line driver. Useful for hand-debugging.
- * 
- * @author <a href="mailto:kohsuke.kawaguchi at eng.sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class GeneratorTester extends batch.BatchTester {
-
-    protected TestReader createReader() {
-        try {
-            return new TestReader( new TestBuilderImpl(validator,factory) );
-        } catch( Exception e ) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-    
-	public static void main( String[] av ) throws Exception {
-        new GeneratorTester().run(av);
-	}
-	
-	protected void usage() {
-		System.out.println(
-			"usage "+this.getClass().getName()+" (relax|trex|xsd|dtd|rng) [-strict] <test case directory>\n"+
-			"  tests the generator by using schema files and test instances\n"+
-			"  in the specified directory.");
-	}
-}
diff --git a/generator/test/batch/generator/TestBuilderImpl.java b/generator/test/batch/generator/TestBuilderImpl.java
deleted file mode 100644
index 1352215..0000000
--- a/generator/test/batch/generator/TestBuilderImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * @(#)$Id: TestBuilderImpl.java 1478 2002-12-23 23:17:33Z kk122374 $
- *
- * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * This software is the proprietary information of Sun Microsystems, Inc.  
- * Use is subject to license terms.
- * 
- */
-package batch.generator;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Vector;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.xml.sax.XMLReader;
-
-import batch.model.ISchema;
-import batch.model.IValidator;
-import batch.model.TestBuilder;
-
-import com.sun.msv.generator.Driver;
-import com.sun.msv.generator.ExampleReader;
-
-class TestBuilderImpl implements TestBuilder
-{
-    protected TestBuilderImpl( IValidator _validator, SAXParserFactory factory ) throws Exception {
-        this.validator = _validator;
-        this.reader = factory.newSAXParser().getXMLReader();
-    }
-    
-    private final IValidator validator;
-    private final XMLReader reader;
-    
-    public Test createIncorrectSchemaTest( File schema ) {
-        return emptyTest();
-    }
-    
-    public Test createCorrectSchemaTest( File schema ) {
-        if(schema.getName().indexOf(".nogen.")!=-1)
-            // we will not test this schema
-            return emptyTest();
-        
-        current = new SchemaTestCase(schema);
-        return current;
-    }
-    
-    private SchemaTestCase current;
-    protected class SchemaTestCase extends TestCase {
-        
-        protected SchemaTestCase( File schema ) {
-            super(schema.getName());
-            this.schemaFile = schema;
-        }
-        
-        private final File schemaFile;
-        private final Vector examples =new Vector();
-        
-        public void addExample( File example ) {
-            examples.add(example);
-        }
-        
-	    /**
-	     * A test consists of
-	     * 
-	     * 1. converts a grammar into the target format
-	     * 2. tests the instance documents.
-	     */
-		public void runTest() throws Exception {
-
-            System.out.println(schemaFile.getPath());
-            
-			Driver driver = new Driver();	// generator instance.
-				
-			// parse parameters
-			driver.parseArguments(new String[]{"-seed","0", "-n","30", "-quiet"});
-				
-			// parse example documents
-            Iterator itr = examples.iterator();
-			while( itr.hasNext() ) {
-				File example = (File)itr.next();
-                
-                reader.setContentHandler( new ExampleReader(driver.exampleTokens) );
-                reader.parse( com.sun.msv.util.Util.getInputSource(example.getAbsolutePath()) );
-			}
-				
-			// set the grammar
-			ISchema schema = validator.parseSchema(schemaFile);
-			assertNotNull( "failed to parse the schema", schema );
-			driver.grammar = schema.asGrammar();
-			driver.outputName = "NUL";
-				
-			// run the test
-			assertEquals( "generator for "+schemaFile.getName(), driver.run(System.out), 0 );
-				
-				
-			// parse additional parameter
-			// generally, calling the parseArguments method more than once
-			// is not supported. So this is a hack.
-			driver.parseArguments(new String[]{"-error","10/100"});
-
-			assertEquals( "generator for "+schemaFile.getName(), driver.run(System.out), 0 );
-		}
-	}
-    
-    public Test createValidDocumentTest( File document ) {
-        current.addExample(document);
-        return emptyTest();
-    }
-    
-    public Test createInvalidDocumentTest( File document ) {
-        return emptyTest();
-    }
-    
-    /** Returns a test that does nothing. */
-    private Test emptyTest() {
-        return new TestSuite();
-    }
-}
diff --git a/msv/src/com/sun/msv/reader/xmlschema/doc-files/redefine.vsd b/msv/src/com/sun/msv/reader/xmlschema/doc-files/redefine.vsd
deleted file mode 100644
index 1d9b4e2..0000000
Binary files a/msv/src/com/sun/msv/reader/xmlschema/doc-files/redefine.vsd and /dev/null differ
diff --git a/msv/src/com/sun/msv/writer/relaxng/doc-files/RELAXNGWriter.vsd b/msv/src/com/sun/msv/writer/relaxng/doc-files/RELAXNGWriter.vsd
deleted file mode 100644
index 0830e9f..0000000
Binary files a/msv/src/com/sun/msv/writer/relaxng/doc-files/RELAXNGWriter.vsd and /dev/null differ


hooks/post-receive
-- 
Sun multi-schema XML validator



More information about the pkg-java-commits mailing list