neilg 01/05/22 13:19:43
Modified: sources/xerces-j api.xml caveats.xml faq-build.xml
faq-common.xml faq-general.xml faq-write.xml
features.xml feedback.xml install.xml
properties.xml readme.xml releases.xml
sam-iterator.xml sam-tree.xml samples.xml
schema.xml y2k.xml
Added: sources/xerces-j docs-book.xml faq-migrate.xml
faq-performance.xml javapurecheck.xml
sam-domcount.xml sam-domfilter.xml
sam-domwriter.xml sam-treeview.xml site-book.xml
Log:
updates for Xerces-J 1.4.0
Revision Changes Path
1.3 +6 -6 xml-site/sources/xerces-j/api.xml
Index: api.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/api.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- api.xml 1999/12/02 00:04:56 1.2
+++ api.xml 2001/05/22 20:18:33 1.3
@@ -1,20 +1,20 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="API Documentation">
<s2 title="Javadoc Generated Documentation">
- <p>Xerces-J comes packaged with API documentation for SAX and DOM,
+ <p>&javaparsernamelong; comes packaged with API documentation for
SAX and DOM,
the two most common interfaces for programming XML. In addition,
we provide documentation for classes that are not part of the SAX
- and DOM API's, but are useful for writing Xerces-J programs. </p>
+ and DOM API's, but are useful for writing &javaparsername; programs.
</p>
<p>This documentation is generated automatically from the
Javadoc-style
comments inside the source files. Click on one of the links below
to
go to the appropriate API documentation.</p>
</s2>
- <s2 title="Xerces-J API Documentation">
+ <s2 title="&javaparsername; API Documentation">
<ul>
- <li><jump href="./apiDocs/index.html">Full API
documentation</jump></li>
- <li><jump href="./apiDocs/overview-tree.html">Hierarchy for all
the packages</jump></li>
+ <li><jump href="apiDocs/index.html">Full API
documentation</jump></li>
+ <li><jump href="apiDocs/overview-tree.html">Hierarchy for all
the packages</jump></li>
</ul>
<s3 title="Package org.apache.xerces.parsers">
<s4 title="Classes">
1.3 +2 -2 xml-site/sources/xerces-j/caveats.xml
Index: caveats.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/caveats.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- caveats.xml 1999/12/02 00:04:56 1.2
+++ caveats.xml 2001/05/22 20:18:35 1.3
@@ -1,9 +1,9 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Caveats">
<s2 title="Caveats and Limitations">
- <p>This is a list of the limitations in this release of
Xerces-J:</p>
+ <p>This is a list of the limitations in this release of
&javaparsername;:</p>
<ul>
<li>Due to a transcoding bug in the Sun JDK's
(1.1.6, 1.1.7, 1.1.8, 1.2) handling of EBCDIC data
1.3 +139 -50 xml-site/sources/xerces-j/faq-build.xml
Index: faq-build.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/faq-build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- faq-build.xml 1999/12/02 00:04:56 1.2
+++ faq-build.xml 2001/05/22 20:18:37 1.3
@@ -1,38 +1,55 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
+<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="Building and Running FAQs">
- <faq title="Swing?">
+ <faq title="Swing version?">
<q>Which version of Swing is required?</q>
<a> <p>This release uses Swing 1.1 (JFC 1.1).
Swing is only used by the sample programs and is not
required by the parser itself.</p>
</a>
</faq>
- <faq title="Recompling?">
+ <faq title="Recompiling source files?">
<q>How do I recompile the source files?</q>
- <a> <p>blah
+ <a> <p>To build &javaparsername; on Windows, you need a copy of
Cygnus's Cygwin.
+See <jump
href="http://sourceware.cygnus.com/cygwin">http://sourceware.cygnus.com/cygwin</jump>.
+Once Cygwin is installed, you need to set two environment variables. Edit
the batch file
+BuildAll.bat to set these variables. Execute BuildAll.bat, and then
+set your classpath to point to the src and samples directories in the
+&javaparsername; distribution. You can then go to the top of the
+&javaparsername; tree and type 'make'.
+</p>
+<p>
+To build &javaparsername; Java on UNIX, you need to set an environment
+variable. Edit the shell script BuildAll to set this variables.
+Execute BuildAll, and then set your classpath to point to the src
+and samples directories in the &javaparsername; distribution. You can then
+go to the top of the &javaparsername; tree and type 'make'.
</p>
</a>
</faq>
- <faq title="Regenerating?">
+ <faq title="Regenerating API documentation?">
<q>How do I regenerate the api documentation?</q>
- <a> <p>blah
+ <a> <p>To regenerate the api documentation, you need to set up
+your environment to build &javaparsername;. Instead of typing 'make', you
+type 'make apidocs'.
</p>
</a>
</faq>
+<!-- TBD
<faq title="Packaging?">
<q>How do I package the parser?</q>
<a> <p>blah
</p>
</a>
</faq>
- <faq title="Visual Age?">
- <q>How do I import Xerces-J into Visual Age for Java</q>
+-->
+ <faq title="How do I use Visual Age?">
+ <q>How do I import &javaparsername; into Visual Age for Java</q>
<a>
<ul>
- <li>Why does VisualAge for Java 2.0 report problems when I import
the Xerces-J parser?
- <br/>The current version of the Xerces-J parser uses
Swing 1.1,
+ <li>Why does VisualAge for Java 2.0 report problems when I import
the &javaparsername; parser?
+ <br/>The current version of the &javaparsername; parser
uses Swing 1.1,
while VisualAge for Java 2.0 comes with Swing 1.0.2.
The free update for the
Professional version of VisualAge for Java 2.0 installs Swing
1.0.3.
The most important difference between Swing 1.0.2 -
1.0.3 and 1.1 is
@@ -41,13 +58,13 @@
with Swing 1.1 from Sun's Java home page and import the
"swingall.jar"
file into VisualAge for Java 2.0. The Swing 1.1 package
can be found at
the following URL:
- <br/>http://java.sun.com/products/jfc/index.html
+ <br/><jump
href="http://java.sun.com/products/jfc/index.html">http://java.sun.com/products/jfc/index.html</jump>
<br/>Refer to the VisualAge for Java 2.0 documentation
for information about
how to import a JAR file into the repository and add
that code to your workspace.
</li>
- <li>Are there any other tips for importing the Xerces-J parser
into VisualAge
+ <li>Are there any other tips for importing the &javaparsername;
parser into VisualAge
for Java 2.0?
- <br/>The most useful tip applies to *any* updated code
that you import
+ <br/>The most useful tip applies to <em>any</em>
updated code that you import
into the VisualAge for Java 2.0 product. Before
updating code, do the following:
<br/>1. version the old code
<br/>2. delete it from your workspace
@@ -64,51 +81,123 @@
</ul>
</a>
</faq>
- <faq title="100% Pure Java?">
- <q>Is this Xerces-J version 100% pure Java compliant?</q>
- <a> <p>blah
- </p>
+ <faq title="100% Pure Java compliant?">
+ <q>Is this &javaparsername; version 100% pure Java
compliant?</q>
+ <a> <p>Running JavaPureCheck on the Xerces-J parser code
indicated 339
+ pure Java classes, 9 warnings, and 0 errors. The nine warnings
are
+ enumerated below with explanations. To see the entire report,
click
+ <link idref="jpc">here</link>. </p>
+
+ <p>There are many common cases where JavaPureCheck issues
warnings
+ even though the code is pure Java. These are the most common
reasons:</p>
+ <ol>
+ <li>Warning: method reference:
+
<code>java.lang.Class.forName(java.lang.String)</code>
+ <br/>This warning is issued in the following
two cases:</li>
+ <ol>
+ <li>Program code calls the
<code>Class.forName(String)</code> method to
+ dynamically load a class file.
In this situation, the
+ specified class may contain
impure Java code. In the
+ cases where this method is
called directly in the parser
+ code, an explanation is
provided detailing why this
+ warning can be ignored.</li>
+ <li>Program code makes direct
reference to an object's
+ class. For example: <code>Class
stringClass = String.class;</code>.
+ In this situation the Java
compiler converts
+ <code>String.class</code> to
the method call
+
<code>Class.forName("java.lang.String")</code>.
+ As long as the object whose
class is being referenced is
+ pure Java, the code making the
reference remains pure.</li>
+ </ol>
+ <li>Warning: possible hard-coded path: ...
+ <br/>When a String literal contains a common
path separator
+ character (e.g. '/' or
'\'), JavaPureCheck assumes that
+ it is a hard-coded path and that the class may
not
+ contain portable code. While a human tester can
verify
+ that the string is not a path, JavaPureCheck
must be
+ conservative and issue a warning.</li>
+ </ol>
+ <p>Explanations:</p>
+ <ul>
+ <li>Class: org.xml.sax.helpers.ParserFactory</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: The ParserFactory class is
part of the standard SAX 1.0 distribution. The warning given that this class
"may load impure class" is correct -- the ParserFactory class may load impure
Java class files. However, the purpose of this utility class is to load parser
classes by name and therefore cannot dynamically check the pureness of parser
classes loaded in this fashion. Since the Xerces-J parser does not use this
method directly, it is not a problem that concerns the Xerces-J parser.
</li></ul>
+ <li>Class:
org.apache.xml.serialize.SerializerFactory</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: The SerializerFactory
supports querying a system property to dynamically instantiate a serializer by
class name. However, all of the serializer classes provided in this
distribution are pure. The only way to load an impure serializer is if the user
provided an impure serializer implementation.</li></ul>
+ <li>Class: org.apache.xml.serialize.OutputFormat</li>
+ <ul><li>Warning: possible hard-coded path:
text/xml</li></ul>
+ <ul><li>Warning: possible hard-coded path:
text/plain</li></ul>
+ <ul><li>Warning: possible hard-coded path:
application/pdf</li></ul>
+ <ul><li>Warning: possible hard-coded path:
text/html</li></ul>
+ <ul><li>Warning: possible hard-coded path:
-//W3C//DTD XHTML 1.0 Strict//EN</li></ul>
+ <ul><li>Explanation: These strings are not
filenames.</li></ul>
+ <li>Class: org.apache.xml.serialize.HTMLdtd</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ <li>Class: org.apache.html.dom.HTMLDocumentImpl</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ <li>Class: org.apache.xerces.readers.StringReader</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ <li>Class: org.apache.xerces.parsers.DOMParser</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: The DOMParser class allows
the user to set the DOM implemenation to use, by name. However, the default DOM
implementation is pure Java.</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ <li>Class: org.apache.xerces.utils.CharDataChunk</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ <li>Class: org.apache.xerces.utils.UTF8DataChunk</li>
+ <ul><li>Warning: method reference:
java.lang.Class.forName(java.lang.String)</li></ul>
+ <ul><li>Explanation: Referencing class object
that is pure Java.</li></ul>
+ </ul>
+ <p>The results file of the JavaPureCheck can be viewed
by clicking <link idref="jpc">here</link>.</p>
+ <note>The samples were not checked with JavaPureCheck
and are not
+ guaranteed to be pure Java. We reserve the right to
write samples
+ in the future that are platform specific and therefore
may not
+ pass as pure Java. The parser, however, will remain
pure Java.</note>
</a>
</faq>
<faq title="Running on the Mac?">
- <q>How do I get Xerces-J to run on the Mac under MRJ?</q>
+ <q>How do I get &javaparsername; to run on the Mac under
MRJ?</q>
<a> <p><em>Prerequisites</em> (available from
<jump
href="http://developer.apple.com/java/">http://developer.apple.com/java/</jump>):</p>
- <ul>
- <li>MRJ 2.1 (this is the most recent version of the JVM)</li>
- <li>MRJ SDK 2.1 (this is the most recent version of the Java
developer tools)</li>
- </ul>
- <p><em>Instructions </em>(other variations would work also):</p>
- <ol>
- <li>Download the .tar.gz file containing Xerces-J.</li>
- <li>Use Stuffit Expander(tm), Suntar, or some other Macintosh tool
that
- <br/>supports the .tar.gz format to expand the
downloaded file.</li>
- <li>JBindery, part of MRJ SDK 2.1, is used to create a
double-clickable
- Java application with the necessary configuration
information built in.
- It is analogous to writing a .bat or .sh script. </li>
- <li><em>To run the dom.DOMWriter example:</em></li>
- <ol>
- <li>Double click on JBindery to start it up.</li>
- <li>Click on the Classpath panel.</li>
- <li>Click on the "Add .zip File" button and add both
the
- "Xerces-J.jar" and
"Xerces-JSamples.jar" files.</li>
- <li>Click on the Command panel.</li>
- <li>Enter "dom.DOMWriter" as the Class name. Enter
- "data/personal.xml" in the Optional
parameters box.</li>
- <li>Click on Save Settings button, pick a name such as "Run
dom.DOMWriter"
- for the file, and <em>be sure</em> that
"Save as Application"
- is selected (this is the default) and save the
file.</li>
- <li>Quit JBindery.</li>
- <li>You can now double click on the file you created in step f
to run the XJParse example.</li>
- </ol>
- </ol>
+ <ul>
+ <li>MRJ 2.1 (this is the most recent version of the JVM)</li>
+ <li>MRJ SDK 2.1 (this is the most recent version of the Java
developer tools)</li>
+ </ul>
+ <p><em>Instructions </em>(other variations would work also):</p>
+ <ol>
+ <li>Download the .tar.gz file containing
&javaparsername;.</li>
+ <li>Use Stuffit Expander(tm), Suntar, or some other Macintosh
tool that
+ <br/>supports the .tar.gz format to expand the
downloaded file.</li>
+ <li>JBindery, part of MRJ SDK 2.1, is used to create a
double-clickable
+ Java application with the necessary
configuration information built in.
+ It is analogous to writing a .bat or .sh
script. </li>
+ <li><em>To run the dom.DOMWriter example:</em></li>
+ <ol>
+ <li>Double click on JBindery to start it up.</li>
+ <li>Click on the Classpath panel.</li>
+ <li>Click on the "Add .zip File" button and add
both the
+ "Xerces-J.jar" and
"Xerces-JSamples.jar" files.</li>
+ <li>Click on the Command panel.</li>
+ <li>Enter "dom.DOMWriter" as the Class name.
Enter
+ "data/personal.xml" in the
Optional parameters box.</li>
+ <li>Click on Save Settings button, pick a name such as
"Run <code>dom.DOMWriter</code>"
+ for the file, and <em>be sure</em> that
"Save as Application"
+ is selected (this is the default) and
save the file.</li>
+ <li>Quit JBindery.</li>
+ <li>You can now double click on the file you created in
step f to run the XJParse example.</li>
+ </ol>
+ </ol>
</a>
</faq>
- <faq title="Visual Cafe Error?">
+ <faq title="Visual Cafe exception error?">
<q>Why do I get ArrayIndexOutOfBoundsException in the Symantec
Visual Cafe debugger?</q>
- <a> <p>Visual Cafe's debugger is set to trap
<code>ArrayIndexOutOfBoundsException</code>'s by
- default. Xerces-J uses
<code>ArrayIndexOutOfBoundsException</code> internally to signal
- exceptional, but not erroneous conditions. In order to
run Xerces-J2 inside
+ <a> <p>The Visual Cafe debugger is set to trap
<code>ArrayIndexOutOfBoundsException</code> exceptions by
+ default. &javaparsername; uses
<code>ArrayIndexOutOfBoundsException</code> internally to signal
+ exceptional, but not erroneous conditions. In order to
run &javaparsername;2 inside
Visual Cafe's debugger, you need to turn off the
trapping of these
exceptions.</p>
<p><em>To do this:</em></p>
1.3 +26 -11 xml-site/sources/xerces-j/faq-common.xml
Index: faq-common.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/faq-common.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- faq-common.xml 1999/12/02 00:04:56 1.2
+++ faq-common.xml 2001/05/22 20:18:38 1.3
@@ -1,11 +1,11 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
+<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="Common Problems">
- <faq title="Parsing Generated an Error">
- <q>I tried to use Xerces-J to parse HTML, and it generated an
error. What did I do wrong?</q>
+ <faq title="Parsing HTML Generated an Error.">
+ <q>I tried to use &javaparsername; to parse an HTML file and it
generated an error. What did I do wrong?</q>
<a><p>Unfortunately, HTML does not, in general, follow the XML
grammar rules.
- Most HTML is actually not well-formed XML. Therefore, the XML
parser
+ Most HTML files do not meet the XML style quidelines.
Therefore, the XML parser
generates XML well-formedness errors.</p>
<p>Typical errors include:</p>
<ul>
@@ -13,10 +13,14 @@
<li>Missing closing slash on <IMG HREF="foo"
<em>/</em>> (not required in HTML)</li>
<li>Missing quotes on attribute values, e.g. <IMG
width="600"> (not generally required in HTML)</li>
</ul>
+ <p>HTML must match the XHTML standard for
well-formedness before it
+ can be parsed by Xerces-J or any other XML parser. You
can find the
+ <jump
href="http://www.w3c.org/TR/1999/PR-xhtml1-19991210">XHTML standard</jump>
+ on the <jump href="http://www.w3c.org">W3C web
site</jump>.</p>
</a>
</faq>
<faq title="UTF-8 Character Error">
- <q>I get an error: "invalid UTF-8 character"</q>
+ <q>I get an "invalid UTF-8 character" error.</q>
<a><p>There are many Unicode characters that are not allowed in
an XML document,
according to the XML spec. Typical disallowed characters are
control
characters, even if you escape them using the
Character Reference form:
@@ -24,13 +28,13 @@
<jump
href="http://www.w3.org/TR/REC-xml#charsets">2.2</jump> and
<jump
href="http://www.w3.org/TR/REC-xml#sec-references">4.1</jump>
for details. If the parser is generating this error,
it is very likely
- that there's a character in there that you can not
see.
+ that there is a character in the file that you can
not see.
You can generally use a UNIX command like "od -hc"
to find it.</p>
</a>
</faq>
<faq title="Error Accessing EBCDIC XML Files">
- <q>I get an error when I access EBCDIC XML files -- what's
happening?</q>
+ <q>I get an error when I access EBCDIC XML files, what is
happening?</q>
<a><p>If an XML document/file is not UTF-8, then you MUST
specify the encoding.
When transcoding a UTF8 document to EBCDIC, remember to change
this:</p>
<ul>
@@ -42,12 +46,23 @@
</a>
</faq>
<faq title="EOF Character Error">
- <q>I get an error on the EOF character (0x1A) -- what's
happening?</q>
- <a><p>No, the parser isn't broken. You're probably using the
<em>LPEX</em>
- editor, which automatically inserts an End-of-file character at
the end of your
+ <q>I get an error on the EOF character (0x1A) -- what is
happening?</q>
+ <a><p>You are probably using the <em>LPEX</em>
+ editor, which automatically inserts an End-of-file character
(0x1A) at the end of your
XML document (other editors might do this as well).
Unfortunately, the
EOF character (0x1A) is an illegal character according to the
XML specification,
- and Xerces-J correctly generates an error.</p>
+ and &javaparsername; correctly generates an error.</p>
+ </a>
+ </faq>
+ <faq title='DOS Filenames No Longer Work'>
+ <q>I used to be able to use DOS filenames with the parser and
now
+ they don't work. Why not?</q>
+ <a><p>DOS filenames are not legal URIs as required by the XML
1.0
+ specification. Therefore, it was an error for the parser to
accept
+ DOS filenames. This bug is now fixed.</p>
+ <p>DOS filenames can be converted to legal URIs, however. For
+ example, the DOS filename "c:\xerces\data\personal.xml" would
become
+ "file:///c:/xerces/data/personal.xml", which is a legal URI.</p>
</a>
</faq>
</faqs>
1.3 +113 -13 xml-site/sources/xerces-j/faq-general.xml
Index: faq-general.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/faq-general.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- faq-general.xml 1999/12/02 00:04:56 1.2
+++ faq-general.xml 2001/05/22 20:18:39 1.3
@@ -1,30 +1,129 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
+<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="General FAQs">
- <faq title="New Features?">
- <q>What are the new features?</q>
+
+ <faq title="Validating Schemas">
+ <q>I have written a schema and I want to use Xerces to
+ validate it. How do I do this?</q>
+ <a>
+ <p>
+ The best way to solve this problem is to write a
+ simple, valid instance document and use one of the
+ sample programs that accompanies Xerces (such as
+ sax.SAXCount or dom.DOMCount) to validate the
+ instance document. While validating the instance
+ document, Xerces will simultaneously validate the
+ corresponding schema. We hope to introduce
+ functionality to permit schemas to be validated
+ independently of instance documents in Xerces2.
+ </p>
+ </a>
+ </faq>
+
+ <faq title="Bugzilla">
+ <q>How do I use Bugzilla to report bugs?</q>
+ <a>
+ <ul>
+ <li>Please report bugs against the newest
release.</li>
+ <li>If doubt exists whether the behaviour in
question is a bug or a feature,
+ please post a message to the xerces-j-user
list for clarification.</li>
+ <li> To help to eliminate duplicate bug
reports,
+ before reporting a bug, you should
+ first query the bugzilla database to see whether the
bug has already been reported (and perhaps fixed).
+ Then, checkout code from CVS, and
+ build Xerces-J locally to verify that a bug
still exists. </li>
+ </ul>
+ <p>For more information visit the following links:</p>
+ <ul>
+ <li><jump
href="http://nagoya.apache.org/bugzilla/">
+ http://nagoya.apache.org/bugzilla/</jump></li>
+ <li><jump href="http://www.mozilla.org/bugs/">
+ http://www.mozilla.org/bugs/</jump></li>
+ </ul>
+ <anchor name="bugzilla"/>
+ </a>
+ </faq>
+
+ <faq title="Extracting code from CVS">
+ <q>How do I extract code from CVS?</q>
+ <a>
+ <p>
+ <br/>set CVSROOT=:pserver:[EMAIL
PROTECTED]:/home/cvspublic
+ <br/>cvs login <em>(password: anoncvs)</em>
+ <br/>cvs checkout -d xerces_j xml-xerces/java
+ </p>
+ </a>
+ </faq>
+ <faq title="Revalidation of DOM document in Memory">
+ <q>I have used the DOMParser to convert an XML document into
+ a DOM tree. Then I made some changes to the DOM tree.
How do I make sure
+ the document still conforms to my (schema or DTD)?</q>
<a>
- <p>To be provided.
+ <p>
+ DOM revalidation is not supported by Xerces 1. Ken
Rawlings has been trying
+ to build a revalidating DOMParser based on code which
was dropped from Xerces because
+ it was no longer being maintained. The current code is
at:
+ <jump
href="http://www.vervet.com/~krawling/RevalidatingDOMParser.java">http://www.vervet.com/~krawling/RevalidatingDOMParser.java.</jump>
+ We hope that Xerces 2 will include this capability.
</p>
</a>
</faq>
- <faq title="Validation">
- <q>How do I turn on validation?</q>
+ <faq title="Schema/DTD caching">
+ <q>I have a (DTD or schema) that I will use to validate many
XML documents. How can I avoid having to recompile it every time I want to
validate a new document?</q>
<a>
- <p>To be provided.
+ <p>Xerces 1 does not currently support grammar caching.
We
+ expect that Xerces 2 will support this functionality.
Some users
+ have reported success by registering an EntityResolver
which handles reading
+ the grammar from the disk and storing it in an
efficient way (usually a byteArray), then passing the
+ parser a reader for the efficiently-stored structure.
While this
+ does not avoid recompiling the grammar for each
instance document,
+ it does avoid disk accesses.
</p>
</a>
+ </faq>
+
+ <faq title="New Features?">
+ <q>What are the new features?</q>
+ <a>
+ <p>Here are some of the new features in
&javaparsername;:</p>
+ <ul>
+ <li>Additional support for W3C XML Schema
Language.</li>
+ <li>DOS filenames no longer work. See Common
Problems
+ section of the FAQ.</li>
+ </ul>
+ <anchor name="valid"/>
+ </a>
</faq>
- <faq title="Migrating from other XML parsers">
- <q>How do I migrate my code from other XML parsers?</q>
+
+ <faq title="Validation">
+ <q>How do I turn on validation?</q>
<a>
- <p>To be provided.
+ <p>You can turn validation on and off via methods
available
+ on the SAX2 <code>XMLFilter</code> interface. While
only the
+ <code>SAXParser</code> implements the
<code>XMLFilter</code>
+ interface, the methods required for turning on
validation
+ are available to both parser classes, DOM and SAX.
+ <br/>
+ The code snippet below shows how to turn validation on -- assume
that <ref>parser</ref>
+ is an instance of either
+ <code>org.apache.xerces.parsers.SAXParser</code> or
+ <code>org.apache.xerces.parsers.DOMParser</code>. <br/><br/>
+
<code>parser.setFeature("http://xml.org/sax/features/validation", true);</code>
</p>
+ <p><em>IMPORTANT!</em>Simply turning on
+ validation will <em>not</em> make Xerces
+ actually report the errors that it detects.
+ For this, you need to implement the
+ <code>org.xml.sax.ErrorHandler</code>
+ interface and register your implementation
+ with the parser using the
+ <code>setErrorHandler</code> method.</p>
</a>
</faq>
+
<faq title="International Encodings">
- <q>What international encodings are supported by Xerces-J?</q>
+ <q>What international encodings are supported by
&javaparsername;?</q>
<a>
<ul>
<li>UTF-8</li>
@@ -32,8 +131,8 @@
<li>IBM-1208</li>
<li>ISO Latin-1 (ISO-8859-1)</li>
<li>ISO Latin-2 (ISO-8859-2) [Bosnian, Croatian, Czech,
- <br/>Hungarian, Polish, Romanian,
Serbian (in Latin transcription),
- <br/>Serbocroatian, Slovak, Slovenian,
Upper and Lower Sorbian]</li>
+ Hungarian, Polish, Romanian, Serbian
(in Latin transcription),
+ Serbocroatian, Slovak, Slovenian, Upper
and Lower Sorbian]</li>
<li>ISO Latin-3 (ISO-8859-3) [Maltese, Esperanto]</li>
<li>ISO Latin-4 (ISO-8859-4)</li>
<li>ISO Latin Cyrillic (ISO-8859-5)</li>
@@ -77,4 +176,5 @@
</ul>
</a>
</faq>
+
</faqs>
1.3 +264 -139 xml-site/sources/xerces-j/faq-write.xml
Index: faq-write.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/faq-write.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- faq-write.xml 1999/12/02 00:04:56 1.2
+++ faq-write.xml 2001/05/22 20:18:41 1.3
@@ -1,97 +1,60 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE faqs SYSTEM "sbk:/style/dtd/faqs.dtd">
+<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="Writing Application FAQs">
- <faq title="Constructing a Parser">
- <q>How do I construct a parser in Xerces-J v1.0?</q>
- <a><p>
-There are two ways the parser classes can be
- instantiated: The first way is to <em>create a string</em>
- containing the fully qualified name of the parser class. Pass
- this string to the
<code>org.xml.sax.helpers.ParserFactory.makeParser()</code>
- method to instantiate it. This method is useful if your application
will need to switch between different parser configurations. The code snippet
shown below is using this method to instantiate a DOMParser.</p>
-
- <source>
-import org.xml.sax.Parser;
-import org.xml.sax.helpers.ParserFactory;
-import org.apache.xerces.parsers.DOMParser;
+ <faq title="Creating a DOM Parser">
+ <q>How do I create a DOM parser?</q>
+ <a>
+<source>import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
-import java.io.IOException;
+import java.io.IOException;
...
-
-String parserClass = "org.apache.xerces.parsers.DOMParser";
-String xmlFile = "file:///Xerces-J/data/personal.xml";
+String xmlFile =
"file:///&javaparserdirectory;/data/personal.xml";
-Parser parser = ParserFactory.makeParser(parserClass);
+DOMParser parser = new DOMParser();
try {
parser.parse(xmlFile);
+
} catch (SAXException se) {
se.printStackTrace();
} catch (IOException ioe) {
- ioe.printStackTrace();
+ ioe.printStackTrace();
}
-// The next line is only for DOM Parsers
-
-Document doc = ((DOMParser) parser).getDocument();
- ...
- </source>
-
- <p>The second way to instantiate a parser class is to <em>explicitly
- instantiate</em> the parser class, as shown in this example,
- which is creating a DOM Parser. Use this way when you know
- exactly which parser configuration you need, and you are sure
- that you will not need to switch configurations.</p>
-
- <source>
-import org.apache.xerces.parsers.DOMParser;
-import org.w3c.dom.Document;
+Document document = parser.getDocument();</source>
+ </a>
+ </faq>
+
+ <faq title="Creating a SAX Parser">
+ <q>How do I create a SAX parser?</q>
+ <a>
+<source>import org.apache.xerces.parsers.SAXParser;
+import org.xml.sax.Parser;
+import org.xml.sax.ParserFactory;
import org.xml.sax.SAXException;
-import java.io.IOException;
+import java.io.IOException;
...
-String xmlFile = "file:///Xerces-J/data/personal.xml";
+String xmlFile =
"file:///&javaparserdirectory;/data/personal.xml";
-DOMParser parser = new DOMParser();
+String parserClass = "org.apache.xerces.parsers.SAXParser";
+Parser parser = ParserFactory.makeParser(parserClass);
try {
parser.parse(xmlFile);
-
} catch (SAXException se) {
se.printStackTrace();
} catch (IOException ioe) {
- ioe.printStackTrace();
-}
-// The next line is only for DOM Parsers
-Document doc = parser.getDocument();
-
- ...
- </source>
-
- <p>Once you have the Document object, you can call any method on it as
defined by the DOM specification.</p>
- </a>
- </faq>
- <faq title="Creating a DOM Parser">
- <q>How do I create a DOM parser?</q>
- <a><p>Use one of the methods in the question above, and use
- <code>org.apache.xerces.parsers.DOMEParser</code> as the name
of the class. </p>
- <p>To access the DOM tree, you can call the
- <code>getDocument()</code> method on the parser instance.</p>
- </a>
- </faq>
- <faq title="Creating a SAX Parser">
- <q>How do I create a SAX parser?</q>
- <a><p>Use one of the methods in the question above, and use
- <code>org.apache.xerces.parsers.SAXParser</code> as the name of
the class. </p>
- <p>Once you have the parser instance, you can use the standard
SAX
- methods to set the various handlers provided by SAX. </p>
+ ioe.printStackTrace();
+}</source>
</a>
</faq>
+
<faq title="Controlling parser options">
<q>How do I control the various parser options?</q>
<a><p>For this release, all of the parser control API's have
@@ -102,33 +65,30 @@
<link idref="properties">properties</link>.</p>
</a>
</faq>
- <faq title="Using lazy dom">
+ <faq title="Using lazy DOM">
<q>How do I use the lazy evaluating DOM implementation?</q>
- <a><p>The DOM parser class
- <code>org.apache.xerces.parsers.DOMParser</code> now uses a DOM
- implementation that can take advantage of lazy evaluation to
- improve performance. The setNodeExpansion call on these
- classes controls the use of lazy evaluation. There are two
- values for the argument to setNodeExpansion: FULL and
- DEFERRED(the default). </p>
- <p>If node expansion is set to FULL, then the DOM classes
- behave as they always have, creating all nodes in the DOM tree
- by the end of parsing.</p>
-
- <p>If node expansion is set to DEFERRED, nodes in the DOM tree
- are only created when they are accessed. This means that a
- call to getDocument will return a DOM tree that consists only
- of the Document node. When your program accesses a child of
- Document, the children of the Document node will be
- created. All the immediate children of a Node are created when
- any of that Node's children are accessed. This shortens the
- time it takes to parse an XML file and create a DOM tree. This
- also increases the time it takes to access a node that has not
- been created. After nodes have been created, they are cached,
- so this overhead only occurs on the first access to a
- Node. </p>
+ <a><p>The DOM parser class
<code>org.apache.xerces.parsers.DOMParser</code> uses a
+ DOM implementation that can take advantage of lazy evaluation
to
+ improve performance. There is also a mode where the parser
creates
+ all of the nodes as the document is parsed. By default, the
parser
+ uses the lazy evaluation DOM implementation.</p>
+ <p>Nodes in the DOM tree are only created when they are
accessed.
+ The initial call to <code>getDocument()</code> will return a
DOM tree that
+ consists only of the Document node. All of the immediate
children
+ of a Node are created when any of that Node's children are
accessed.
+ This shortens the time it takes to parse an XML file and create
a DOM
+ tree at the expense of requiring more memory during parsing and
+ traversing the document.</p>
+ <p>The lazy evaluation feature is set using the SAX2
Configurable
+ interface. To turn off this feature, use the following code:</p>
+<source>DOMParser parser = new DOMParser();
+parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion",
false);</source>
+ <p>To turn the lazy evaluation feature back on, use the
following code:</p>
+
+<source>parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion",
true);</source>
</a>
</faq>
+
<faq title="Handling Errors">
<q>How do handle errors?</q>
<a><p>When you create a parser instance, the default error
handler does nothing.
@@ -139,6 +99,7 @@
DOM based or SAX based parser.</p>
</a>
</faq>
+
<faq title="Controlling Entity Representation">
<q>How can I control the way that entities are represented in
the DOM?</q>
@@ -159,72 +120,43 @@
node containing the entity expansion as text.</p>
</a>
</faq>
- <faq title="Non-Validating">
- <q>Why does "non-validating" not mean "well-formedness checking
only"?</q>
- <a><p>Using a "non-validating" parser does not mean that only
well-formedness
+
+ <faq title="What does "non-validating" mean?">
+ <q>Why does "non-validating" not mean
"well-formedness checking only"?</q>
+ <a><p>Using a "non-validating" parser does not mean
that only well-formedness
checking is done! There are still many things that the XML
specification
requires of the parser, including entity substitution,
defaulting of
attribute values, and attribute normalization.</p>
- <p>This table describes what "non-validating" really means for
Xerces-J parsers.
+ <p>This table describes what "non-validating" really means
for &javaparsername; parsers.
In this table, "no DTD" means no internal or external DTD
subset is present.</p>
<table>
<tr><tn/>
<th colspan="2">non-validating parsers</th>
<th colspan="2">validating parsers</th>
- </tr>
- <tr>
- <tn/>
- <th>DTD present</th>
- <th>no DTD</th>
- <th>DTD present</th>
- <th>no DTD</th>
</tr>
- <tr>
- <th>DTD is read</th>
- <td>Yes</td>
- <td>No</td>
- <td>Yes</td>
- <td>Error</td>
- </tr>
- <tr>
- <th>entity substitution</th>
- <td>Yes</td>
- <td>No</td>
- <td>Yest</td>
- <td>Error</td>
- </tr>
- <tr>
- <th>defaulting of attributes</th>
- <td>Yes</td>
- <td>No</td>
- <td>Yes</td>
- <td>Error</td>
- </tr>
- <tr>
- <th>attribute normalization</th>
- <td>Yes</td>
- <td>No</td>
- <td>Yes</td>
- <td>Error</td>
- </tr>
- <tr>
- <th>checking against model</th>
- <td>No</td>
- <td>No</td>
- <td>Yes</td>
- <td>Error</td>
- </tr>
+ <tr><tn/>
<th>DTD present</th> <th>no DTD</th> <th>DTD present</th> <th>no
DTD</th></tr>
+ <tr><th>DTD is read</th> <td>Yes</td>
<td>No</td> <td>Yes</td>
<td>Error</td></tr>
+ <tr><th>entity substitution</th> <td>Yes</td>
<td>No</td> <td>Yest</td>
<td>Error</td></tr>
+ <tr><th>defaulting of attributes</th> <td>Yes</td>
<td>No</td> <td>Yes</td> <td>Error</td></tr>
+ <tr><th>attribute normalization</th> <td>Yes</td>
<td>No</td> <td>Yes</td> <td>Error</td></tr>
+ <tr><th>checking against model</th> <td>No</td>
<td>No</td> <td>Yes</td>
<td>Error</td></tr>
</table>
</a>
</faq>
+
<faq title="Associating Data with a Node">
- <q>How do associate my own data with a node in the DOM tree?</q>
+ <q>How do I associate my own data with a node in the DOM
tree?</q>
<a><p>The class <code>org.apache.xerces.dom.NodeImpl</code>
provides a
<code>void setUserData(Object o)</code> and an
<code>Object getUserData()</code>
method that you can use to attach any object to a node in the
DOM tree.</p>
+ <p>Beware that you should try and remove references to your
+ data on nodes you no longer use (by calling
+ <code>setUserData(null)</code>, or these nodes will not be
+ garbage collected until the whole document is.</p>
</a>
</faq>
+
<faq title="Parsing Several Documents">
<q>How do I more efficiently parse several documents sharing a
common DTD?</q>
<a> <p>DTDs are not currently cached by the parser. The
common DTD, since it is
@@ -240,11 +172,204 @@
before accessing it over the
network.</li>
<li>Do not reference an external DTD or internal DTD
subset at all.
In this case, no DTD will be read.</li>
+ <li>Use a custom <code>EntityResolver</code>
and keep common
+ DTDs in a memory buffer.</li>
</ul>
</a>
+ </faq>
+
+ <faq title="How do I access the DOM Level 2 functionality?">
+ <q>How do I access the DOM Level 2 functionality?</q>
+ <a><p>The <jump href="http://www.w3.org/TR/DOM-Level-2/">DOM
Level 2</jump>
+ specification is at the stage of
+ "Candidate Recommendation" (CR), which allows feedback
from implementors
+ before it becomes a "Recommedation". It is comprised of
"core"
+ functionality, which is mainly the DOM
+ <jump
href="http://www.w3.org/TR/REC-xml-names/">Namespaces</jump> implementation,
+ and a number of optional modules (called Chapters in
the spec).</p>
+ <p>Please refer to:</p>
+ <p><jump href="http://www.w3.org/TR/DOM-Level-2/">
+ http://www.w3.org/TR/DOM-Level-2/</jump> for the
+ latest DOM Level 2 specification.</p>
+ <p>The following DOM Level 2 modules are fully
implemented in &javaparsername;: </p>
+ <ul>
+ <li><jump
href="http://www.w3.org/TR/DOM-Level-2/core.html">
+ Chapter 1: Core</jump> - most of these
enhancements are for
+ Namespaces, and can be acessed through
additional functions which
+ have been added directly to the
<ref>org.w3c.dom.*</ref> classes.</li>
+
+ <li><jump
href="http://www.w3.org/TR/DOM-Level-2/events.html">
+ Chapter 6: Events</jump> - The
<ref>org.w3c.dom.events.EventTarget</ref>
+ interface is implemented by all
<code>Nodes</code> of the DOM.
+ The &javaparsername; DOM implementation
handles all of the event
+ triggering, capture and flow.</li>
+
+ <li><jump
href="http://www.w3.org/TR/DOM-Level-2/traversal.html">
+ Chapter 7: Traversal</jump> - The
Traversal module interfaces
+ are located in
<ref>org.w3c.dom.traversal</ref>.
+ The <code>NodeIterator</code> and
<code>TreeWalker</code>, and
+ <code>NodeFilter</code> interfaces have
been supplied to allow
+ traversal of the DOM at a higher-level.
Our DOM Document
+ implementation class,
<code>DocumentImpl</code> class now
+ implements
<code>DocumentTraversal</code>, which supplies the
+ factory methods to create the iterators
and treewalkers.</li>
+
+ <li><jump
href="http://www.w3.org/TR/DOM-Level-2/range.html">
+ Chapter 8. Range</jump> - The Range module
interfaces are
+ located in
<ref>org.w3c.dom.range</ref>. The Range interface
+ allows you to specify ranges or
selections using boundary
+ points in the DOM, along with functions
(like delete,
+ clone, extract..) that can be performed
on these ranges.
+ Our DOM Document implementation class,
<code>DocumentImpl</code>
+ class now implements
<code>DocumentRange</code>, that supplies
+ the factory method to create a
<code>Range</code>.</li>
+ </ul>
+ <note>Since the DOM Level 2 is still in the CR phase,
some changes
+ to these specs are still possible. The purpose of this
phase is to
+ provide feedback to the W3C, so that the specs can be
clarified and
+ implementation concerns can be addressed.</note>
+ </a>
</faq>
- <faq title="How do access the DOM Level 2 functionality">
- <q>How do access the DOM Level 2 functionality</q>
- <a><p>...</p></a>
- </faq>
+
+ <faq title="How do I read data from a stream as it arrives?">
+ <q>How do I read data from a stream as it arrives?</q>
+ <a><p>There are 3 problems you have to deal with:</p>
+
+<ol>
+<li>The Apache parsers read the entire data stream into a buffer before they
start
+ parsing; you need to change this behaviour, so that they analyse "on the
fly"</li>
+<li>The Apache parsers terminate when they reach end-of-file; with a data
stream,
+ unless the sender drops the socket, you have no end-of-file, so you need
to
+ terminate in some other way</li>
+<li>The Apache parsers close the input stream on termination, and this
closes the
+ socket; you normally don't want this, because you'll want to send an ack
to the
+ data stream source, and you may want to have further exchanges on the
socket
+ anyway.</li>
+</ol>
+
+
+<p>Preventing the buffering</p>
+<p>To do this, create a subclass of
org.apache.xerces.readers.DefaultReaderFactory
+and override createCharReader and createUTF8Reader as shown below.</p>
+
+<source>
+package org.apache.xerces.readers;
+
+import org.apache.xerces.framework.XMLErrorReporter;
+import org.apache.xerces.utils.ChunkyByteArray;
+import org.apache.xerces.utils.StringPool;
+import org.xml.sax.InputSource;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+import java.util.Stack;
+
+public class StreamingCharFactory extends
org.apache.xerces.readers.DefaultReaderFactory {
+ public XMLEntityHandler.EntityReader createCharReader(XMLEntityHandler
entityHandler,
+ XMLErrorReporter
errorReporter,boolean sendCharDataAsCharArray,
+ Reader reader,
+ StringPool
stringPool)
+ throws Exception
+ {
+ return new
org.apache.xerces.readers.StreamingCharReader(entityHandler,
+
errorReporter,
+
sendCharDataAsCharArray,
+ reader,
+ stringPool);
+ }
+
+ public XMLEntityHandler.EntityReader createUTF8Reader(XMLEntityHandler
entityHandler,
+ XMLErrorReporter
errorReporter,
+ boolean
sendCharDataAsCharArray,
+ InputStream
data,StringPool stringPool)
+ throws Exception
+ {
+ XMLEntityHandler.EntityReader reader;
+ reader = new
org.apache.xerces.readers.StreamingCharReader(entityHandler,
+
errorReporter,
+
sendCharDataAsCharArray,
+ new
InputStreamReader(data, "UTF8"),
+
stringPool);
+ return reader;
+ }
+}
+</source>
+
+<p>
+In your program, after you instantiate a parser class, replace the
+DefaultReaderFactory with StreamingCharFactory. You'll need to instantiate
your
+parser as a SAXParser, rather than simply as an XMLReader, because the
XMLReader
+interface doesn't have the setReaderFactory method. Be sure to wrap the
+InputStream that you are reading from with an InputStreamReader.
+</p>
+
+<source>
+try {
+ SAXParser parser =
+
(SAXParser)Class.forName("org.apache.xerces.parsers.SAXParser").newInstance();
+ parser.setContentHandler(new DocProcessor(out));
+ parser.setReaderFactory(new StreamingCharFactory());
+ parser.parse(new InputSource(bufferedReader));
+} catch (Exception ex) {
+}
+</source>
+
+<p>Terminating the parse</p>
+<p>One way that works forSAX is to throw an exception when you detect the
logical
+end-of-document.</p>
+<p>For instance, in your class extending DefaultHandler, you can have:</p>
+
+<source>
+public class DocProcessor extends DefaultHandler {
+ private int level;
+ .
+ .
+ public void startElement(String uri,
+ String localName,
+ String raw,
+ Attributes attrs) throws SAXException
+ {
+ ++level;
+ }
+
+ public void endElement (String namespaceURI,
+ String localName,
+ String qName) throws SAXException
+ {
+ if ((--level) == 0) {
+ throw new SAXException ("Finished");
+ }
+ }
+</source>
+
+<p>
+ Preventing the parser from closing the socket
+
+ One way is to subclass BufferedReader to provide an empty close method.
+
+ So, invoke the parser as follows:
+</p>
+
+<source>
+
+ Socket socket;
+
+ // code to set the socket
+
+ parser.parse(new InputSource(new MyBufferedReader(new
InputStreamReader(socket.getInputStream()))));
+ .
+ .
+ class MyBufferedReader extends BufferedReader
+ {
+ public MyBufferedReader(InputStreamReader i) {
+ super(i);
+ }
+
+ public void close() {
+ }
+ }
+</source>
+
+</a></faq>
</faqs>
1.3 +217 -93 xml-site/sources/xerces-j/features.xml
Index: features.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/features.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- features.xml 1999/12/02 00:04:56 1.2
+++ features.xml 2001/05/22 20:18:42 1.3
@@ -1,147 +1,271 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Features">
<s2 title="Setting Features">
<anchor name="features"/>
<p>To set a feature on either
org.apache.xerces.parsers.SAXParser or
- org.apache.xerces.parsers.DOMParser, you should use the SAX2
Configurable
- interface (org.xml.sax.Configurable).</p>
- <p>For example, to turn on the validation feature, do:</p>
- <source>
-SAXParser p=new SAXParser();
+ org.apache.xerces.parsers.DOMParser, you should use the SAX2
+ method <code>setFeature(String,boolean)</code>. To query a
+ feature, use the SAX2 method
<code>getFeature(String)</code>.</p>
+ <p>For example, to turn on validation:</p>
+<source>SAXParser p=new SAXParser();
try {
- p.setFeature("http://xml.org/sax/features/validation",true);
+ p.setFeature("http://xml.org/sax/features/validation", true);
} catch (SAXException e) {
System.out.println("error in setting up parser feature");
-}
- </source>
-
+}</source>
</s2>
+
<s2 title="General Features">
- <p>http://xml.org/sax/features/validation </p>
+ <anchor name="validation"/>
+ <p>http://xml.org/sax/features/validation</p>
<table>
- <tr><th>true</th><td>Validate the document.</td></tr>
- <tr><th>false</th><td>Do not validate the
document.</td></tr>
- <tr><th>Default</th><td>false</td></tr>
- <tr><th>Note</th>
- <td>If this feature is set to true, the
document must specify a grammar.
- If this feature is set to false, the document
may specify a grammar
- and that grammar will be parsed but no
validation of the document
- contents will be performed.</td></tr>
- <tr><th>See</th>
-
<td>http://apache.org/xml/features/validation/dynamic
-
<br/>http://xml.org/sax/features/namespaces</td></tr>
+ <tr><th>True:</th> <td>Validate the
document.</td></tr>
+ <tr><th>False:</th> <td>Do not validate the
document.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>Note:</th> <td>If this feature is
set to true, the document must specify a grammar.
+ If this
feature is set to false, the document may specify a grammar
+ and
that grammar will be parsed but no validation of the document
+
contents will be performed.</td></tr>
+ <tr><th>See:</th> <td><link
anchor="dynamic">http://apache.org/xml/features/validation/dynamic</link>
+
<br/><link
anchor="namespaces">http://xml.org/sax/features/namespaces</link></td></tr>
</table>
+
+ <anchor name="external-general-entities"/>
<p>http://xml.org/sax/features/external-general-entities</p>
<table>
- <tr><th>true</th><td>Include external general (text)
entities.</td></tr>
- <tr><th>false</th><td>Do not include external general
entities.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>See</th>
-
<td>http://xml.org/sax/features/external-parameter-entities</td></tr>
+ <tr><th>True:</th> <td>Include external
general (text) entities.</td></tr>
+ <tr><th>False:</th> <td>Do not include
external general entities.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>See:</th>
+ <td><link
anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
</table>
+
+ <anchor name="external-parameter-entities"/>
<p>http://xml.org/sax/features/external-parameter-entities</p>
<table>
- <tr><th>true</th><td>Include external parameter
entities and the external DTD subset.</td></tr>
- <tr><th>false</th><td>Do not include external parameter
entities or the external DTD subset.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>See</th>
-
<td>http://xml.org/sax/features/external-parameter-entities</td></tr>
+ <tr><th>True:</th> <td>Include external
parameter entities and the external DTD subset.</td></tr>
+ <tr><th>False:</th> <td>Do not include
external parameter entities or the external DTD subset.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>See:</th>
+ <td><link
anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
</table>
+
+ <anchor name="namespaces"/>
<p>http://xml.org/sax/features/namespaces</p>
<table>
- <tr><th>true</th><td>Perform namespace processing:
prefixes will be stripped off element and
- attribute names and replaced with the
corresponding namespace URIs. By
- default, the two will simply be concatenated,
but the namespace-sep core
- property allows the application to specify a
delimiter string for
- separating the URI part and the local
part.</td></tr>
- <tr><th>false</th><td>Do not perform namespace
processing.</td></tr>
- <tr><th>Default</th><td>false</td></tr>
- <tr><th>Note</th><td>If the validation feature is set
to true, then the document must contain
- a grammar that supports the use of
namespaces.</td></tr>
- <tr><th>See</th>
- <td>http://xml.org/sax/features/validation
-
<br/>http://xml.org/sax/properties/namespace-sep</td></tr>
+ <tr><th>True:</th> <td>Perform namespace
processing: prefixes will be stripped off element and
+
attribute names and replaced with the corresponding namespace URIs. By
+
default, the two will simply be concatenated, but the namespace-sep core
+
property allows the application to specify a delimiter string for
+
separating the URI part and the local part.</td></tr>
+ <tr><th>False:</th> <td>Do not perform
namespace processing.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>Note:</th> <td>If the validation
feature is set to true, then the document must contain
+ a
grammar that supports the use of namespaces.</td></tr>
+ <tr><th>See:</th> <td><link
anchor="validation">http://xml.org/sax/features/validation</link>
+
<br/><link idref="properties"
anchor="namespace-sep">http://xml.org/sax/properties/namespace-sep</link></td></tr>
</table>
- <p>http://xml.org/sax/features/use-locator</p>
+
+ <anchor name="schema"/>
+ <p>http://apache.org/xml/features/validation/schema</p>
+ <table>
+ <tr><th>True:</th> <td>Turn on XML Schema
support.</td></tr>
+ <tr><th>False:</th> <td>Turn off XML Schema
support.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ </table>
+
+ <anchor name="schema-full-checking"/>
+
<p>http://apache.org/xml/features/validation/schema-full-checking</p>
<table>
- <tr><th>true</th><td>Provide a Locator using the
DocumentHandler setDocumentLocator callback.</td></tr>
- <tr><th>false</th><td>Explicitly allow the parser not
to provide a Locator (but it still may).</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>Note</th><td>Xerces-J always provides a Locator
to the document handler.</td></tr>
+ <tr><th>True:</th> <td>Enable full schema
constraint checking, including checking which may be time-consuming or memory
intensive. Currently, particle unique attribution constraint checking and
particle derivation resriction checking are controlled by this option.</td></tr>
+ <tr><th>False:</th> <td>Disable full
constraint checking.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
</table>
+
+ <anchor name="dynamic"/>
<p>http://apache.org/xml/features/validation/dynamic</p>
<table>
- <tr><th>true</th><td>The parser will validate the
document only if a grammar is specified.</td></tr>
- <tr><th>false</th><td>Validation is determined by the
state of the
- http://xml.org/sax/features/validation
feature.</td></tr>
- <tr><th>Default</th><td>false</td></tr>
-
<tr><th>See</th><td>http://xml.org/sax/features/validation</td></tr>
+ <tr><th>True:</th> <td>The parser will
validate the document only if a grammar is specified.</td></tr>
+ <tr><th>False:</th> <td>Validation is
determined by the state of the
+
<link anchor="validation">http://xml.org/sax/features/validation</link>
feature.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
+ <tr><th>See:</th> <td><link
anchor="validation">http://xml.org/sax/features/validation</link></td></tr>
</table>
+
+ <anchor name="warn-on-duplicate-attdef"/>
<p>http://apache.org/xml/features/validation/warn-on-duplicate-attdef</p>
<table>
- <tr><th>true</th><td>Warn on duplicate attribute
declaration.</td></tr>
- <tr><th>false</th><td>Do not warn on duplicate
attribute declaration.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
+ <tr><th>True:</th><td>Warn on duplicate attribute
declaration.</td></tr>
+ <tr><th>False:</th><td>Do not warn on duplicate
attribute declaration.</td></tr>
+ <tr><th>Default:</th><td>true</td></tr>
</table>
+
+ <anchor name="warn-on-undeclared-elemdef"/>
<p>http://apache.org/xml/features/validation/warn-on-undeclared-elemdef</p>
<table>
- <tr><th>true</th><td>Warn if element referenced in
content model is not declared.</td></tr>
- <tr><th>false</th><td>Do not warn if element referenced
in content model is not declared.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
+ <tr><th>True:</th> <td>Warn if element
referenced in content model is not declared.</td></tr>
+ <tr><th>False:</th> <td>Do not warn if
element referenced in content model is not declared.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
</table>
+
+ <anchor name="allow-java-encodings"/>
<p>http://apache.org/xml/features/allow-java-encodings</p>
<table>
- <tr><th>true</th><td>Allow Java encoding names in
XMLDecl and TextDecl line.</td></tr>
- <tr><th>false</th><td>Do not allow Java encoding names
in XMLDecl and TextDecl line.</td></tr>
- <tr><th>Default</th><td>false</td></tr>
- <tr><th>Note</th><td>A true value for this feature
allows the encoding of the file to be
- specified as a Java encoding name as well as
the standard ISO encoding
- name. Be aware that other parsers may not be
able to use Java encoding
- names. If this feature is set to false, an
error will be generated if
- Java encoding names are used.</td></tr>
+ <tr><th>True:</th> <td>Allow Java encoding
names in XMLDecl and TextDecl line.</td></tr>
+ <tr><th>False:</th> <td>Do not allow Java
encoding names in XMLDecl and TextDecl line.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
+ <tr><th>Note:</th> <td>A true value for
this feature allows the encoding of the file to be
+
specified as a Java encoding name as well as the standard ISO encoding
+ name.
Be aware that other parsers may not be able to use Java encoding
+
names. If this feature is set to false, an error will be generated if
+ Java
encoding names are used.</td></tr>
</table>
+
+ <anchor name="continue-after-fatal-error"/>
<p>http://apache.org/xml/features/continue-after-fatal-error</p>
<table>
- <tr><th>true</th><td>Continue after fatal
error.</td></tr>
- <tr><th>false</th><td>Stops parse on first fatal
error.</td></tr>
- <tr><th>Default</th><td>false</td></tr>
+ <tr><th>True:</th><td>Continue after fatal
error.</td></tr>
+ <tr><th>False:</th><td>Stops parse on first fatal
error.</td></tr>
+ <tr><th>Default:</th><td>false</td></tr>
+ </table>
+
+ <anchor name="load-dtd-grammar"/>
+
<p>http://apache.org/xml/features/nonvalidating/load-dtd-grammar</p>
+ <table>
+ <tr><th>True:</th><td>Load the DTD and use it to
+ add default attributes and set
+attribute types when parsing.</td></tr>
+ <tr><th>False:</th><td>Build the grammar but do not use
+the default attributes and attribute types information it contains.</td></tr>
+ <tr><th>Default:</th><td>true</td></tr>
+ <tr><th>Note:</th> <td>This feature is always on when
+validation is on.</td></tr>
</table>
+
+ <anchor name="load-external-dtd"/>
+
<p>http://apache.org/xml/features/nonvalidating/load-external-dtd</p>
+ <table>
+ <tr><th>True:</th><td>Load the external DTD.</td></tr>
+ <tr><th>False:</th><td>Ignore the external DTD
completely.</td></tr>
+ <tr><th>Default:</th><td>true</td></tr>
+ <tr><th>Note:</th> <td>This feature is
+always on when validation is on.</td></tr>
+ </table>
</s2>
<s2 title="DOM Features">
+ <anchor name="defer-node-expansion"/>
<p>http://apache.org/xml/features/dom/defer-node-expansion</p>
<table>
- <tr><th>true</th><td>Lazy DOM node expansion.</td></tr>
- <tr><th>false</th><td>Full DOM node expansion.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>Note</th><td>This feature only applies when the
-
http://apache.org/xml/properties/dom/document-class-name property is
- set to a value other than the name of the
default document factory.
- If this feature is set to true, the DOM nodes
in the returned
- document are expanded as the tree is
traversed. This feature allows
- the parser to return a document faster than if
the tree is fully
- expanded during parsing and improves memory
usage when the whole
- tree is not traversed.</td></tr>
-
<tr><th>See</th><td>http://apache.org/xml/properties/dom/document-class-name</td></tr>
+ <tr><th>True:</th> <td>Lazy DOM node
expansion.</td></tr>
+ <tr><th>False:</th> <td>Full DOM node
expansion.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Note:</th> <td>This feature only
applies when the
+ <link
idref="properties"
anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link>
property is
+ set to
a value other than the name of the default document factory.
+ If
this feature is set to true, the DOM nodes in the returned
+
document are expanded as the tree is traversed. This feature allows
+ the
parser to return a document faster than if the tree is fully
+
expanded during parsing and improves memory usage when the whole
+ tree
is not traversed.</td></tr>
+ <tr><th>See</th> <td><link
idref="properties"
anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link></td></tr>
</table>
+
+ <anchor name="create-entity-ref-nodes"/>
<p>http://apache.org/xml/features/dom/create-entity-ref-nodes</p>
<table>
- <tr><th>true</th><td>Create EntityReference nodes in
the DOM tree.</td></tr>
- <tr><th>false</th><td>Do not create EntityReference
nodes in the DOM tree.</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>Note</th><td>This feature only affects the
appearance of EntityReference nodes in
- the DOM tree. The document will always
contain the entity reference
- child nodes.</td></tr>
+ <tr><th>True:</th> <td>Create
EntityReference nodes in the DOM tree. The EntityReference nodes and their
child nodes will be read-only.</td></tr>
+ <tr><th>False:</th> <td>Do not create
EntityReference nodes in the DOM tree. No EntityReference nodes will be
created, only the nodes corresponding to their fully expanded sustitution text
will be created.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Note:</th> <td>This feature only
affects the appearance of EntityReference nodes in
+ the
DOM tree. The document will always contain the entity reference
+ child
nodes.</td></tr>
+ </table>
+
+ <anchor name="include-ignorable-whitespace"/>
+
<p>http://apache.org/xml/features/dom/include-ignorable-whitespace</p>
+ <table>
+ <tr><th>True:</th> <td>Includes text nodes
that can be
+
considered "ignorable whitespace" in the DOM tree.</td></tr>
+ <tr><th>False:</th> <td>Does not include
ignorable whitespace in the DOM tree.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Note:</th> <td>The only way that
the parser can determine if text is ignorable is
+ by
reading the associated grammar and having a content model for
+ the
document. When ignorable whitespace text nodes are included in
+ the
DOM tree, they will be flagged as ignorable. The ignorable flag
+ can
be queried by calling the TextImpl#isIgnorableWhitespace():boolean
+
method.</td></tr>
</table>
+
+ <anchor name="grammar-access"/>
+ <p>http://apache.org/xml/features/domx/grammar-access</p>
+ <table>
+ <tr><th>True:</th> <td>Creates nodes that
describe the grammar in the DOM tree.</td></tr>
+ <tr><th>False:</th> <td>Does not create
create grammar access nodes in the DOM
+
tree. This setting makes the DOM behave as a standard
+
DOM Level 1 implementation.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
+ <tr><th>Note:</th> <td>The grammar access
nodes are appended as children of the
+
DocumentType node. The grammar is specified as an
+ XML
Schema document tree, whether it was read from a
+
document with an associated DTD or XML Schema grammar.
+ This
is currently a violation of the DOM Level 1
+
specification.
+
<br/><em>**** This is an experimental feature that is not guaranteed </em>
+
<br/><em>**** to be supported in future versions of
+ the
parser.</em></td></tr>
+ </table>
</s2>
<s2 title="SAX Features">
+ <!--
+ <anchor name="use-locator"/>
<p>http://xml.org/sax/features/use-locator</p>
+ <table>
+ <tr><th>True:</th> <td>Provide a Locator
using the DocumentHandler setDocumentLocator callback.</td></tr>
+ <tr><th>False:</th> <td>Explicitly allow
the parser not to provide a Locator (but it still may).</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Note:</th> <td>Xerces-J always
provides a Locator to the document handler</td></tr>
+ </table>
+
+ <anchor name="normalize-text"/>
+ <p>http://xml.org/sax/features/normalize-text</p>
+ <table>
+ <tr><th>True:</th> <td>Ensure that all
consecutive text is returned
+
in a single callback to the DocumentHandler
+
characters method.</td></tr>
+ <tr><th>False:</th> <td>Explicitly allow
the parser to split
+
consecutive text into more than one callback
+
(but it still may not do so).</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Note:</th> <td>Xerces-J currently
does not support allowing
+
consecutive text to be buffered and returned
+
in a single callback to the DocumentHandler
+
characters method.</td></tr>
+ </table>
+ -->
+ <anchor name='namespace-prefixes'/>
+ <p>http://xml.org/sax/features/namespace-prefixes</p>
+ <table>
+ <tr><th>True:</th> <td>Report the original
prefixed names and attributes used for Namespace declarations.</td></tr>
+ <tr><th>False:</th> <td>Do not report attributes
used for Namespace declarations, and optionally do not report original prefixed
names.</td></tr>
+ <tr><th>Default:</th> <td>true</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ </table>
+ <anchor name='string-interning'/>
+ <p>http://xml.org/sax/features/string-interning</p>
<table>
- <tr><th>true</th><td>Provide a Locator using the
DocumentHandler setDocumentLocator callback.</td></tr>
- <tr><th>false</th><td>Explicitly allow the parser not
to provide a Locator (but it still may).</td></tr>
- <tr><th>Default</th><td>true</td></tr>
- <tr><th>Note</th><td>Xerces-J always provides a Locator
to the document handler</td></tr>
+ <tr><th>True:</th> <td>All element names,
prefixes, attribute names, Namespace URIs, and local names are internalized
using java.lang.String.intern.</td></tr>
+ <tr><th>False:</th> <td>Names are not necessarily
internalized.</td></tr>
+ <tr><th>Default:</th> <td>false</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>Note:</th> <td>Xerces-J does not support
interning all strings using the
+ String.intern() method because
Xerces-J does its own intern
+ optimizations for String
objects.</td></tr>
</table>
</s2>
</s1>
1.3 +5 -3 xml-site/sources/xerces-j/feedback.xml
Index: feedback.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/feedback.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- feedback.xml 1999/12/02 00:04:56 1.2
+++ feedback.xml 2001/05/22 20:18:44 1.3
@@ -1,17 +1,19 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Feedback Procedures">
<s2 title="Questions or Comments">
- <p>For all questions or comments, write to the Xerces mailing
list.</p>
+ <p>For general questions or comments, write to the
&javaparsername;-user mailing list.
+ If you wish to discuss more technical issues or join the Xerces
developer community, please subscribe to the &javaparsername;-dev list.</p>
<p>If you are submitting a bug (and bug reports are definitely
appreciated!),
please provide the following information:</p>
<ul>
- <li>Version number of Xerces-J (1.0.0?) </li>
+ <li>Version number of &javaparsername;
(&javaparserversion;?) </li>
<li>Version number of JDK (1.1.8? 1.2?)</li>
<li>Sample XML file that causes the bug</li>
<li>Sample Schema file (if required to recreate the
bug)</li>
<li>Sample DTD file (if required to recreate the
bug)</li>
</ul>
+ <p>Please also see the <jump
href="faq-general.html#bugzilla">faq entry</jump> that covers bug
submissions.</p>
</s2>
</s1>
1.3 +33 -32 xml-site/sources/xerces-j/install.xml
Index: install.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/install.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- install.xml 1999/12/02 00:04:57 1.2
+++ install.xml 2001/05/22 20:18:45 1.3
@@ -1,42 +1,43 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Installation">
<s2 title="Unpacking the files">
- <p>Xerces-J is packaged as a ZIP file for Windows NT and 95/98
and
- as a tar.gz file for AIX and all UNIX flavors. You need to
unzip
- the Windows distribution into a directory using either unzip or
pkzip
- or a GUI utility like winzip. The UNIX distribution should
first be
- uncompressed (using the GNU <ref>gunzip</ref> command). Then
run tar -xvf on the
- resulting .tar file to extract the files.</p>
- <s3 title="Windows NT/95/98">
- <ul>
- <li>unzip Xerces-J-bin.zip</li>
- <li>This command creates a "xerces"
sub-directory in the current
- directory containing all the files.</li>
- </ul>
- </s3>
- <s3 title="UNIX (all flavors) ">
- <ul>
- <li>gunzip Xerces-J-bin.tar.gz</li>
- <li>tar xvf Xerces-bin.tar</li>
- <li>These commands create a "xerces"
sub-directory in the
- current directory containing all the files.</li>
- </ul>
- </s3>
+ <p>&javaparsername; is packaged as a ZIP file for all
+ platforms and operating systems. You can run the Java
+ <ref>jar</ref> command to unpack the distribution.</p>
+ <ul>
+ <li>jar xf
&javaparsername;-bin.&javaparserversion;.zip</li>
+ <li>jar xf
&javaparsername;-src.&javaparserversion;.zip</li>
+ <li>This command creates a "&javaparserdirectory;"
sub-directory in the current directory containing all the files.</li>
+ </ul>
</s2>
- <s2 title="Files in this release">
+ <s2 title="Files in the binary package release">
<table>
- <tr><td>bin/Xerces-J.jar</td><td>Jar file containing
all the parser class files</td></tr>
- <tr><td>bin/Xerces-J-samples.jar</td><td>Jar file
containing all sample class files</td></tr>
- <tr><td>Readme.html</td><td>This file</td></tr>
- <tr><td>license.html</td><td>license for Xerces-J
Version 1.0</td></tr>
- <tr><td>w3c_copyright_software.html</td><td>W3C
Copyright Notice for DOM</td></tr>
- <tr><td>apidocs/</td><td>Directory containing Javadoc
API for parser framework</td></tr>
- <tr><td>docs/</td><td>Directory containing other
documentation</td></tr>
+ <tr><td>LICENSE</td><td>License for
&javaparsername;</td></tr>
+ <!--<tr><td>README</td><td>Build
instructions</td></tr>-->
+ <tr><td>Readme.html</td><td>Web page redirect to
docs/html/index.html</td></tr>
+ <!--<tr><td>STATUS</td><td>Project status
list</td></tr>-->
+ <tr><td>xerces.jar</td><td>Jar file containing all the
parser class files</td></tr>
+ <tr><td>xercesSamples.jar</td><td>Jar file containing
all sample class files</td></tr>
<tr><td>data/</td><td>Directory containing sample XML
data files</td></tr>
- <tr><td>src/</td><td>Source files</td></tr>
- <tr><td>samples/</td><td>Directory containing sample
programs</td></tr>
+ <tr><td>docs/html/</td><td>Directory containing
documentation</td></tr>
+ <tr><td>docs/html/apiDocs/</td><td>Directory containing
Javadoc API for parser framework</td></tr>
+ </table>
+ <note>To use &javaparsername; you do not need the source files.
+ </note>
+ </s2>
+ <s2 title="Files in the source package release">
+ <table>
+ <tr><td>LICENSE</td><td>License for
&javaparsername;</td></tr>
+ <tr><td>Makefile</td><td>Top level Makefile -- read
README file before building</td></tr>
+ <tr><td>README</td><td>Build instructions</td></tr>
+ <tr><td>Readme.html</td><td>Web page redirect required
for building documentation</td></tr>
+ <tr><td>STATUS</td><td>Current source code status
information</td></tr>
+ <tr><td>data/</td><td>Directory containing sample XML
data files</td></tr>
+ <tr><td>docs/</td><td>Directory containing
documentation, in XML form</td></tr>
+ <tr><td>samples/</td><td>Directory containing source
code for samples</td></tr>
+ <tr><td>src/</td><td>Directory containing source code
for parser and supplemental APIs</td></tr>
</table>
</s2>
</s1>
1.3 +97 -115 xml-site/sources/xerces-j/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/properties.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- properties.xml 1999/12/02 00:04:57 1.2
+++ properties.xml 2001/05/22 20:18:47 1.3
@@ -1,150 +1,132 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Properties">
- <s2 title="Seting Features">
+ <s2 title="Setting Features">
<anchor name="properties"/>
<p>To set a property on either
org.apache.xerces.parsers.SAXParser
or org.apache.xerces.parsers.DOMParser, you should use the SAX2
- Configurable interface (org.xml.sax.Configurable).</p>
- <source>
-DOMParser p=new DOMParser();
+ method <code>setProperty(String,Object)</code>. To query a
+ property, use the SAX2 method
<code>getProperty(String)</code>.</p>
+ <p>For example, to set the document factory by name:</p>
+<source>DOMParser p=new DOMParser();
try {
- p.setProperty("http://xml.org/sax/properties/namespace-sep","|");
+ p.setProperty("http://apache.org/xml/properties/dom/document-class-name",
+ "org.apache.xerces.dom.DocumentImpl");
} catch (SAXException e) {
System.out.println("error in setting up parser property");
-}
- </source>
+}</source>
</s2>
+
<s2 title="General Properties">
+ <!--
+ <anchor name="namespace-sep"/>
<p>http://xml.org/sax/properties/namespace-sep</p>
<table>
- <tr>
- <th>Type:</th>
- <td>java.lang.String</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-write</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>The separator string that will appear
between the namespace
- URI and the local part of the name when
namespace processing is being
- performed. If the value is the empty string,
the two parts will be
- concatenated. </td>
- </tr>
- <tr>
- <th>Default:</th>
- <td>""</td>
- </tr>
- <tr>
- <th>See:</th>
- <td>http://xml.org/sax/features/namespaces</td>
- </tr>
+ <tr><th>Type:</th>
<td>java.lang.String</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>The separator
string that will appear between the namespace
+ URI and
the local part of the name when namespace processing is being
+
performed. If the value is the empty string, the two parts will be
+
concatenated. </td></tr>
+ <tr><th> Default: </th> <td>""</td></tr>
+ <tr><th>See:</th> <td><link
idref="features"
anchor="namespaces">http://xml.org/sax/features/namespaces</link></td></tr>
+ </table>
+ -->
+
+ <anchor name="xml-string"/>
+ <p>http://xml.org/sax/properties/xml-string</p>
+ <table>
+ <tr><th>Type:</th>
<td>java.lang.String</td></tr>
+ <tr><th>Access:</th> <td>read-only</td></tr>
+ <tr><th>Desc:</th> <td>Get the string of
characters associated with the current event. If the
+
parser recognizes and supports this property but is not currently
+
parsing text, it should return null.</td></tr>
+ <tr><th>Note:</th> <td>This property is
currently not supported because the contents of the
+
XML string returned by this property is not well defined.</td></tr>
</table>
</s2>
+
<s2 title="DOM Parser Properties">
+ <anchor name="current-element-node"/>
<p>http://apache.org/xml/properties/dom/current-element-node</p>
<table>
- <tr>
- <th>Type:</th>
- <td>org.w3c.dom.Node</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-only</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>The current DOM element node while
parsing.</td>
- </tr>
- <tr>
- <th>Note:</th>
- <td>This property is useful for determining the
location
- with a DOM document when an error
occurs.</td>
- </tr>
- <tr>
- <th>See:</th>
- <td>http://xml.org/sax/properties/dom-node</td>
- </tr>
+ <tr><th>Type:</th>
<td>org.w3c.dom.Node</td></tr>
+ <tr><th>Access:</th> <td>read-only</td></tr>
+ <tr><th>Desc:</th> <td>The current DOM
element node while parsing.</td></tr>
+ <tr><th>Note:</th> <td>This property is
useful for determining the location
+ with a
DOM document when an error occurs.</td></tr>
+ <tr><th>See:</th> <td><link
anchor="dom-node">http://xml.org/sax/properties/dom-node</link></td></tr>
</table>
+
+ <anchor name="document-class-name"/>
<p>http://apache.org/xml/properties/dom/document-class-name</p>
<table>
- <tr>
- <th>Type:</th>
- <td>java.lang.String</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-write</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>The fully qualified class name of the DOM
implementation.
- The implementation used must have a
zero argument constructor.</td>
- </tr>
- <tr>
- <th>Default:</th>
- <td>"org.apache.xerces.dom.DocumentImpl"</td>
- </tr>
- <tr>
- <th>Note:</th>
- <td>When the document class name is set to a
value other
- than the name of the default document
factory, the
- deferred node expansion feature does
not work. </td>
- </tr>
- <tr>
- <th>See:</th>
-
<td>http://apache.org/xml/features/dom/defer-node-expansion</td>
- </tr>
+ <tr><th>Type:</th>
<td>java.lang.String</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>The fully qualified
class name of the DOM
+
implementation. The implementation used must
+ have a
zero argument constructor.</td></tr>
+ <tr><th>Default:</th>
<td>"org.apache.xerces.dom.DocumentImpl"</td></tr>
+ <tr><th>Note:</th> <td>When the document
class name is set to a value other
+ than
the name of the default document factory, the
+
deferred node expansion feature does not work. </td></tr>
+ <tr><th>See:</th> <td><link
idref="features"
anchor="defer-node-expansion">http://apache.org/xml/features/dom/defer-node-expansion</link></td></tr>
</table>
</s2>
+
<s2 title="SAX Parser Properties">
+ <!--
+ <anchor name="DeclHandler"/>
<p>http://xml.org/sax/handlers/DeclHandler</p>
<table>
- <tr>
- <th>Type:</th>
- <td>org.xml.sax.misc.DeclHandler</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-write</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>Set the handler for DTD declarations.</td>
- </tr>
+ <tr><th>Type:</th>
<td>org.xml.sax.misc.DeclHandler</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>Set the handler for
DTD declarations.</td></tr>
</table>
+
+ <anchor name="LexicalHandler"/>
<p>http://xml.org/sax/handlers/LexicalHandler</p>
<table>
- <tr>
- <th>Type:</th>
- <td>org.xml.sax.misc.LexicalHandler</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-write</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>Set the handler for lexical parsing
events.</td>
- </tr>
+ <tr><th>Type:</th>
<td>org.xml.sax.misc.LexicalHandler</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>Set the handler for
lexical parsing events.</td></tr>
</table>
+
+ <anchor name="NamespaceHandler"/>
<p>http://xml.org/sax/handlers/NamespaceHandler</p>
<table>
- <tr>
- <th>Type:</th>
- <td>org.xml.sax.misc.NamespaceHandler</td>
- </tr>
- <tr>
- <th>Access:</th>
- <td>read-write</td>
- </tr>
- <tr>
- <th>Desc:</th>
- <td>Set the handler for lexical parsing
events.</td>
- </tr>
+ <tr><th>Type:</th>
<td>org.xml.sax.misc.NamespaceHandler</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>Set the handler for
lexical parsing events.</td></tr>
+ </table>
+ -->
+ <anchor name="declaration-handler"/>
+ <p>http://xml.org/sax/properties/declaration-handler</p>
+ <table>
+ <tr><th>Type:</th>
<td>org.xml.sax.ext.DeclHandler</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>Set the handler for
DTD declarations.</td></tr>
+ </table>
+
+ <anchor name="lexical-handler"/>
+ <p>http://xml.org/sax/properties/lexical-handler</p>
+ <table>
+ <tr><th>Type:</th>
<td>org.xml.sax.ext.LexicalHandler</td></tr>
+ <tr><th>Access:</th> <td>read-write</td></tr>
+ <tr><th>Desc:</th> <td>Set the handler for
lexical parsing events.</td></tr>
</table>
+
+ <anchor name="dom-node"/>
+ <p>http://xml.org/sax/properties/dom-node</p>
+ <table>
+ <tr><th>Type:</th>
<td>org.w3c.dom.Node</td></tr>
+ <tr><th>Access:</th> <td>(parsing) read-only; (not
parsing) read/write</td></tr>
+ <tr><th>Desc:</th> <td>The DOM node
currently being visited,
+ if SAX
is being used as a DOM iterator.
+ If the
parser recognizes and supports this property but is
+ not
currently visiting a DOM node, it should return null.</td></tr>
+ </table>
+
</s2>
</s1>
1.3 +52 -45 xml-site/sources/xerces-j/readme.xml
Index: readme.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/readme.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- readme.xml 1999/12/02 00:04:57 1.2
+++ readme.xml 2001/05/22 20:18:48 1.3
@@ -1,65 +1,72 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
-<s1 title="Xerces Java">
- <s2 title="Xerces-J 1.0.0 Release">
- <p>The Xerces-J 1.0.0 release contains advanced
- parser functionality, such as XML Schema, DOM Level 2, and SAX
version 2,
- in addition to supporting the industry-standard DOM Level 1 and
SAX version 1
+<s1 title="&javaparsernamelong; Readme">
+ <s2 title="&javaparsernamelong; &javaparserversion; Release">
+ <p>The &javaparsernamelong; &javaparserversion; supports
+ <jump href="http://www.w3.org/TR/1998/REC-xml-19980210">XML
1.0</jump>
+ recommendation and contains advanced parser functionality, such
as
+ <jump href="http://www.w3.org/XML/Group/Schemas.html">XML
Schema</jump>,
+ <jump href="http://www.w3.org/TR/DOM-Level-2/">DOM Level 2
version 1.0</jump>, and
+ <jump href="http://www.megginson.com/SAX/">SAX Version
2</jump>,
+ in addition to supporting the industry-standard
+ <jump
href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html">DOM
Level 1</jump> and
+ <jump href="http://www.megginson.com/SAX/SAX1/">SAX version
1</jump>
APIs.</p>
- <p>Xerces-J v1.0.0 is the first in a series of ongoing updates
--
- Watch <jump href="http://xml.apache.org">xml.apache.org</jump>
- for new updates. Note that because some of the standards,
notably
- XML Schema, are still not complete, the stable API will
definitely be
- different from its current form in Xerces-J v1.0.0. This is
your chance to give us
+ <p>
+ Note that because some of the standards
+ are still not complete, the stable API will definitely be
+ different from its current form in &javaparsername;
&javaparserversion;.
+ This is your chance to give us
feedback on the features that are important to you, and let us
know
whether the APIs that we are providing are the right ones.
Please
- direct your feedback to the Xerces mailing list.</p>
+ direct your feedback to the &javaparsername; mailing list.</p>
+
</s2>
<s2 title="License Information">
- <p>The Xerces-J version 1.0.0 release is available in both
source code
- and precompiled binary (JAR files) form.</p>
+ <p>The &javaparsername; &javaparserversion; release is
available in both source code
+ and precompiled binary (JAR files) form. Both &javaparsername;
+ packages are made available under the <jump
href='../../LICENSE'>Apache
+ Software License</jump>.
+ </p>
</s2>
- <s2 title="Applications of the Xerces-J Parser">
- <p>The rich generating and validating capabilities allow the
Xerces-J
+ <s2 title="Applications of the &javaparsername; Parser">
+ <p>The rich generating and validating capabilities allow the
&javaparsername;
Parser to be used for: </p>
<ul>
- <li>Building XML-savvy Web servers </li>
+ <li>Building XML-savvy Web servers. </li>
<li>The next generation of vertical applications which
will use
XML as their data format. </li>
- <li>On-the-fly validation for creating XML editors </li>
- <li>Ensuring the integrity of e-business data expressed
in XML </li>
+ <li>On-the-fly validation for creating XML editors.
</li>
+ <li>Ensuring the integrity of e-business data expressed
in XML. </li>
<li>Building truly internationalized XML applications.
</li>
</ul>
</s2>
- <s2 title="XML Schema (alpha) Support">
- <p>This release includes preliminary support for the W3C XML
Schema
- Language. The <link idref="schema">Schema</link> page contains
a
- complete description of the
- schema capabilities of this release. We intend to track the W3C
XML
- Schema Language in subsequent updates of Xerces-J.</p>
- </s2>
- <s2 title="DOM Level 2 (alpha) Support">
- <p>This release include support for the
- <jump href="http://www.w3.org/TR/WD-DOM-Level-2">DOM Level 2
Core</jump> and
- <jump href="http://www.w3.org/TR/WD-DOM-Level-2">DOM Level 2
Traversal</jump> APIs.
- We will be expanding our DOM Level 2 support to include all of
DOM Level 2. At the moment, the DOM
- Level 2 Traversal API's live in the
org.apache.xerces.dom.domx.traversal
- package.</p>
- </s2>
- <s2 title="SAX 2 (alpha) Support">
- <p>This release includes support for the <jump
href="http://www.megginson.com/SAX/SAX2/">
- SAX Version 2</jump> API's which are being discussed on the
- <jump
href="http://www.lists.ic.ac.uk/hypermail/xml-dev/">XML-DEV</jump> mailing
list.
- These API's are still
- under development, so they are subject to change in the
future.</p>
+ <s2 title="XML Schema 1.0 (beta) Support">
+ <p>This release includes full support for the W3C XML Schema
+ Recommendation, except for limitations as described on the
<link
+ idref="schema">Schema Implementation Limitations</link> page.
+ We intend to remove these limitations and fix outstanding
+ bugs in the next release of &javaparsername;.</p>
+ </s2>
+ <s2 title="DOM Level 2 Support">
+ <p>This release includes support for DOM Level 2
+ <jump href="http://www.w3.org/TR/DOM-Level-2-Core">Core</jump>,
+ <jump
href="http://www.w3.org/TR/DOM-Level-2-Events">Events</jump>,
+ and <jump
href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range">Traversal and
Range</jump> modules.
+ The DOM Level 2 specification is now a W3C
Recommendation.</p>
+ </s2>
+ <s2 title="SAX 2 Support">
+ <p>This release includes support for the <jump
href="http://www.megginson.com/SAX/">
+ SAX Version 2</jump> API's which have been finalized.</p>
</s2>
<s2 title="Configuration Mechanism">
- <p>Xerces-J version 1.0.0 uses a collection of methods to
configure
+ <p>&javaparsername; &javaparserversion; uses a collection of
methods to configure
various settings in the parser. This release includes a new
mechanism
- for setting parser switches. This mechanism uses the SAX2
Configurable
- interface. We have defined a series of properties and features
for the
- options available in Xerces-J. The list of features can be
found
- <link idref="features">here</link>.</p>
+ for setting parser switches. This mechanism uses the SAX2
configuration
+ methods that are part of the XMLReader interface. We have
defined a series
+ of <link idref="properties">properties</link> and
+ <link idref="features">features</link> for the &javaparsername;
+ options. </p>
</s2>
</s1>
1.3 +270 -1 xml-site/sources/xerces-j/releases.xml
Index: releases.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/releases.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- releases.xml 1999/12/02 00:04:57 1.2
+++ releases.xml 2001/05/22 20:18:51 1.3
@@ -1,7 +1,276 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Releases">
+ <s2 title='May 22, 2001 (version 1.4.0)'>
+ <ul>
+ <li>Completed implementation of schema Identity Constraints [Neil
Graham]</li>
+ <li>Update XPath support to bring it into compliance with Schema PR
[Achille Fokoue Nkoutche/Neil Graham]</li>
+ <li>Implemented Schema PR changes to the syntax of <attribute>
declarations [Ted Han ([EMAIL PROTECTED])/Neil Graham]</li>
+ <li>Added French resource bundle for regex package [Jean-Claude
Dufourd, Laurent Foret/Neil Graham]</li>
+ <li>Added support for Schema "final" attribute [Neil
Graham]</li>
+ <li>Added support for nillable and removed limitation for
xsi:schemaLocation usage [Elena Litani]</li>
+ <li>PR changes for Datatypes (including implementation of date/time)
[Sandy Gao, Elena Litani]</li>
+ <li>Added support for fixed attribute on datatype facets [Elena
Litani]</li>
+ <li>Constraint checking [Lisa Martin, Neil Graham, Sandy Gao, Elena
Litani]</li>
+ <li>Re-implemented "all" group support for performance reasons
[Henry Zongaro]</li>
+ <li>Re-implemented "mixed" content model groups for Schema [Lisa
Martin]</li>
+ <li>Miscellaneous bug fixes [Arnaud Le Hors, Jeffrey Rodrigues,
Elena Litani]</li>
+
+ </ul>
+ </s2>
+ <s2 title='March 16, 2001 (version 1.3.1)'>
+ <ul>
+ <li>Added support for schema <redefine> element [Neil
Graham]</li>
+ <li>Added support for schema notations [Elena Litani]</li>
+ <li>Implemented validation constraints for the
"abstract" attribute
+ on elements [Lisa Martin]</li>
+ <li>Simple value normalization and whitespace facet support
[Elena Litani]</li>
+ <li>Fixed validation constraints surrounding the schema
<annotation> element info item [Neil Graham]</li>
+ <li>Implemented support for JAXP 1.1 [Edwin Goei]</li>
+ <li>Added experimental DOM Level 3 features for handling XML
header [Elena Litani]</li>
+ <li>Miscellaneous bugfixes [Arnaud Le Hors, Neil Graham, Elena
Litani, Andy Clark, Lynn Monson, Sandy Gao, Brad O'Hearne]</li>
+ <li>Partially fixed inability to make (or build) Xerces under
Unix [Neil Graham]</li>
+ <li>Removed final from XMLSerializer per request [Andy Clark]</li>
+ <li>Fixed identity constraint bugs (support still limited) [Andy
Clark]</li>
+ <li>Changed parse method to close streams opened by parser even in
+ event of error [Andy Clark]</li>
+ </ul>
+ </s2>
+ <s2 title='January 31, 2001 (version 1.3.0)'>
+ <ul>
+ <li>Upgraded schema support to the schema CR
drafts at a
+ similar level to that which had existed
for the WD schema
+ specifications. [Elena Litani, Lisa
Martin, Neil Graham]</li>
+ <li>Implemented schema union simple type
+ definition. [Elena Litani]</li>
+ <li>Implemented many attribute and
element declaration
+ schema-validation constraints, as well
as
+ use=prohibited. [Neil Graham]</li>
+ <li>Implemented basic support for XML Schema identity constraints
[Andy Clark]</li>
+ <li>Fixed bug in Deferred DOM with multiple IDs on same element
[Andy Clark]</li>
+ <li>Updates to improve DFA build-time performance. [Tozawa
Akihiko]</li>
+ <li>Optimization of memory used by attribute nodes in the DOM.
[Arnaud Le Hors]</li>
+ <li>Fixed conflict between HTML DOM and Core DOM. [Mark
Diekhans]</li>
+ <li>Optimized DOM normalize operation. [Jay Cain + Arnaud Le
Hors]</li>
+ </ul>
+ </s2>
+ <s2 title='December 06, 2000 (version 1.2.3)'>
+ <ul>
+ <li>Fixed Memory leak bug was reported by Tosiki IGA where parser
runs out of memory [Eric Ye]</li>
+ <li>Rampant object creation even when not validating fix patch
send by Elena Litani[Elena Litani]</li>
+ <li>ListDatatypeValidator enumeration bug fix by Elena Litani
Litani[Elena Litani]</li>
+ <li>Optimization in validator to only instantiate objects needed
in the case of DTD vs. Schemas[Jeffrey Rodriguez]</li>
+ <li>Fixed misc. Schema Structures miscelaneous bugs since last
release [Eric Ye]</li>
+ <li>improved implementation of <all> schema construct
+ to handle 8 elements instead of 6;
also increased
+ validation speed [Neil Graham, Eric
Ye]</li>
+ <li>Fixed DOM misc. bugs and other patches since last release
[Arnaud Le Hors]</li>
+ <li>Miscelaneous DOM patches by Lynn Monson [Lynn Monson]</li>
+ <li>Added new 'load-external-dtd' feature, so that when non
+validating, applications can ask the parser not to load the external subset
at
+all [Arnaud Le Hors]</li>
+ </ul>
+ </s2>
+ <s2 title='November 22, 2000 (version 1.2.2)'>
+ <ul>
+ <li>DOM 2 Recommendation release support update [Arnaud Le
Hors]</li>
+ <li>Fixed FAQ section submitted by Tony Montgomery Smith [Jeffrey
Rodriguez,Tony Montgomery]</li>
+ <li>Added normalization patch by Ken Tamura [Jeffrey Rodriguez,
Ken Tamura]</li>
+ <li>Fixed hang in UTF8Reader when we find a multb. UTF8 char.
outside [#x10000-#x10FFFF] range [Jeffrey Rodriguez]</li>
+ <li>Fixed problem in Server env. with Singleton implemtation of
validators [Eric Ye, Jeffrey Rodriguez]</li>
+ <li>Fixed patch submitted by Elena Litani Kitani and others with
+RangeImpl [Eric Ye, Elena Litani, Lynn Monson]</li>
+ <li>Fixed misc. Schema Structures miscelaneous bugs since last
release [Eric Ye]</li>
+ <li>Miscelaneous bug fixes and patches submitted by Lisa Martin
[Lisa Martin]</li>
+ <li>Fixed DOM misc. bugs and other patches since last release
[Arnaud Le Hors]</li>
+ </ul>
+ </s2>
+
+ <s2 title='October 19, 2000 (version 1.2.1)'>
+ <ul>
+ <li>This is a bug fix release</li>
+ <li>Added Mark Swinkels datatype list refactoring [Mark Swinkels,
Jeffrey Rodriguez]</li>
+ <li>Added RangeImpl patch submitted by Lynn Monson [Lynn monson,
Arnaud Le Hors]</li>
+ <li>Fixed datatype registry not being initialized in XMLValidator
bug [Jeffrey Rodriguez]</li>
+ <li>Fixed misc. Schema Structures bugs since last release [Eric
Ye]</li>
+ <li>Fixed misc. Datatypes bugs since last release [Jeffrey
Rodriguez]</li>
+ </ul>
+ </s2>
+
+ <s2 title='August 28, 2000 (version 1.2.0)'>
+ <ul>
+ <li>Merged redundant Attribute validators inner classes with the
data type validators. [Jeffrey Rodriguez]</li>
+ <li>Fixed namespaces bugs for endElement method in SAX. [Jeffrey
Rodriguez]</li>
+ <li>Fixed misc. Schema Datatype bugs. [Jeffrey Rodriguez]</li>
+ <li>Fixed misc. DOM implementation bugs. [Arnaud Le Hors]</li>
+ <li>Fixed Makefiles and documentations. [Andy Clark]</li>
+ <li>Added "any" with "processContents='lax|skip'" support for
Schema. [Eric Ye]</li>
+ <li>Added feature "load-dtd-grammar" [Eric Ye]</li>
+ <li>Fixed a bug in reset() method of XMLValidator. [Eric Ye]</li>
+ <li>Fixed misc. Schema Structures bugs. [Eric Ye]</li>
+ </ul>
+ </s2>
+ <s2 title='July 26, 2000 (version 1.1.3)'>
+ <ul>
+ <li>Added "anyAttribute" support for Schema. [Eric Ye]</li>
+ <li>Added "xsi:type" support for Schema. [Eric Ye]</li>
+ <li>Added full equivClass support for Schema. [Eric Ye]</li>
+ <li>Fixed "form" attribute behavior to be fully compilant with
Schema Spec. [Eric Ye]</li>
+ <li>Fixed "xml:space" bug in DTD validation. [Eric Ye, Andy
Clark]</li>
+ <li>Expanded "any" element support to model groups. [Eric Ye]</li>
+ <li>Fixed "any" element bugs when there are multilple URIs. [Eric
Ye]</li>
+ <li>Cleaned up XMLValidator. [Eric Ye]</li>
+ <li>Fixed misc. Schema bugs. [Eric Ye]</li>
+ <li>Fixed resolving Schema location bug in XMLValidator. [David
Blankenship, Eric Ye]</li>
+ <li>Fixed for BUG:SAXParser endElement reports incorrect local name.
[Jeffrey Rodriguez]</li>
+ <li>Fixed DOM Java Serialization-previous fix did not work. [Jeffrey
Rodriguez]</li>
+ <li>Added testcase under test to test DOM Java Serialization.
[Jeffrey Rodriguez]</li>
+ <li>Added James Duncan fix suggestion to not compile
RevalidatingDOMParser. [James Duncan, Jeffrey Rodriguez]</li>
+ <li>Miscelanous DOM enhancements [Arnaud Le Hors]. </li>
+ <li>Fixed parameterizes entities in XMLDTDScanner. [Jeffrey
Rodriguez]</li>
+ <li>Fixed bug reported by Philippe MOUAWAD, on XMLContentSpec
toString method. [Jeffrey Rodriguez]</li>
+ <li>Fixed problem with DTD validation when namespace is supported is
on. [Andy Clark,Eric Ye]</li>
+ <li>Fixed bug reported by Michael Brundage in StringReader. [Jeffrey
Rodriguez]</li>
+ </ul>
+ </s2>
+ <s2 title='June 21, 2000 (version 1.1.2)'>
+ <ul>
+ <li>Added "any" element content support for Schema [Andy
Clark]</li>
+ <li>Fixed adjacent text nodes bug in deferred DOM [Andy
Clark]</li>
+ <li>Fixed namespace URI bug in deferred DOM [Andy Clark]</li>
+ <li>Fixed null document type node bug [Andy Clark]</li>
+ <li>Fixed StringReader index out of bounds exception bug [Andy
Clark]</li>
+ <li>Turned on namespace support in all parsers, by default [Andy
Clark]</li>
+ <li>Added feature to allow Schema support to be turned off [Andy
Clark]</li>
+ <li>Fixed SAX2 DeclHandler, LexicalHandler callbacks [Andy
Clark]</li>
+ <li>Fixed DOM serialization [Jeffrey Rodriguez]</li>
+ <li>Fixed datatype enumeration bugs [Jeffrey Rodriguez]</li>
+ <li>Fixed datatype pattern bugs [Jeffrey Rodriguez]</li>
+ <li>Fixed datatype min/maxLength bugs [Jeffrey Rodriguez]</li>
+ <li>Modified samples to include additional switches [Jeffrey
Rodriguez]</li>
+ <li>Fixed lexical comparison for string/qname datatypes [Jeffrey
Rodriguez]</li>
+ <li>Added regular expression character class subtraction [Ken
Tamura]</li>
+ <li>Fixed regular expression bugs [Ken Tamura]</li>
+ <li>Added URI class [EMAIL PROTECTED]</li>
+ <li>Fixed import/include Schema bug [Eric Ye]</li>
+ <li>Fixed lots of Schema bugs [Eric Ye]</li>
+ </ul>
+ </s2>
+ <s2 title='June 5, 2000 (version 1.1.1)'>
+ <ul>
+ <li>Added Schema include/import [Eric Ye]</li>
+ <li>Performance tuning [Eric Ye, Andy Clark]</li>
+ <li>Added Ant support to build process [abagchi]</li>
+ <li>Re-architecture Schema datatypes [Jeffrey Rodriguez]</li>
+ <li>Re-organized docs directory to get FOP to work[Anupam Bagchi,
Jeffrey Rodriguez]</li>
+ <li>Fixed Dynamic validation bug [Eric Ye]</li>
+ <li>Fixed Grammar access bug [Eric Ye, Andy Clark]</li>
+ <li>Fixed Miscellaneous bugs [Eric Ye, Andy Clark, Jeffrey
Rodriguez]</li>
+ <li>Added JAXP to build, updated JAXP files [Arnaud Le Hors]</li>
+ <li>Added a DOM from scratch and Serializer sample [Jeffrey
Rodriguez]</li>
+ <li>Fixed NodeImpl supports nullpointer bug in Samples [Arnaud
Le Hors]</li>
+ <li>Fixed a bug in cloning default attribute</li>
+ </ul>
+ </s2>
+ <s2 title='May 19, 2000 (version 1.1.0)'>
+ <ul>
+ <li>Reworked internals for XML Schema support [Andy Clark, Eric
Ye,
+ Jeffrey Rodriguez]</li>
+ <li>Updated XML Schema support to April working draft [Eric Ye,
+ Jeffrey Rodriguez]</li>
+ <li>Changed code to notify error handler of content model
+ validation errors before calling endElement [Arnaud Le
Hors]</li>
+ </ul>
+ </s2>
+ <s2 title='May 9, 2000'>
+ <ul>
+ <li>Upgraded to SAX 2.0. [Arnaud Le Hors]</li>
+ <li>Added support for WML DOM. [david]</li>
+ <li>Preliminary work for full schema support.
+ [Andy Clark, Glenn Marcy, jefreyr, Eric Ye]</li>
+ <li>Reorganized DOM classes to use much less memory. [Arnaud Le
Hors]</li>
+ <li>Entities and entity reference nodes are now readonly as
+ expected. [Arnaud Le Hors]</li>
+ <li>Entity references now have their replacement value when
created
+ with createEntityReference. [Arnaud Le Hors]</li>
+ <li>Fixed problem in Deferred DOM which made building it N^2
order.
+ [Arnaud Le Hors]</li>
+ <li>Fixed handling of elements with IDs in Deferred DOM. [Arnaud
Le Hors]</li>
+ <li>Added support for namespaces in parameter entities. [Arnaud
Le Hors]</li>
+ <li>setNodeValue raised an exception when it should simply be a
+ no-op. [Arnaud Le Hors]</li>
+ <li>Attributes returned by setNamedItem and setNamedItemNS could
not
+ be reused. [Arnaud Le Hors]</li>
+ <li>Implemented new DOM Level 2 methods hasAttribute and
+ hasAttributeNS. [Arnaud Le Hors]</li>
+ <li>43: importNode now uses createElementNS and createAttributeNS
+ when necessary. [Arnaud Le Hors]</li>
+ <li>59: after a first iteration over the whole list, item(index)
+ returned the wrong value. [Arnaud Le Hors]</li>
+ <li>60: Fixed. [Andy Clark]</li>
+ <li>62: Cloned attributes return wrong owner element.
+ [EMAIL PROTECTED]</li>
+ <li>Fixed caption element creation pb with HTMLTableElement.
+ [Assaf Arkin]</li>
+ <li>Improved performance of XML serialize. Added support of
+ encodings and reuse of serializer. [Assaf Arkin]</li>
+ <li>Updated XML serializer to not be strictly dependent on DOM
Level
+ 2. [Andy Clark]</li>
+ </ul>
+ </s2>
+ <s2 title="March 8, 2000">
+ <ul>
+ <li>26: Schema lookup disabled when validation is off. [Arnaud
Le Hors]</li>
+ <li>23: With UCS-4 and UTF-16 encodings, 0xD characters are now
properly normalized.[Glenn Marcy]</li>
+ <li>27: SAX2 http://xml.org/sax/features/namespaces - default
set to true. [pier]</li>
+ <li>28: Fixed error in setNamespaces javadoc [EMAIL
PROTECTED]</li>
+ <li>33: Relaxed restraint of xml:space attribute for XHTML DTDs
[EMAIL PROTECTED]</li>
+ <li>34: SAX 2.0beta2 changes accepted. [Ralf Pfeiffer]</li>
+ <li>35: Fixed getLength() to always return the right
value[Arnaud Le Hors]</li>
+ <li>36: Fixed setPrefix() to update nodeName [Arnaud Le
Hors]</li>
+ </ul>
+ </s2>
+ <s2 title="February 8, 2000">
+ <ul>
+ <li>Removed hard-coded strings to enable national language
support
+(NLS) [Jeffrey Rodriguez, Arnaud Le Hors, Ralf Pfeiffer]</li>
+ <li>Update for SAX2beta [Andy Clark]</li>
+ <li>Add new feature
<code>http://apache.org/xml/features/dom/include-ignorable-whitespace</code>
[Andy Clark]</li>
+ <li>ChunkyByteArray - needed resize chunk array for large files
[Andy Clark] </li>
+ <li>UTF8DataChunk - memory perf fix [Andy Clark] </li>
+ <li>DOM L1 - cache node children length to accelerate
<code>Node#item()</code>[Andy Clark]</li>
+ <li>DOM L1 - Off by one error in DeferredDocumentImpl [EMAIL
PROTECTED]</li>
+ <li>DOM L1 - Slight refactoring of DOM to save memory [Arnaud
Le Hors]</li>
+ <li>Schema datatypes - add binary & URI, update
+ decimal & String [twl]</li>
+ <li>Schema datatypes - allow StringValidator to validate
maxLength & enumeration facets [EMAIL PROTECTED]</li>
+ <li>Schema datatypes - timeDuration & timeInstant validators
[EMAIL PROTECTED]</li>
+ <li>Schema functionality - allow schema lookup via installed
entity resolver [EMAIL PROTECTED]</li>
+ <li>Schema bug fixes (reportSchemaError & integer subtype
registration) [EMAIL PROTECTED]</li>
+ <li>Serializer bug on CData sections [Assaf Arkin] </li>
+ <li>Serializers now prints PUBLIC/SYSTEM id [Assaf Arkin]</li>
+ <li>HTMLTableElementImpl - Empty cell no longer created
+ when adding a row [Assaf Arkin]</li>
+ <li>DOM L2 - TreeWalkerImpl didn't iterate backwards properly
[EMAIL PROTECTED]</li>
+ <li>DOM L2 - Tracking the candidate recommendation [Arnaud Le
Hors]</li>
+ <li>DOM L2 Namespace bug fixes [Ralf Pfeiffer, Arnaud Le
Hors]</li>
+ <li>DOM L2 API moved to org.w3c.dom where it belongs
+ [Ralf Pfeiffer]</li>
+ <li>DOMMemTest [Arnaud Le Hors]</li>
+ </ul>
+ </s2>
+ <s2 title="December 31, 1999">
+ <ul>
+ <li>Include documentation in the repository.</li>
+ <li>Switch packaging to jar files from .zip and .tar.gz
files.</li>
+ <li>StreamingCharReader for stream based applications.</li>
+ <li>Assaf Arkin's serialization package.</li>
+ <li>Assaf Arkin's HTML DOM Level 1 classes.</li>
+ <li>Performance improvements.</li>
+ <li>Bug fixes.</li>
+ </ul>
+ </s2>
<s2 title="November 5, 1999">
<ul>
<li>Created initial code base from IBM's XML4J.</li>
1.3 +14 -16 xml-site/sources/xerces-j/sam-iterator.xml
Index: sam-iterator.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/sam-iterator.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sam-iterator.xml 1999/12/02 00:04:57 1.2
+++ sam-iterator.xml 2001/05/22 20:18:53 1.3
@@ -1,14 +1,14 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="IteratorView Sample">
<s2 title="IteratorView">
- <p>The IteratorView is an interactive UI sample that displays
the DOM tree. It
+ <p>The <code>IteratorView</code> is an interactive UI sample
that displays the DOM tree. It
shows the progress of the iteration by moving the selection
within the DOM tree.
Buttons act as a control panel, allowing the user to
interactively iterate through
the tree, remove nodes, add nodes, and view the results
immediately in the tree.</p>
- <p>The IteratorView uses an example filter, NameNodeFilter,
that can be controlled
- from the UI and a DOMTreeFull class that displays the full DOM
tree with all
+ <p>The <code>IteratorView</code> uses an example filter,
<code>NameNodeFilter</code>, that can be controlled
+ from the UI and a <code>DOMTreeFull</code> class that displays
the full DOM tree with all
the nodes.</p>
<p>The controls are called through to to the corresponding
iterator function. If you
@@ -17,32 +17,32 @@
<s3 title="Iterator Group">
<ul>
- <li>Next - calls the next() functions and selects the
next node in the tree.</li>
- <li>Previous - calls the previous() function a and
selects the previous node in
+ <li>Next - calls the <code>next()</code> functions and
selects the next node in the tree.</li>
+ <li>Previous - calls the <code>previous()</code>
function and selects the previous node in
the tree.</li>
</ul>
</s3>
<s3 title="Selected Node Group">
<ul>
- <li>remove - remove the selected Node and update the
DOM tree. You
+ <li><code>remove</code> - remove the selected Node and
update the DOM tree. You
must press an iterator button to see next or previous node
selection. </li>
- <li>add - add a text node, to see the results of adding
a node on the iterator.
+ <li><code>add</code> - add a text node, to see the
results of adding a node on the iterator.
position. Again you must first press next or previous
</li>
</ul>
</s3>
<s3 title="Iterator Settings Group">
<ul>
- <li>createNodeIterator - calls the factory method to
create a new iterator
- with the corresponding whatToShow and NodenameFilter
settings.</li>
+ <li><code>createNodeIterator</code> - calls the factory
method to create a new iterator
+ with the corresponding <code>whatToShow</code> and
<code>NameNodeFilter</code> settings.</li>
<ul>
<li>The root is set to be the root of
the document, so it
starts at the top level each time.</li>
</ul>
- <li>whatToShow - you can singly or multiply select
values and the
+ <li><code>whatToShow</code> - you can singly or
multiply select values and the
iterator is constrained to showing these types.</li>
- <li>NodeNameFilter - An empty string is converted to
null and given
- to the NodeNameFilter class.</li>
+ <li><code>NodeNameFilter</code> - An empty string is
converted to null and given
+ to the <code>NodeNameFilter</code> class.</li>
<ul>
<li>An empty string matches all
nodes.</li>
<li>A non-empty string is forced to
match node names.</li>
@@ -52,8 +52,6 @@
</s3>
</s2>
<s2 title="Running IteratorView">
- <source>
- java dom.traversal.IteratorView <fileName>
- </source>
+<source>java dom.traversal.IteratorView <fileName></source>
</s2>
</s1>
1.3 +30 -26 xml-site/sources/xerces-j/sam-tree.xml
Index: sam-tree.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/sam-tree.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sam-tree.xml 1999/12/02 00:04:57 1.2
+++ sam-tree.xml 2001/05/22 20:18:54 1.3
@@ -1,58 +1,62 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="TreeWalker Sample">
<s2 title="TreeWalker">
- <p>The TreeWalkerviewView is an interactive UI sample that displays
the DOM
+ <p>The <code>TreeWalkerviewView</code> is an interactive UI sample
that displays the DOM
tree. It show the progress of the tree traversal by moving the
selection within the
DOM tree. Buttons act as a control panel, allowing the user to
interactively
traverse the tree, remove nodes, add nodes, and view the results
immediately in
the tree. </p>
- <p>The TreeWalkerviewView uses an example filter, NameNodeFilter,
that can be
- controlled from the UI and a DOMTreeFull class that displays the
full DOM tree
+ <p>The <code>TreeWalkerviewView</code> uses an example filter,
+ <code>NameNodeFilter</code>, that can be controlled from the UI
and a
+ <code>DOMTreeFull</code> class that displays the full DOM tree
with all the nodes.</p>
- <p>The controls are called through to to the corresponding
TreeWalker function. If
- you are familiar with the DOM Level 2 Traversal specification, these
controls are
+ <p>The controls are called through to to the corresponding
+ <code>TreeWalker</code> function. If you are familiar with the
DOM
+ Level 2 Traversal specification, these controls are
fairly easy to understand.</p>
<s3 title="Document Order Traversal Group">
<ul>
- <li>Next - calls the next() functions and selects the next
in the tree.</li>
- <li>Previous - calls the previous() function a and selects
the previous node in
- the DOM tree.</li>
+ <li>Next - calls the <code>next()</code> functions and
selects
+ the next in the tree.</li>
+ <li>Previous - calls the <code>previous()</code> function a
and
+ selects the previous node in the DOM tree.</li>
</ul>
</s3>
<s3 title="Walk Group">
- <p>Parent, Previous Sibling, Next Sibling, First Child, Last Child -
call the
- corresponding function in TreeWalker and show the result as a
selected Node.</p>
+ <p>Parent, Previous Sibling, Next Sibling, First Child, Last
Child - call the
+ corresponding function in TreeWalker and show the result as a
selected Node.</p>
</s3>
<s3 title="Selected Node Group">
<ul>
<li>current - set the current node to the selected node.</li>
<li>remove - remove the selected node and update the tree.
- You must press a button to see next or previous node
selection.</li>
+ You must press a button to see next or previous node
selection.</li>
<li>add - add a text node.
- You must press a button to see next or previous node
selection.</li>
+ You must press a button to see next or previous node
selection.</li>
</ul>
</s3>
<s3 title="Filter Settings Group">
<ul>
- <li>createNodeTreeWalker - calls the factory method to
create a new
- TreeWalker with the corresponding whatToShow and
NodenameFilter
+ <li><code>createNodeTreeWalker</code> - calls the factory
+ method to create a new <code>TreeWalker</code>
with the
+ corresponding <code>whatToShow</code> and
<code>NodenameFilter</code>
settings. The selected node becomes the TreeWalker root.</li>
- <li>whatToShow - you can singly or multiply select these
values by pressing
- the control key and the TreeWalker is constrained to these
types.</li>
- <li>NodeNameFilter - an empty string is converted to null
and given to the
- NodeNameFilter example filter class provided.</li>
- <ul>
- <li>An empty string (null) matches ALL nodes.</li>
- <li>A non-empty string is forced to match node
names.</li>
- </ul>
+ <li><code>whatToShow</code> - you can singly or multiply
select
+ these values by pressing the control key and
the
+ <code>TreeWalker</code> is constrained to these
types.</li>
+ <li><code>NodeNameFilter</code> - an empty string is
+ converted to null and given to the
+ <code>NodeNameFilter</code> example filter class
provided.</li>
+ <ul>
+ <li>An empty string (null) matches ALL nodes.</li>
+ <li>A non-empty string is forced to match node
names.</li>
+ </ul>
</ul>
</s3>
</s2>
<s2 title="Running TreeWalker">
- <source>
- java dom.traversal.TreeWalkerView <fileName>
- </source>
+<source>java dom.traversal.TreeWalkerView <fileName></source>
</s2>
</s1>
1.3 +80 -25 xml-site/sources/xerces-j/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/samples.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- samples.xml 1999/12/02 00:04:57 1.2
+++ samples.xml 2001/05/22 20:18:56 1.3
@@ -1,55 +1,110 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Samples">
<s2 title="Introduction">
- <p>There are two new samples to test and demonstrate the new
DOM2
- Transversal implementation: </p>
<ul>
+ <li><link idref="domcount">DOMCount</link></li>
+ <li><link idref="domcount">SAXCount</link></li>
+ <li><link idref="domwriter">DOMWriter</link></li>
+ <li><link idref="domwriter">SAXWriter</link></li>
+ <li><link idref="domfilter">DOMFilter</link></li>
<li><link idref="iterator">IteratorView</link></li>
<li><link idref="tree">TreeWalker</link></li>
+ <li><link idref="treeview">TreeViewer</link></li>
</ul>
</s2>
<s2 title="Caveats">
- <note>Make sure that Xerces-J and a JDK are loaded on
- your computer before running any of the sample parsers.</note>
- <note>Xerces-J: Running the sample applications
- requires that you have already loaded the Xerces-J software on
+ <note>&javaparsername;: Running the sample
applications
+ requires that you have already loaded the &javaparsername;
software on
your computer.</note>
- <note>Java: Running the sample parsers require that your
computer has a
- correctly installed JDK. If you do not already have a
JDK already on your computer download
- one from Sun's Java website: <jump href="http://java.sun.com">
- http://java.sun.com</jump> or from IBM's website
+ <note>Java: Running the sample applications require that your
computer has a
+ correctly installed JDK. If you do not already have a JDK
already on
+ your computer download one from Sun's Java website:
+ <jump href="http://java.sun.com">http://java.sun.com</jump> or
from
+ IBM's website
<jump
href="http://www.ibm.com/developer/java/">http://www.ibm.com/developer/java/</jump>
- where you can find an "Enhanced Windows JDK" that is optimized
for the Windows platform.
- The sample applications
+ where you can find an "Enhanced Windows JDK" that is
optimized
+ for the Windows platform. The sample applications
described in the following pages support Java 1 - JDK 1.1.6.
1.1.7, 1.1.8 or
Java 2 - JDK 1.2.2. </note>
<note>UNIX: Command lines in the pages linked below use the
Windows path
- separator ';' (semicolon) and directory separator '\'
(backslash)..
- On UNIX, use the ':' (colon) character to separate the JAR
files in the classpath,
- and replace Windows directory separator '\' (backslash) with
'/' (forward slash).</note>
+ separator ';' (semicolon) and directory separator
'\' (backslash)..
+ On UNIX, use the ':' (colon) character to separate
the JAR files in the classpath,
+ and replace Windows directory separator '\'
(backslash)
+ with '/' (forward slash).</note>
</s2>
+
+ <s2 title="DOMCount Sample">
+ <p><link idref="domcount">DOMCount</link> parses your input
file,
+ and outputs the total parse time,
+ along with counts of elements, attributes, text characters, and
ignorable
+ whitespace characters. DOMCount displays errors and
+ warnings that occur during parsing.</p>
+ </s2>
+
+ <s2 title="SAXCount Sample">
+ <p><link idref="domcount">SAXCount</link> parses your input
file,
+ and outputs the total parse time,
+ along with counts of elements, attributes, text characters, and
+ ignorable whitespace characters. SAXCount displays errors and
+ warnings that occur during parsing.</p>
+ </s2>
+
+ <s2 title="DOMWriter Sample">
+ <p><link idref="domwriter">DOMWriter</link> parses a file, and
+ prints it out in XML format.
+ The command line option, -c, is used to print files in
+ "canonical" XML format, so that two XML documents can be
compared.
+ They also display any errors or warnings that occurred during
the
+ parse.
+ DOMWriter also provides a feature to set the output Java
encoding
+ through the -e switch.</p>
+ </s2>
+
+ <s2 title="SAXWriter Sample">
+ <p><link idref="domwriter">SAXWriter</link> parses a file, and
+ prints it out in XML format. The command
+ line option, -c, is used to print files in "canonical" XML
format,
+ so that two XML documents can be compared. They also display
any
+ errors or warnings that occurred during the parse.</p>
+ </s2>
+
+ <s2 title="DOMFilter Sample">
+ <p><link idref="domfilter">DOMFilter</link> shows you how to
+ search for specific elements in
+ your XML document. It uses <code>getElementsByTagName()</code>
+ to traverse the DOM tree, looking for elements or attributes
that
+ match your specification.</p>
+ </s2>
+
<s2 title="IteratorView Sample">
- <p>The IteratorView is an interactive UI sample that displays
the DOM tree. It
+ <p><link idref="iterator">IteratorView</link> is an interactive
+ UI sample that displays the DOM tree. It
shows the progress of the iteration by moving the selection
within the DOM tree.
Buttons act as a control panel, allowing the user to
interactively iterate through
the tree, remove nodes, add nodes, and view the results
immediately in the tree.</p>
- <p>The IteratorView uses an example filter, NameNodeFilter,
that can be controlled
- from the UI and a DOMTreeFull class that displays the full DOM
tree with all
+ <p>The <code>IteratorView</code> uses an example filter,
+ <code>NameNodeFilter</code>, that can be controlled
+ from the UI and a <code>DOMTreeFull</code> class that displays
the full DOM tree with all
the nodes.</p>
- <p><link idref="iterator">IteratorView page</link></p>
</s2>
+
<s2 title="TreeWalker Sample">
- <p>The TreeWalkerviewView is an interactive UI sample that
displays the DOM
+ <p><link idref="tree">TreeWalkerviewView</link> is an
interactive UI sample that displays the DOM
tree. It show the progress of the tree traversal by moving the
selection within the
DOM tree. Buttons act as a control panel, allowing the user to
interactively
traverse the tree, remove nodes, add nodes, and view the
results immediately in
the tree.</p>
- <p>The TreeWalkerviewView uses an example filter,
NameNodeFilter, that can be
- controlled from the UI and a DOMTreeFull class that displays
the full DOM tree
- with all the nodes.</p>
- <p><link idref="tree">TreeWalkerView page</link></p>
+ <p>The <code>TreeWalkerviewView</code> uses an example filter,
+ <code>NameNodeFilter</code>, that can be
+ controlled from the UI and a <code>DOMTreeFull</code> class
that
+ displays the full DOM tree with all the nodes.</p>
+ </s2>
+
+ <s2 title="Treeviewer Sample">
+ <p><link idref="tree">TreeViewer</link> displays the input XML
file in a graphical tree-style
+ interface. It will also highlight lines have well-formedness
or validation errors.</p>
</s2>
</s1>
1.3 +95 -84 xml-site/sources/xerces-j/schema.xml
Index: schema.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/schema.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- schema.xml 1999/12/02 00:04:57 1.2
+++ schema.xml 2001/05/22 20:18:57 1.3
@@ -1,98 +1,109 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
-
-<s1 title="Schema">
- <s2 title="Disclaimer">
- <p>This package contains an implementation of the W3C XML
- Schema language. This implementation is experimental. The
- XML Schema language is still in working draft stage: you
- should not consider this implementation complete or correct.
- The limitations of this implementation are detailed below --
- please read this document before using this package.</p>
- </s2>
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
+<s1 title="Schema Implementation Limitations">
<s2 title="Introduction">
- <p>This package contains an implementation of a subset
- of the W3C XML Schema Language as specified in the 24
- September 1999 Working Draft. The parsers contained in this
- package are able to read and validate XML documents with the
- grammar specified in either DTD or XML Schema format.</p>
- <p>We are making this package available in order to get
- feedback on the features in the XML Schema language
- design and on representing an XML document's grammar
- as part of the document's DOM tree. We intend to update
- this package until it implements all of the functionality
- of the then current XML Schema Working Draft. If you are
- interested in a particular unimplemented feature, we welcome
- your feedback on the Xerces mailing list.</p>
+ <p>This package contains an implementation of the W3C XML
+ Schema Language, a recommendation of the Worldwide Web
Consortium
+ available in three parts:
+ <jump href="http://www.w3.org/TR/XMLSchema-0">XML Schema:
Primer</jump> and
+ <jump href="http://www.w3.org/TR/XMLSchema-1">XML Schema:
Structures</jump> and
+ <jump href="http://www.w3.org/TR/XMLSchema-2">XML Schema:
Datatypes</jump>.
+ We consider this implementation to be complete except for the
+ limitations cited below. The implementation has been
+ extensively tested and known problem areas are set out below.
+ In this document we also discuss our interpretation of the
+ specifications where it seems to us particularly likely that
+ others might arrive at a different interpretation.
+ We would very much appreciate feedback on the package via
+ the&javaparsername; mailing list, and we
+ encourage the submission of bugs as described in
+ <jump href="faq-general.html#bugzilla">the FAQ.</jump>
+ Please read this document before using this package.
+ </p>
</s2>
<s2 title="Limitations">
- <p>The XML Schema implementation in this package is a
- subset of the features defined in the 24 September 1999
- XML Schema Working Drafts.</p>
- </s2>
- <s2 title="Structure Limitations">
- <ul>
- <li>elementDecls, archeTypes, modelGroups and
attributeGroup
- share the same namespace</li>
- <li>All archetypes, elements, modelGroups and
attributeGroups
- must be declared before they are used.</li>
- <li>On archetypes the following are unsupported:</li>
- <ul>
- <li>open, refine-able, and closed
models</li>
- <li>nested element decls</li>
- </ul>
- <li>None of the items in section 5, import, inclusion,
export,
- or refinement, are supported.</li>
- </ul>
+ <ul>
+ <li>No interface is provided for exposing the post-schema
+ validation infoset , beyond
+ that provided by DOM or SAX;</li>
+ <li> length, minLength, and maxLength facets are limited to the
value
+ 2147483647. Items larger than this limit will not be validated
+ correctly.</li>
+ <li> year and seconds values in date/time datatypes are limited
to the
+ value 2147483647. Items larger than this limit will not be
validated
+ correctly. </li>
+ <li>There is currently no checking for constraint
ct-cos-extends.1.5</li>
+ </ul>
+ </s2>
+ <s2 title='Problem Areas/Known Bugs'>
+ <ul>
+ <li> Handling of <any> schema information items is
+ not completely correct;</li>
+ <li> 'id' attributes appearing on schema
+ element information items are not treated
+ correctly--uniqueness of their values is not
+ mandated;</li>
+ <li> relative URIs are not handled correctly;</li>
+ <li> Due to changes in the specification for Decimals in
+ JDK1.3, not all decimals that should be invalid according
+ to the Schema specs may be found by the parser;</li>
+ </ul>
+ </s2>
+ <s2 title='Interpretation of Areas that are Unclear or
+ Implementation-Dependent'>
+ <ul>
+ <li> QName: the specification does not define the unit of
length. We
+ chose to implement the length facet as being in units of XML
characters
+ in the value space ( # of chars in namespace URI + ":" +
+ local part );</li>
+ <li> We have interpreted the specs as requiring
+ <keyref> Identity Constraints to refer to
+ <key> or <unique> identity constraints within
+ the scope of the elements to which the <keyref> is
+ attached. This interpretation is at variance with the
+ Schema Primer, which contains an example with a
+ <keyref> declared on an element used inside the
+ element of its corresponding <key>;</li>
+ </ul>
+ </s2>
+ <s2 title="Other Notes">
+ <p> The parsers contained in this package are able to read and
+ validate XML documents with the grammar specified in either
+ DTD or XML Schema format.
+ The schema is specified by the xsi:schemaLocation or
+ xsi:noNamespaceSchemaLocation attribute on the root
+ element of the document. The xsi prefix must be bound to the
+ Schema document instance namespace, as specified by the
+ Recommendation. See the sample provided in the
+ Usage section.</p>
+ <p>Finally, note that in <all> model groups fewer than 8
elements must
+ be used.</p>
</s2>
- <s2 title="Datatype Limitations">
- <ul>
- <li>Datatype checking conforms to underlying Java
types, not
- necessarily to schema rules:</li>
- </ul>
- <table>
- <tr><th>Schema type</th><th>Java type</th></tr>
- <tr><td>boolean</td><td>Boolean</td></tr>
- <tr><td>integer</td><td>Integer</td></tr>
- <tr><td>decimal</td><td>Double</td></tr>
- <tr><td>real</td><td>Double</td></tr>
- </table>
- <ul>
- <li>The NMTOKEN, NMTOKENS, Name, NCName, ID, IDREF,
- ENTITY, ENTITIES, NOTATION are only supported on
attributes. At
- the moment they cannot be applied to element
content.</li>
- <li>The timeInstant, timeDuration, recurringInstant,
date, time,
- binary, uri, and language datatypes are not
supported.</li>
- <li>Datatype qualifiers on attributes are not
supported.</li>
- </ul>
- </s2>
- <s2 title="Other Limitations">
- <p>The schema is specified by the first xmlns attribute on the
root
- element of the document. There must be an attribute declaration
for
- this xmlns attribute. </p>
- </s2>
<s2 title="Usage">
<p>In this release, schema validation has been integrated with
the
regular SAXParser and DOMParser classes. No special classes are
required to parse documents that use a schema.</p>
<p>Documents that use XML Schema grammars specify the location
of the
- grammar using an xmlns attribute attached to the root /
top-level element
- in the document. Here is an example: </p>
- <source>
-<document xmlns=&document.xsd>
+ grammar using an xsi:schemaLocation attribute if they use
+ namespaces, and an xsi:noNamespaceSchemaLocation attribute
+ otherwise. These should be attached to the root / top-level
element
+ in the document (for more details see XML Schema Part 1 section
4.3.2).
+ Here is an example with no target namespace: </p>
+<source><document
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:noNamespaceSchemaLocation='document.xsd'>
+...
+</document></source>
+ <p>Here is an example with a target namespace. Note that it is
an
+ error to specify a different namespace than the target namespace
+ defined in the Schema.</p>
+<source><document
+ xmlns='http://my.com'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://my.com document.xsd'>
...
-</document>
- </source>
- <p>Another requirement is that the XML Schema document's
grammar must
- have a <!DOCTYPE ...> line specifying the DTD for XML
Schema grammar.
- The DOCTYPE must specify the following system identifier:<br/>
- <code>
-http://www.w3.org/XML/Group/1999/09/23-xmlschema/structures/structures.dtd
- </code>
- </p>
- <p>Also, there must be an attribute declaration for the xmlns
attribute
- used to find the schema (document in the example above).</p>
- <p>Review the sample file, "data/personal.xsd" for an example
of an XML
+</document></source>
+ <p>Review the sample file, 'data/personal.xsd' for an example
of an XML
Schema grammar.</p>
</s2>
</s1>
1.3 +23 -22 xml-site/sources/xerces-j/y2k.xml
Index: y2k.xml
===================================================================
RCS file: /home/cvs/xml-site/sources/xerces-j/y2k.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- y2k.xml 1999/12/02 00:04:57 1.2
+++ y2k.xml 2001/05/22 20:18:59 1.3
@@ -1,28 +1,30 @@
<?xml version="1.0" standalone="no"?>
-<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
+<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="Y2K Compliance">
<s2 title="Apache Xerces Parser Year-2000 Readiness">
<p>Q: Are the Xerces parsers Year-2000-compliant? </p>
<p>Yes, Xerces-J and Xerces-C are Year 2000 compliant.
-They do not currently use any dates at all (at least until the XML Schema
date datatypes
-are fully supported). However, you may still have Y2K problems if the
underlying OS or Java implementation has
-problems with dates past year 2000 (e.g. OS calls which accept or return
year numbers).
-</p>
-<p>Most (UNIX) systems store dates internally as signed 32-bit integers
which contain the number of seconds since 1st January 1970, so the magic
boundary to worry about is the year 2038 and not 2000. But modern operating
systems shouldn't cause any trouble at all.
-</p>
-
-<p>The Apache Xerces project is an open-source software product of the
Apache Software Foundation.
-The project and the Foundation cannot and does not offer legal assurances
regarding any
-suitability of the software for your application. There are several
commercial
-support organizations and derivative products available that may be able to
certify the
-software and provide you with any assurances you may require (IBM's
Websphere product is one of them).
-</p>
-<p>The Apache HTTP server software is distributed with the following
-disclaimer, found in the software license:
-</p>
-<source>
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ They do not currently use any dates at all (at least until the
XML
+ Schema date datatypes are fully supported). However, you may
still
+ have Y2K problems if the underlying OS or Java implementation
has
+ problems with dates past year 2000 (e.g. OS calls which accept
or
+ return year numbers).</p>
+ <p>Most (UNIX) systems store dates internally as signed 32-bit
+ integers which contain the number of seconds since 1st January
1970,
+ so the magic boundary to worry about is the year 2038 and not
2000.
+ But modern operating systems shouldn't cause any trouble at
all.</p>
+
+ <p>The Apache Xerces project is an open-source software product
+ of the Apache Software Foundation. The project and the
Foundation
+ cannot and does not offer legal assurances regarding any
suitability
+ of the software for your application. There are several
commercial
+ support organizations and derivative products available that
may be
+ able to certify the software and provide you with any
assurances you
+ may require (IBM's Websphere product is one of them).</p>
+ <p>The Apache HTTP server software is distributed with the
following
+ disclaimer, found in the software license: </p>
+<source>THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
@@ -33,7 +35,6 @@
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
- </source>
-</s2>
+SUCH DAMAGE.</source>
+ </s2>
</s1>
1.1 xml-site/sources/xerces-j/docs-book.xml
Index: docs-book.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "./dtd/book.dtd">
<book title="Xerces-J Documentation" copyright="1999, 2000 The Apache
Software Foundation">
<external href="../index.html" label="Home"/>
<separator/>
<document id="index" label="Readme" source="readme.xml" />
<external href="http://xml.apache.org/dist/xerces-j/" label="Download"/>
<external href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/java/"
label="Repository"/>
<document id="install" label="Installation" source="install.xml" />
<separator/>
<document id="api" label="API Docs" source="api.xml" />
<!--
<container id="samples" label="Samples" source="samples.xml">
<entry id="domcount" source="sam-domcount.xml" />
<entry id="domwriter" source="sam-domwriter.xml"/>
<entry id="domfilter" source="sam-domfilter.xml"/>
<entry id="iterator" source="sam-iterator.xml" />
<entry id="tree" source="sam-tree.xml" />
<entry id="treeview" source="sam-treeview.xml" />
</container>
-->
<document id='samples' label='Samples' source='samples.xml'/>
<hidden id='domcount' source='sam-domcount.xml'/>
<hidden id="domwriter" source="sam-domwriter.xml"/>
<hidden id="domfilter" source="sam-domfilter.xml"/>
<hidden id="iterator" source="sam-iterator.xml" />
<hidden id="tree" source="sam-tree.xml" />
<hidden id="treeview" source="sam-treeview.xml" />
<document id="schema" label="Schema" source="schema.xml" />
<separator/>
<document id="properties" label="Properties" source="properties.xml" />
<document id="features" label="Features" source="features.xml" />
<group id="faqs" title="Frequently Asked Questions" label="FAQs">
<entry id="faq-general" source="faq-general.xml" />
<entry id="faq-build" source="faq-build.xml" />
<entry id="faq-write" source="faq-write.xml" />
<entry id="faq-performance"
source="faq-performance.xml" />
<entry id="faq-migrate" source="faq-migrate.xml" />
<entry id="faq-common" source="faq-common.xml" />
</group>
<hidden id="jpc" source="javapurecheck.xml"/>
<separator/>
<document id="releases" label="Releases" source="releases.xml" />
<document id="caveats" label="Caveats" source="caveats.xml" />
<document id="feedback" label="Feedback" source="feedback.xml" />
<separator/>
<document id="y2k" label="Y2K Compliance" source="y2k.xml" />
</book>
1.1 xml-site/sources/xerces-j/faq-migrate.xml
Index: faq-migrate.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="Migrating to &javaparsernamelong;">
<faq title="What should I be aware of when using various DOM parsers?">
<q>What should I be aware of when using various DOM parsers?</q>
<a><p>There are a couple of points to note when using the
various
DOM parsers. This FAQ discusses some of the differences
between the
Xerces, Oracle and Sun XML parsers:</p>
<ol>
<li><em>Parsing methods:</em>
<br/>The &javaparsername; and Oracle
parsers have a parser object that parses
XML files and constructs a DOM tree
which is queried
<ref>after</ref> parsing.
<br/>The Sun parser calls a static
method on the
<code>XmlDocument</code> class
to parse and construct a DOM tree.</li>
<li><em>Specifying the source file:</em>
<br/>All three parsers allow specifying
the source of the
XML document using the SAX
<code>InputSource</code> object
as well as parsing from
<code>java.io.InputStream</code>
and <code>java.io.Reader</code>
object.</li>
<li><em>Error handling:</em>
<br/>The &javaparsername; parser uses
the SAX <code>ErrorHandler</code> mechanism
on all parser types, including DOM.
<br/>The Oracle parser only allows you
to specify which
output stream or writer you want the
error to be written.
<br/>The Sun parser has no way to
request
error notification when parsing XML
files into DOM trees.
An exceptions will be thrown if an
error occurs during
parsing.</li>
<li><em>Validation:</em>
<br/>The &javaparsername; and Oracle
DOM parsers use a method to
set validation.
<br/>Because of the way that DOM
documents are constructed from XML files
in the Sun parser, validation is set
via a parameter to the static
<code>createXmlDocument</code>
method.</li>
<li><em>Standard versus proprietary
features:</em>
<br/>If the user has written their
programs using the W3C DOM API,
then migrating to &javaparsername; is
easy. If however, the user takes
advantage of non-standard, proprietary
features of the Oracle and Sun
parsers and DOM implementations,
migration will be harder.
This document does not
go into any detail regarding migration
of features specific to each
parser's implementation that are
non-standard.</li>
</ol>
<p><em>Samples:</em></p>
<p>Xerces 1.0.x:</p>
<source>// instantiate parser
org.apache.xerces.parsers.DOMParser parser;
parser = new org.apache.xerces.parsers.DOMParser();
// specifying validation
boolean validate = /* true or false */;
parser.setFeature("http://xml.org/sax/features/validation", validate);
// installing error handler
org.xml.sax.ErrorHandler handler = /* SAX error handler */;
parser.setErrorHandler(handler);
// parsing document from URI string
String uri = /* uri */;
parser.parse(uri);
// parsing document from input stream
java.io.InputStream stream = /* input stream */;
parser.parse(new org.xml.sax.InputSource(stream));
// parsing document from reader
java.io.Reader reader = /* reader */;
parser.parse(new org.xml.sax.InputSource(reader));
// querying document after parse
org.w3c.dom.Document document;
document = parser.getDocument();</source>
<p>Oracle 2.0.2.x:</p>
<source>// instantiate parser
oracle.xml.parser.v2.DOMParser parser;
parser = oracle.xml.parser.v2.DOMParser();
// specifying validation
boolean validate = /* true or false */;
parser.setValidationMode(validate);
// installing error stream to output stream (with and without encoding)
java.io.OutputStream output = /* output stream */;
String encoding = /* Java encoding name */;
parser.setErrorStream(output);
parser.setErrorStream(output, encoding);
// installing error stream to print writer
java.io.PrintWriter printer = /* print writer */;
parser.setErrorStream(printer);
// parsing document from URI string
String uri = /* uri */;
parser.parse(uri);
// parsing document from input stream
java.io.InputStream stream = /* input stream */;
parser.parse(stream);
// parsing document from reader
java.io.Reader reader = /* reader */;
parser.parse(reader);
// querying document after parse
org.w3c.dom.Document document;
document = parser.getDocument();</source>
<p>Sun TR2:</p>
<source>// parsing document from URI string
String uri = /* uri */;
Document document;
document = com.sun.xml.tree.XmlDocument.createXmlDocument(uri);
// parsing document from URI string (with validation)
boolean validate = /* true or false */;
document = com.sun.xml.tree.XmlDocument.createXmlDocument(uri, validate);
// parsing document from input stream
java.io.InputStream stream = /* input stream */;
document = com.sun.xml.tree.XmlDocument.createXmlDocument(stream, validate);
// parsing document from reader
java.io.Reader reader = /* reader */;
document = com.sun.xml.tree.XmlDocument.createXmlDocument
(new org.xml.sax.InputSource(reader), validate);</source>
</a>
</faq>
<faq title="What should I be aware of when using various SAX parsers?">
<q>What should I be aware of when using various SAX parsers?</q>
<a><p>There are a couple of points to note when using the
various
SAX parsers:</p>
<p>The SAX API has detailed specifications on how
documents are parsed
and entities are resolved, so little migration effort
required.
The only change is the construction of the SAX parser.
See the following examples for construction details.</p>
<note>Regarding validation:
<br/>If a parser is SAX2
compliant, there is a standard way of turning on
validation. The
Xerces parser implements the appropriate methods today,
even
though they haven't been finalized, yet. The parsers
downloaded
from Oracle and Sun do not yet implement these methods.
The Oracle parser has a method to turn validation on
and
off. The Sun parser requires you to instantiate a
separate parser object to perform validation.</note>
<p><em>Samples:</em></p>
<p>Xerces 1.0.x:</p>
<source>// instantiate parser
org.apache.xerces.parsers.SAXParser parser;
parser = new org.apache.xerces.parsers.SAXParser();
// specifying validation
boolean validate = /* true or false */;
parser.setFeature("http://xml.org/sax/features/validation", validate);
// installing error handler
org.xml.sax.ErrorHandler errorHandler = /* SAX error handler */;
parser.setErrorHandler(errorHandler);
// installing document handler
org.xml.sax.DocumentHandler documentHandler = /* SAX document handler */;
parser.setDocumentHandler(documentHandler);
// parsing document from URI string
String uri = /* uri */;
parser.parse(uri);
// parsing document from input stream
java.io.InputStream stream = /* input stream */;
parser.parse(new org.xml.sax.InputSource(stream));
// parsing document from reader
java.io.Reader reader = /* reader */;
parser.parse(new org.xml.sax.InputSource(reader));</source>
<p>Oracle 2.0.2.x:</p>
<source>// instantiate parser
oracle.xml.parser.v2.SAXParser parser;
parser = oracle.xml.parser.v2.SAXParser();
// specifying validation
boolean validate = /* true or false */;
parser.setValidationMode(validate);
// ... the rest is the same as Xerces ...</source>
<p>Sun TR2:</p>
<source>// instantiate parser
boolean validate = /* true or false */;
com.sun.xml.parser.Parser parser;
if (validate) {
parser = new com.sun.xml.parser.ValidatingParser();
}
else {
parser = new com.sun.xml.parser.Parser();
}
// ... the rest is the same as Xerces ...</source>
</a>
</faq>
<faq title="Migrating from XML4J Version 2.0.x">
<q>How do I migrate my code from XML4J Version 2.0.x?</q>
<a>
<p>Migrating from the version 2.0.x native SAX and DOM parser
classes should be straight forward.</p>
<table>
<tr><th>change this XML4J class</th><th>to this
&javaparsername; class</th></tr>
<tr><td>com.ibm.xml.parsers.SAXParser</td>
<td>org.apache.xerces.parsers.SAXParser</td></tr>
<tr><td>com.ibm.xml.parsers.ValidatingSAXParser</td>
<td>org.apache.xerces.parsers.SAXParser + switch</td></tr>
<tr><td>com.ibm.xml.parsers.NonValidatingDOMParser</td>
<td>org.apache.xerces.parsers.DOMParser</td></tr>
<tr><td>com.ibm.xml.parsers.DOMParser</td>
<td>org.apache.xerces.parsers.DOMParser + switch</td></tr>
</table>
<p>Table entries that say " + switch" mean that you should use
the
Configurable API to turn validation on. See the answer in
<link idref="faq-general" anchor="valid">Validation</link>.</p>
</a>
</faq>
</faqs>
1.1 xml-site/sources/xerces-j/faq-performance.xml
Index: faq-performance.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE faqs SYSTEM "./dtd/faqs.dtd">
<faqs title="Performance FAQs">
<faq title="General Performance">
<q>General Performance</q>
<a><p>Don't use XML where it doesn't make sense. XML is not a
panacea.
You will not get good performance by transferring and parsing a
lot of XML files. </p>
<p>Using XML is memory, CPU, and network intensive.</p></a>
</faq>
<faq title="Parser Performance">
<q>Parser Performance</q>
<a><p>Avoid creating a new parser each time you parse; reuse
parser
instances. A pool of reusable parser instances might be a good
idea
if you have multiple threads parsing at the same time.</p>
</a>
</faq>
<faq title="Parsing Documents Performance">
<q>Parsing Documents Performance</q>
<a><ul>
<li>Convert the document to US ASCII ("US-ASCII") or
Unicode
("UTF-8" or "UTF-16") before parsing. Documents written
using
ASCII are the fastest to parse because each character
is
guaranteed to be a single byte and map directly to
their
equivalent Unicode value. For documents that contain
Unicode
characters beyond the ASCII range, multiple byte
sequences
must be read and converted for each character. There is
a
performance penalty for this conversion. The UTF-16
encoding
alleviates some of this penalty because each character
is
specified using two bytes, assuming no surrogate
characters.
However, using UTF-16 can roughly double the size of
the
original document which takes longer to parse.</li>
<li>Explicitly specify "US-ASCII" encoding if your
document is in
ASCII format. If no encoding is specified, the XML
specification
requires the parser to assume UTF-8 which is slower to
process.</li>
<li>Avoid external entities and external DTDs. The
extra file
opens and transcoding setup is expensive.</li>
<li>Reduce character count; smaller documents are
parsed quicker.
Replace elements with attributes where it makes sense.
Avoid
gratuitous use of whitespace because the parser must
scan past it.</li>
<li>Avoid using too many default attributes. Defaulting
attribute values slows down processing.</li>
</ul>
</a>
</faq>
<faq title="XML Application Performance">
<q>XML Application Performance</q>
<a><ul>
<li>Turn validation off if you don't need it.
Validation is
expensive. Also, avoid using a DOCTYPE line in your XML
document.
The current version of the parser will always read the
DTD if the
DOCTYPE line is specified even when not validating.</li>
<li>For large documents, avoid using DOM which uses a
lot of
memory. Instead, use SAX if appropriate. The DOM parser
requires
that the entire document be read into memory before the
application processes the document. The SAX parser uses
very
little memory and notifies the application as parts of
the
document are parsed.</li>
</ul>
</a>
</faq>
</faqs>
1.1 xml-site/sources/xerces-j/javapurecheck.xml
Index: javapurecheck.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="JavaPureCheck Output">
<s2 title="JavaPureCheck Results">
<source>###################### JavaPureCheck Report ##########################
#
# Generated on : January 26, 2000 10:34:32 AM PST
# System Model Version : jdk11
# JavaPureCheck Version : 3.15
# Rule Base Version : 1.92
#
# Summary:
#
# PURE: 339 WARNING: 9 ERROR: 0
#
# Final Result : WARNING
#
######################################################################
Class: org.xml.sax.InputSource
Status: PURE
Class: org.xml.sax.misc.LexicalHandler
Status: PURE
Class: org.xml.sax.misc.NamespaceHandler
Status: PURE
Class: org.xml.sax.misc.DeclHandler
Status: PURE
Class: org.xml.sax.SAXNotSupportedException
Status: PURE
Class: org.xml.sax.AttributeList
Status: PURE
Class: org.xml.sax.SAXNotRecognizedException
Status: PURE
Class: org.xml.sax.DTDHandler
Status: PURE
Class: org.xml.sax.ErrorHandler
Status: PURE
Class: org.xml.sax.DocumentHandler
Status: PURE
Class: org.xml.sax.SAXException
Status: PURE
Class: org.xml.sax.helpers.LocatorImpl
Status: PURE
Class: org.xml.sax.helpers.ConfigurableParserAdapter
Status: PURE
Class: org.xml.sax.helpers.ParserFactory
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.xml.sax.helpers.AttributeListImpl
Status: PURE
Class: org.xml.sax.SAXParseException
Status: PURE
Class: org.xml.sax.Parser
Status: PURE
Class: org.xml.sax.EntityResolver
Status: PURE
Class: org.xml.sax.HandlerBase
Status: PURE
Class: org.xml.sax.Locator
Status: PURE
Class: org.xml.sax.Configurable
Status: PURE
Class: org.apache.xml.serialize.HTMLSerializer
Status: PURE
Class: org.apache.xml.serialize.BaseMarkupSerializer
Status: PURE
Class: org.apache.xml.serialize.SerializerFactory
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xml.serialize.Serializer
Status: PURE
Class: org.apache.xml.serialize.OutputFormat$DTD
Status: PURE
Class: org.apache.xml.serialize.OutputFormat$Defaults
Status: PURE
Class: org.apache.xml.serialize.OutputFormat
Warning: possible hard-coded path: text/xml
Note: Defines a bad path
Explanation: <Explanation required>
Warning: possible hard-coded path: text/plain
Note: Defines a bad path
Explanation: <Explanation required>
Warning: possible hard-coded path: application/pdf
Note: Defines a bad path
Explanation: <Explanation required>
Warning: possible hard-coded path: text/html
Note: Defines a bad path
Explanation: <Explanation required>
Warning: possible hard-coded path: -//W3C//DTD XHTML 1.0 Strict//EN
Note: Defines a bad path
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xml.serialize.Method
Status: PURE
Class: org.apache.xml.serialize.SerializerFactoryImpl
Status: PURE
Class: org.apache.xml.serialize.HTMLdtd
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xml.serialize.XMLSerializer
Status: PURE
Class: org.apache.xml.serialize.XHTMLSerializer
Status: PURE
Class: org.apache.xml.serialize.ElementState
Status: PURE
Class: org.apache.xml.serialize.TextSerializer
Status: PURE
Class: org.apache.xml.serialize.LineSeparator
Status: PURE
Class: org.apache.xml.serialize.DOMSerializer
Status: PURE
Class: org.apache.html.dom.HTMLDirectoryElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableRowElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableColElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLFieldSetElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLModElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableSectionElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLDocumentImpl
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.html.dom.NameNodeListImpl
Status: PURE
Class: org.apache.html.dom.HTMLStyleElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLBuilder
Status: PURE
Class: org.apache.html.dom.HTMLFontElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLMetaElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTextAreaElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLPreElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLUListElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLOptionElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLHRElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLLabelElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableCaptionElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLBaseFontElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLMenuElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLQuoteElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLObjectElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLSelectElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLFormElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLScriptElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLBRElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLOListElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLImageElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLBaseElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLFrameElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLHtmlElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLParagraphElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLDivElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLLIElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLHeadElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLOptGroupElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLButtonElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLTableCellElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLInputElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLBodyElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLAreaElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLHeadingElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLLegendElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLCollectionImpl
Status: PURE
Class: org.apache.html.dom.HTMLFormControl
Status: PURE
Class: org.apache.html.dom.HTMLParamElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLDOMImplementationImpl
Status: PURE
Class: org.apache.html.dom.HTMLTitleElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLMapElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLDListElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLAppletElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLIFrameElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLFrameSetElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLAnchorElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLIsIndexElementImpl
Status: PURE
Class: org.apache.html.dom.HTMLLinkElementImpl
Status: PURE
Class: org.apache.html.dom.CollectionIndex
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner
Status: PURE
Class: org.apache.xerces.framework.Version
Status: PURE
Class: org.apache.xerces.framework.XMLContentSpecNode
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLValidator$ContentSpec
Status: PURE
Class: org.apache.xerces.framework.XMLDTDScanner$EventHandler
Status: PURE
Class: org.apache.xerces.framework.XMLAttrList
Status: PURE
Class: org.apache.xerces.framework.XMLParser$NullReader
Status: PURE
Class: org.apache.xerces.framework.XMLParser$ReaderState
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$EventHandler
Status: PURE
Class: org.apache.xerces.framework.XMLValidator
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLErrorReporter
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$ScannerDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLParser
Status: PURE
Class: org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher
Status: PURE
Class: org.apache.xerces.framework.XMLDTDScanner
Status: PURE
Class: org.apache.xerces.domx.DOMException
Status: PURE
Class: org.apache.xerces.domx.XGrammarWriter
Status: PURE
Class: org.apache.xerces.domx.XGrammarWriter$OutputFormat
Status: PURE
Class: org.apache.xerces.readers.XMLEntityHandler$EntityReader
Status: PURE
Class: org.apache.xerces.readers.StreamingCharReader$DeferredError
Status: PURE
Class: org.apache.xerces.readers.StringReader
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xerces.readers.UTF8CharReader
Status: PURE
Class: org.apache.xerces.readers.CharReader
Status: PURE
Class: org.apache.xerces.readers.XMLDeclRecognizer
Status: PURE
Class: org.apache.xerces.readers.XCatalog
Status: PURE
Class: org.apache.xerces.readers.UCSReader
Status: PURE
Class: org.apache.xerces.readers.DefaultReaderFactory
Status: PURE
Class: org.apache.xerces.readers.XMLEntityHandler$CharBuffer
Status: PURE
Class: org.apache.xerces.readers.UTF8Recognizer
Status: PURE
Class: org.apache.xerces.readers.StreamingCharReader
Status: PURE
Class: org.apache.xerces.readers.UCSRecognizer
Status: PURE
Class: org.apache.xerces.readers.XCatalog$Parser
Status: PURE
Class: org.apache.xerces.readers.UTF8Reader
Status: PURE
Class: org.apache.xerces.readers.XMLEntityReaderFactory
Status: PURE
Class: org.apache.xerces.readers.XMLEntityReader
Status: PURE
Class: org.apache.xerces.readers.XCatalog$Parser$Resolver
Status: PURE
Class: org.apache.xerces.readers.AbstractCharReader$DeferredError
Status: PURE
Class: org.apache.xerces.readers.AbstractCharReader
Status: PURE
Class: org.apache.xerces.readers.MIME2Java
Status: PURE
Class: org.apache.xerces.readers.UTF8Recognizer$XMLDeclReader
Status: PURE
Class: org.apache.xerces.readers.EBCDICRecognizer
Status: PURE
Class: org.apache.xerces.readers.XMLEntityHandler
Status: PURE
Class: org.apache.xerces.readers.XMLCatalogHandler
Status: PURE
Class: org.apache.xerces.parsers.RevalidatingDOMParser
Status: PURE
Class: org.apache.xerces.parsers.SAXParser
Status: PURE
Class: org.apache.xerces.parsers.DOMParser
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xerces.validators.datatype.InvalidDatatypeValueException
Status: PURE
Class: org.apache.xerces.validators.datatype.BooleanValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.DecimalValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.IllegalFacetException
Status: PURE
Class: org.apache.xerces.validators.datatype.DatatypeMessageProvider
Status: PURE
Class: org.apache.xerces.validators.datatype.InternalDatatypeValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.UnknownFacetException
Status: PURE
Class: org.apache.xerces.validators.datatype.DatatypeValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.IntegerValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.TimeDurationValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.DoubleValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.IllegalFacetValueException
Status: PURE
Class: org.apache.xerces.validators.datatype.StringValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.FloatValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.TimeInstantValidator
Status: PURE
Class: org.apache.xerces.validators.datatype.RealValidator
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator
Status: PURE
Class: org.apache.xerces.validators.dtd.CMStateSet
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$EventHandler
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttributeValidator
Status: PURE
Class: org.apache.xerces.validators.dtd.CMNode
Status: PURE
Class: org.apache.xerces.validators.dtd.SimpleContentModel
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorENTITY
Status: PURE
Class: org.apache.xerces.validators.dtd.CMLeaf
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorID
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorENTITIES
Status: PURE
Class: org.apache.xerces.validators.dtd.CMBinOp
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorNOTATION
Status: PURE
Class: org.apache.xerces.validators.dtd.DFAContentModel
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorIDREF
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorIDREFS
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorNMTOKENS
Status: PURE
Class: org.apache.xerces.validators.dtd.ElementDeclPool
Status: PURE
Class: org.apache.xerces.validators.dtd.CMException
Status: PURE
Class: org.apache.xerces.validators.dtd.CMUniOp
Status: PURE
Class: org.apache.xerces.validators.dtd.EntityPool$RequiredNotation
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorCDATA
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$AttValidatorNMTOKEN
Status: PURE
Class: org.apache.xerces.validators.dtd.XMLContentModel
Status: PURE
Class: org.apache.xerces.validators.dtd.InsertableElementsInfo
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator
$AttValidatorENUMERATION
Status: PURE
Class: org.apache.xerces.validators.dtd.DTDValidator$ContentSpecImpl
Status: PURE
Class: org.apache.xerces.validators.dtd.EntityPool
Status: PURE
Class: org.apache.xerces.validators.dtd.MixedContentModel
Status: PURE
Class: org.apache.xerces.validators.schema.XSchemaValidator
$DatatypeValidatorRegistry
Status: PURE
Class: org.apache.xerces.validators.schema.XSchemaValidator
Status: PURE
Class: org.apache.xerces.validators.schema.DatatypeContentModel
Status: PURE
Class: org.apache.xerces.validators.schema.XUtil
Status: PURE
Class: org.apache.xerces.validators.schema.XSchemaValidator$ErrorHandler
Status: PURE
Class: org.apache.xerces.validators.schema.SchemaMessageProvider
Status: PURE
Class: org.apache.xerces.validators.schema.XSchemaValidator$Resolver
Status: PURE
Class: org.apache.xerces.validators.schema.XSchemaValidator$1
Status: PURE
Class: org.apache.xerces.utils.StringPool
Status: PURE
Class: org.apache.xerces.utils.SymbolCache
Status: PURE
Class: org.apache.xerces.utils.CharDataChunk
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xerces.utils.ChunkyByteArray
Status: PURE
Class: org.apache.xerces.utils.NamespacesScope$NamespacesHandler
Status: PURE
Class: org.apache.xerces.utils.XMLMessages
Status: PURE
Class: org.apache.xerces.utils.StringHasher
Status: PURE
Class: org.apache.xerces.utils.StringPool$StringProducer
Status: PURE
Class: org.apache.xerces.utils.XMLMessageProvider
Status: PURE
Class: org.apache.xerces.utils.ImplementationMessages
Status: PURE
Class: org.apache.xerces.utils.ChunkyCharArray
Status: PURE
Class: org.apache.xerces.utils.NamespacesScope
Status: PURE
Class: org.apache.xerces.utils.UTF8DataChunk
Warning: method reference: java.lang.Class.forName(java.lang.String)
Note: May load impure class
Explanation: <Explanation required>
Status: WARNING
Class: org.apache.xerces.utils.StringPool$CharArrayRange
Status: PURE
Class: org.apache.xerces.utils.XMLCharacterProperties
Status: PURE
Class: org.apache.xerces.msg.XMLMessages
Status: PURE
Class: org.apache.xerces.msg.SchemaMessages
Status: PURE
Class: org.apache.xerces.msg.ImplementationMessages
Status: PURE
Class: org.apache.xerces.msg.DatatypeMessages
Status: PURE
Class: org.apache.xerces.dom.DeferredNotationImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredEntityImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredNode
Status: PURE
Class: org.apache.xerces.dom.DeferredProcessingInstructionImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredDocumentTypeImpl
Status: PURE
Class: org.apache.xerces.dom.TreeWalkerImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredEntityReferenceImpl
Status: PURE
Class: org.apache.xerces.dom.NotationImpl
Status: PURE
Class: org.apache.xerces.dom.events.EventImpl
Status: PURE
Class: org.apache.xerces.dom.events.MutationEventImpl
Status: PURE
Class: org.apache.xerces.dom.DOMImplementationImpl
Status: PURE
Class: org.apache.xerces.dom.NodeImpl$EnclosingAttr
Status: PURE
Class: org.apache.xerces.dom.DeferredCommentImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredElementImpl
Status: PURE
Class: org.apache.xerces.dom.DocumentTypeImpl
Status: PURE
Class: org.apache.xerces.dom.NodeImpl$LEntry
Status: PURE
Class: org.apache.xerces.dom.DeferredElementNSImpl
Status: PURE
Class: org.apache.xerces.dom.ElementDefinitionImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredTextImpl
Status: PURE
Class: org.apache.xerces.dom.DocumentFragmentImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredDocumentImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredDocumentImpl$IntVector
Status: PURE
Class: org.apache.xerces.dom.CharacterDataImpl$1
Status: PURE
Class: org.apache.xerces.dom.CommentImpl
Status: PURE
Class: org.apache.xerces.dom.NodeIteratorImpl
Status: PURE
Class: org.apache.xerces.dom.DOMExceptionImpl
Status: PURE
Class: org.apache.xerces.dom.CharacterDataImpl
Status: PURE
Class: org.apache.xerces.dom.ElementNSImpl
Status: PURE
Class: org.apache.xerces.dom.AttrNSImpl
Status: PURE
Class: org.apache.xerces.dom.LCount
Status: PURE
Class: org.apache.xerces.dom.DeferredCDATASectionImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredAttrNSImpl
Status: PURE
Class: org.apache.xerces.dom.DeepNodeListImpl
Status: PURE
Class: org.apache.xerces.dom.NodeImpl
Status: PURE
Class: org.apache.xerces.dom.ProcessingInstructionImpl
Status: PURE
Class: org.apache.xerces.dom.AttrImpl
Status: PURE
Class: org.apache.xerces.dom.CDATASectionImpl
Status: PURE
Class: org.apache.xerces.dom.ElementImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredAttrImpl
Status: PURE
Class: org.apache.xerces.dom.NodeContainer
Status: PURE
Class: org.apache.xerces.dom.TextImpl
Status: PURE
Class: org.apache.xerces.dom.EntityReferenceImpl
Status: PURE
Class: org.apache.xerces.dom.DocumentImpl
Status: PURE
Class: org.apache.xerces.dom.DeferredElementDefinitionImpl
Status: PURE
Class: org.apache.xerces.dom.NamedNodeMapImpl
Status: PURE
Class: org.apache.xerces.dom.EntityImpl
Status: PURE
Class: org.w3c.dom.DocumentType
Status: PURE
Class: org.w3c.dom.html.HTMLBodyElement
Status: PURE
Class: org.w3c.dom.html.HTMLUListElement
Status: PURE
Class: org.w3c.dom.html.HTMLLabelElement
Status: PURE
Class: org.w3c.dom.html.HTMLObjectElement
Status: PURE
Class: org.w3c.dom.html.HTMLOptGroupElement
Status: PURE
Class: org.w3c.dom.html.HTMLDivElement
Status: PURE
Class: org.w3c.dom.html.HTMLBaseElement
Status: PURE
Class: org.w3c.dom.html.HTMLAnchorElement
Status: PURE
Class: org.w3c.dom.html.HTMLLIElement
Status: PURE
Class: org.w3c.dom.html.HTMLBRElement
Status: PURE
Class: org.w3c.dom.html.HTMLTitleElement
Status: PURE
Class: org.w3c.dom.html.HTMLFieldSetElement
Status: PURE
Class: org.w3c.dom.html.HTMLDOMImplementation
Status: PURE
Class: org.w3c.dom.html.HTMLFrameSetElement
Status: PURE
Class: org.w3c.dom.html.HTMLFrameElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableRowElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableColElement
Status: PURE
Class: org.w3c.dom.html.HTMLScriptElement
Status: PURE
Class: org.w3c.dom.html.HTMLHeadingElement
Status: PURE
Class: org.w3c.dom.html.HTMLMapElement
Status: PURE
Class: org.w3c.dom.html.HTMLTextAreaElement
Status: PURE
Class: org.w3c.dom.html.HTMLIFrameElement
Status: PURE
Class: org.w3c.dom.html.HTMLDocument
Status: PURE
Class: org.w3c.dom.html.HTMLModElement
Status: PURE
Class: org.w3c.dom.html.HTMLDirectoryElement
Status: PURE
Class: org.w3c.dom.html.HTMLMenuElement
Status: PURE
Class: org.w3c.dom.html.HTMLButtonElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableElement
Status: PURE
Class: org.w3c.dom.html.HTMLParagraphElement
Status: PURE
Class: org.w3c.dom.html.HTMLHRElement
Status: PURE
Class: org.w3c.dom.html.HTMLFontElement
Status: PURE
Class: org.w3c.dom.html.HTMLBaseFontElement
Status: PURE
Class: org.w3c.dom.html.HTMLLegendElement
Status: PURE
Class: org.w3c.dom.html.HTMLStyleElement
Status: PURE
Class: org.w3c.dom.html.HTMLOListElement
Status: PURE
Class: org.w3c.dom.html.HTMLOptionElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableCellElement
Status: PURE
Class: org.w3c.dom.html.HTMLFormElement
Status: PURE
Class: org.w3c.dom.html.HTMLLinkElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableCaptionElement
Status: PURE
Class: org.w3c.dom.html.HTMLInputElement
Status: PURE
Class: org.w3c.dom.html.HTMLMetaElement
Status: PURE
Class: org.w3c.dom.html.HTMLParamElement
Status: PURE
Class: org.w3c.dom.html.HTMLPreElement
Status: PURE
Class: org.w3c.dom.html.HTMLSelectElement
Status: PURE
Class: org.w3c.dom.html.HTMLCollection
Status: PURE
Class: org.w3c.dom.html.HTMLQuoteElement
Status: PURE
Class: org.w3c.dom.html.HTMLHeadElement
Status: PURE
Class: org.w3c.dom.html.HTMLAreaElement
Status: PURE
Class: org.w3c.dom.html.HTMLAppletElement
Status: PURE
Class: org.w3c.dom.html.HTMLHtmlElement
Status: PURE
Class: org.w3c.dom.html.HTMLIsIndexElement
Status: PURE
Class: org.w3c.dom.html.HTMLImageElement
Status: PURE
Class: org.w3c.dom.html.HTMLTableSectionElement
Status: PURE
Class: org.w3c.dom.html.HTMLElement
Status: PURE
Class: org.w3c.dom.html.HTMLDListElement
Status: PURE
Class: org.w3c.dom.ProcessingInstruction
Status: PURE
Class: org.w3c.dom.traversal.NodeIterator
Status: PURE
Class: org.w3c.dom.traversal.NodeFilter
Status: PURE
Class: org.w3c.dom.traversal.TreeWalker
Status: PURE
Class: org.w3c.dom.traversal.DocumentTraversal
Status: PURE
Class: org.w3c.dom.Attr
Status: PURE
Class: org.w3c.dom.CDATASection
Status: PURE
Class: org.w3c.dom.DocumentFragment
Status: PURE
Class: org.w3c.dom.Comment
Status: PURE
Class: org.w3c.dom.Text
Status: PURE
Class: org.w3c.dom.DOMImplementation
Status: PURE
Class: org.w3c.dom.Element
Status: PURE
Class: org.w3c.dom.DOMException
Status: PURE
Class: org.w3c.dom.EntityReference
Status: PURE
Class: org.w3c.dom.events.MutationEvent
Status: PURE
Class: org.w3c.dom.events.EventListener
Status: PURE
Class: org.w3c.dom.events.EventTarget
Status: PURE
Class: org.w3c.dom.events.EventException
Status: PURE
Class: org.w3c.dom.events.Event
Status: PURE
Class: org.w3c.dom.events.DocumentEvent
Status: PURE
Class: org.w3c.dom.Document
Status: PURE
Class: org.w3c.dom.NodeList
Status: PURE
Class: org.w3c.dom.Notation
Status: PURE
Class: org.w3c.dom.NamedNodeMap
Status: PURE
Class: org.w3c.dom.CharacterData
Status: PURE
Class: org.w3c.dom.Node
Status: PURE
Class: org.w3c.dom.Entity
Status: PURE
Final Result : WARNING</source>
</s2>
</s1>
1.1 xml-site/sources/xerces-j/sam-domcount.xml
Index: sam-domcount.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="SAX/DOMCount Samples">
<s2 title="Running SAXCount and DOMCount">
<p>SAXCount and DOMCount invoke the parser
on an XML document, and print out information about the
document. By default, SAXCount creates a non-validating
SAX parser and DOMCount creates a validating DOM parser.
They both count the number of elements, attributes, text
characters,
and ignorable whitespace characters in the document and display
the
amount of time it takes to complete the task. </p>
<p>The command lines below expect
the current directory to be the directory containing the JAR
file.</p>
<p>Requirements:</p>
<ul>
<li>&javaparsername; is loaded on your computer.</li>
<li>JDK is loaded on your computer.</li>
</ul>
<p>Source code: </p>
<ul>
<li>SAXCount.java</li>
<li>DOMCount.java</li>
</ul>
</s2>
<s2 title="SAXCount">
<p><em>To run SAXCount:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>SAXCount</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then the <code>SAXCount</code> can be invoked
by double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: drive.</p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java sax.SAXCount data/personal.xml</source>
<p><em>Switches:</em></p>
<p>SAXCount also allows you to change the default behavior
using the
following command line flags: </p>
<ul>
<li>-p Specify the parser class to be used.
<br/>The available parsers are:</li>
<ul>
<li>org.apache.xerces.parsers.SAXParser
[default parser]</li>
</ul>
<li>-h Print SAXCount help information. [default is no
help]</li>
<li>-v Turn on validation</li>
</ul>
<p>Running SAXCount with the default settings is equivalent to
running SAXCount like this (type this in as one long command
line): </p>
<source>java sax.SAXCount -p org.apache.xerces.parsers.SAXParser
data/personal.xml </source>
<p>Bringing up the help information: </p>
<source>java sax.SAXCount -h </source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
<s2 title="DOMCount">
<p><em>To run DOMCount:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>DOMCount</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then the <code>DOMCount</code> can be invoked
by double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: dirve.</p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java dom.DOMCount data/personal.xml</source>
<p><em>Switches:</em></p>
<p>DOMCount also allows you to change the default behavior via
the
following command line flags: </p>
<ul>
<li>-p Specify the parser class to be used.
<br/>The available parsers are:</li>
<ul>
<li>dom.wrappers.DOMParser [default parser]</li>
</ul>
<li>-h Print DOMCount help information. [default is no
help]</li>
</ul>
<p>Running DOMCount with the default settings is equivalent to
running
<code>DOMCount</code> like this (type this in as one long
command line): </p>
<source>java dom.DOMCount -p dom.wrappers.DOMParser
data/personal.xml </source>
<p>Bringing up the help information: </p>
<source>java dom.DOMCount -h</source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
</s1>
1.1 xml-site/sources/xerces-j/sam-domfilter.xml
Index: sam-domfilter.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="DOMFilter Sample">
<s2 title="Running DOMFilter">
<p><code>DOMFilter</code> parses an XML document, searching for
specific elements
by name, or elements with specific attributes.</p>
<p>Requirements:</p>
<ul>
<li>&javaparsername; is loaded on your computer.</li>
<li>JDK is loaded on your computer.</li>
</ul>
<p>Source code: </p>
<ul>
<li>DOMFilter.java</li>
</ul>
</s2>
<s2 title="DOMFilter">
<p><em>To run DOMFilter:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>DOMFilter</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then the <code>DOMFilter</code> can be invoked
by double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: dirve.</p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java dom.DOMFilter data/personal.xml</source>
<p><em>Switches:</em></p>
<p><code>DOMFilter</code> also allows you to change the default
behavior using the
following command line flags (type this in as one long command
line): </p>
<ul>
<li>-p Specify the parser class to be used.
<br/>The available parsers are:</li>
<ul>
<li>dom.wrappers.DOMParser [default parser]</li>
</ul>
<li>-h Print DOMCount help information. [default is no
help]</li>
<li>-e Specify the name of the element to search for.
[defaults to matching all elements]</li>
<li>-a Specify the name of the attribute to search for.
[defaults to matching all attributes]</li>
</ul>
<p>Running <code>DOMFilter</code> with the default settings is
equivalent to running
<code>DOMFilter</code> like this: </p>
<source>java dom.DOMFilter -p dom.wrappers.DOMParser
data/personal.xml </source>
<p>Bringing up the help information: </p>
<source>java dom.DOMFilter -h</source>
<p>Searching for elements: </p>
<source>java dom.DOMFilter -e family data/personal.xml</source>
<p>Search for attributes: </p>
<source>java dom.DOMFilter -a subordinates data/personal.xml</source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
</s1>
1.1 xml-site/sources/xerces-j/sam-domwriter.xml
Index: sam-domwriter.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="SAX/DOMWriter Samples">
<s2 title="Running SAXWriter and DOMWriter">
<p><code>SAXWriter</code> and <code>DOMWriter</code> parse your
input file,
and print it out in XML format. A command line option can be
used to
print in a "canonical" XML format so the output can be used to
compare
XML documents. SAXWriter and DOMWriter also display any errors
or
warnings that occurred during the parse.</p>
<p><code>DOMWriter</code> provides a -e switch to set the
output
Java encoding. </p>
<p>The command lines below expect the current directory to be
the
directory containing the JAR file.</p>
<p>Requirements:</p>
<ul>
<li>&javaparsername; is loaded on your computer.</li>
<li>JDK is loaded on your computer.</li>
</ul>
<p>Source code: </p>
<ul>
<li>SAXWriter.java</li>
<li>DOMWriter.java</li>
</ul>
</s2>
<s2 title="SAXWriter">
<p><em>To run SAXWriter:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>SAXWriter</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then the <code>SAXWriter</code> can be invoked
by double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: drive.</p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java sax.SAXWriter data/personal.xml</source>
<p><em>Switches:</em></p>
<p>SAXCount also allows you to change the default behavior
using the
following command line flags: </p>
<ul>
<li>-p Specify the parser class to be used.
<br/>The available parsers are:</li>
<ul>
<li>org.apache.xerces.parsers.SAXParser
[default parser]</li>
</ul>
<li>-h Print SAXWriter help information. [default is no
help]</li>
<li>-c Output in canonical format. [default is normal
format] </li>
</ul>
<p>Running <code>SAXWriter</code> with the default settings is
equivalent to
running <code>SAXWriter</code> like this (type this in as one
long command line): </p>
<source>java sax.SAXWriter -p org.apache.xerces.parsers.SAXParser
data/personal.xml </source>
<p>Bringing up the help information: </p>
<source>java sax.SAXWriter -h </source>
<p>Print in canonical format: </p>
<source>java sax.SAXWriter -c data/personal.xml</source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
<s2 title="DOMWriter">
<p><em>To run DOMWriter:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>DOMWriter</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then the <code>DOMWriter</code> can be invoked
by double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: dirve.</p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java dom.DOMWriter data/personal.xml</source>
<p><em>Switches:</em></p>
<p>DOMCount also allows you to change the default behavior via
the
following command line flags (type this in as one long command
line): </p>
<ul>
<li>-p Specify the parser class to be used.
<br/>The available parsers are:</li>
<ul>
<li>dom.wrappers.DOMParser [default parser]</li>
</ul>
<li>-h Print DOMWriter help information. [default is no
help]</li>
<li>-c Output in canonical format. [default is normal
format]</li>
<li>-e encodingName Output using the specified
encoding. [default is UTF8]</li>
</ul>
<p>Running <code>DOMWriter</code> with the default settings is
equivalent to running
<code>DOMWriter</code> like this: </p>
<source>java dom.DOMWriter -p dom.wrappers.DOMParser
data/personal.xml </source>
<p>Bringing up the help information: </p>
<source>java dom.DOMWriter -h</source>
<p>Searching for elements: </p>
<source>java dom.DOMWriter -c data/personal.xml</source>
<p>Running DOMWriter with the -e switch and no encoding
specified
will print out a list of valid encoding names: </p>
<source>java dom.DOMWriter -e</source>
<p>Prints the following: </p>
<source>Java Encoding one of (case sensitive):
Default
8859_1 8859_2 8859_3 8859_4 8859_5 8859_6 8859_7
8859_8 8859_9 Cp037 Cp273 Cp277 Cp278 Cp280
Cp284 Cp285 Cp297 Cp420 Cp424 Cp437 Cp500
Cp737 Cp775 Cp838 Cp850 Cp852 Cp855 Cp856
Cp857 Cp860 Cp861 Cp862 Cp863 Cp864 Cp865
Cp866 Cp868 Cp869 Cp870 Cp871 Cp874 Cp875
Cp918 Cp921 Cp922 Cp930 Cp933 Cp935 Cp937
Cp939 Cp942 Cp948 Cp949 Cp950 Cp964 Cp970
Cp1006 Cp1025 Cp1026 Cp1046 Cp1097 Cp1098 Cp1112
Cp1122 Cp1123 Cp1124 Cp1250 Cp1251 Cp1252 Cp1253
Cp1254 Cp1255 Cp1256 Cp1257 Cp1258 Cp1381 Cp1383
Cp33722 MS874 DBCS_ASCII DBCS_EBCDIC EUC EUCJIS GB2312
GBK ISO2022CN_CNS ISO2022CN_GB JIS JIS0208 KOI8_R KSC5601
MS874 SJIS SingleByte Big5 CNS11643 MacArabic
MacCentralEurope MacCroatian MacCyrillic MacDingbat
MacGreek MacHebrew MacIceland MacRoman MacRomania
MacSymbol MacThai MacTurkish MacUkraine SJIS Unicode
UnicodeBig UnicodeLittle UTF8</source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
</s1>
1.1 xml-site/sources/xerces-j/sam-treeview.xml
Index: sam-treeview.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">
<s1 title="TreeViewer Sample">
<s2 title="Running TreeViewer">
<p><code>TreeViewer</code> displays the input file in a
graphical tree
based interface. This sample highlights the error handling
capabilities of the parser, demonstrating how the parser can
recover from many types of common errors. </p>
<p>Requirements:</p>
<ul>
<li>&javaparsername; is loaded on your computer.</li>
<li>Either:</li>
<ul><li>JDK 1.1.8 and Swing1.1.1 are is loaded on your
computer.</li></ul>
<li>Or:</li>
<ul><li>Java 2 (jdk1.2.2) is loaded on your
computer.</li></ul>
</ul>
<p>Source code: </p>
<ul>
<li>TreeViewer.java</li>
<li>TreeView.java</li>
<li>DOMTree.java</li>
<li>DefaultImages.java</li>
</ul>
</s2>
<s2 title="TreeViewer">
<p><em>To run TreeViewer:</em></p>
<ol>
<li>open up a MS-DOS command line window</li>
<li>set the path to the jdk\bin directory</li>
<li>change directory to the latest
&javaparserdirectory; directory</li>
<li>invoke the <code>TreeViewer</code> sample</li>
</ol>
<p><em>On Windows:</em></p>
<p>The easiest way to do this is to create a .bat file using
the
Notepad editor. Then <code>TreeViewer</code> can be invoked by
double clicking
on the file name or icon. The following command lines assume
that
both the jdk and the &javaparserdirectory; directories are
located directly below
the c: drive.</p>
<p><em>With jdk1.1.8:</em></p>
<source>set PATH=%PATH%;c:\jdk1.1.8\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
set CLASSPATH=%CLASSPATH%;c:\Swing-1.1.1\swingall.jar
cd c:\&javaparserdirectory;
java ui.TreeViewer data/personal.xml</source>
<p><em>With jdk1.2.2:</em></p>
<p>Swing is included in the Java 2 release and it doesn't
required
a separate reference. </p>
<source>set PATH=%PATH%;c:\jdk1.2.2\bin
set
CLASSPATH=%CLASSPATH%;c:\&javaparserdirectory;\xerces.jar;c:\&javaparserdirectory;\xercesSamples.jar
cd c:\&javaparserdirectory;
java ui.TreeViewer data/personal.xml</source>
<note>Parse your own XML file instead of
data/personal.xml</note>
</s2>
</s1>
1.1 xml-site/sources/xerces-j/site-book.xml
Index: site-book.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "./dtd/book.dtd">
<book title="Xerces-J Documentation" copyright="1999, 2000 The Apache
Software Foundation">
<external href="../index.html" label="Home"/>
<separator/>
<document id="index" label="Readme"
source="xerces-j/readme.xml" />
<document id="install" label="Installation"
source="xerces-j/install.xml" />
<separator/>
<document id="api" label="API Docs" source="xerces-j/api.xml"
/>
<document id="samples" label="Samples"
source="xerces-j/samples.xml" />
<hidden id="iterator"
source="xerces-j/sam-iterator.xml"/>
<hidden id="tree"
source="xerces-j/sam-tree.xml" />
<document id="schema" label="Schema"
source="xerces-j/schema.xml" />
<separator/>
<document id="properties" label="Properties"
source="xerces-j/properties.xml" />
<document id="features" label="Features"
source="xerces-j/features.xml" />
<group id="faqs" label="FAQs"
>
<entry id="faq-general"
source="xerces-j/faq-general.xml" />
<entry id="faq-build"
source="xerces-j/faq-build.xml" />
<entry id="faq-write"
source="xerces-j/faq-write.xml" />
<entry id="faq-migrate"
source="xerces-j/faq-migrate.xml" />
<entry id="faq-common"
source="xerces-j/faq-common.xml" />
</group>
<separator/>
<document id="releases" label="Releases"
source="xerces-j/releases.xml" />
<document id="caveats" label="Caveats"
source="xerces-j/caveats.xml" />
<document id="feedback" label="Feedback"
source="xerces-j/feedback.xml" />
<separator/>
<document id="y2k" label="Y2K Compliance" source="xerces-j/y2k.xml"
/>
</book>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]