Commit d4460edc authored by Emmanuel Bourg's avatar Emmanuel Bourg

New upstream version 2.12.0

parent cb61a710
......@@ -71,4 +71,4 @@ annotating specifications. Other questions about this notice can be directed to
<P></P>
<ADDRESS>Joseph Reagle &lt;<A
href="mailto:site-policy@w3.org">mailto:site-policy@w3.org</A> </ADDRESS>
<P>Last revised by Reagle $Date: 2004-04-06 13:20:26 -0400 (Tue, 06 Apr 2004) $</P></BODY></HTML>
<P>Last revised by Reagle $Date: 2004-04-06 22:50:26 +0530 (Tue, 06 Apr 2004) $</P></BODY></HTML>
......@@ -4,7 +4,7 @@
=========================================================================
Apache Xerces Java
Copyright 1999-2010 The Apache Software Foundation
Copyright 1999-2018 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
......
......@@ -24,7 +24,7 @@ Authors:
Anupam Bagchi <abagchi@apache.org>
Andy Clark, IBM
$Id: build.xml 1000923 2010-09-24 15:57:16Z mrglavas $
$Id: build.xml 1829239 2018-04-16 06:17:53Z mukulg $
==================================================================== -->
<project default="usage" basedir=".">
......@@ -57,9 +57,9 @@ Authors:
<property name='parser.Name' value='Xerces-J'/>
<property name='parser.name' value='xerces-j'/>
<property name='parser.shortname' value='xerces'/>
<property name='parser.Version' value='2.11.0'/>
<property name='parser.version' value='2.11.0'/>
<property name='parser_version' value='2_11_0'/>
<property name='parser.Version' value='2.12.0'/>
<property name='parser.version' value='2.12.0'/>
<property name='parser_version' value='2_12_0'/>
<property name='deprecatedjar.parser' value='xerces.jar'/>
<property name='jar.apis' value='xml-apis.jar'/>
......@@ -76,7 +76,7 @@ Authors:
<property name='default.parser.config.name' value='XIncludeAwareParserConfiguration'/>
<property name='default.parser.config.qualified' value='org.apache.xerces.parsers.XIncludeAwareParserConfiguration'/>
<property name="year" value="1999-2010"/>
<property name="year" value="1999-2018"/>
<property name="copyright" value="Copyright &#169; ${year} The Apache Software Foundation. All Rights Reserved."/>
<echo message= "---------------- ${parser.Name} ${parser.Version} [${year}] ---------------"/>
......@@ -427,6 +427,7 @@ Authors:
classpath="${java.class.path}:${doc.generator.package}:./tools/xalan.jar"
classname="${doc.generator}"
failOnError="yes">
<sysproperty key="java.awt.headless" value="true"/>
<arg value="targetDirectory=${build.docs}"/>
<arg value="${build.dir}/xdocs/docs-book.xml"/>
<arg value="${build.dir}/xdocs/style"/>
......
......@@ -17,7 +17,7 @@
-->
<!DOCTYPE book SYSTEM 'dtd/book.dtd'>
<book title='&ParserName; Documentation'
copyright='1999-2010 The Apache Software Foundation'>
copyright='1999-2018 The Apache Software Foundation'>
<external label='Home' href='http://xerces.apache.org/'/>
<separator/>
<document label='Readme' title='&ParserNameLong; Readme'
......
......@@ -58,4 +58,4 @@
id ID #REQUIRED
source CDATA #REQUIRED>
<!-- CVS $Revision: 317483 $ $Date: 2001-08-22 20:35:39 -0400 (Wed, 22 Aug 2001) $ -->
<!-- CVS $Revision: 317483 $ $Date: 2001-08-23 06:05:39 +0530 (Thu, 23 Aug 2001) $ -->
......@@ -289,7 +289,7 @@
<!ENTITY hearts "&#9829;"> <!-- U+2665 ISOpub - black heart suit = valentine -->
<!ENTITY diams "&#9830;"> <!-- U+2666 ISOpub - black diamond suit -->
<!-- CVS $Revision: 318954 $ $Date: 2003-01-16 16:00:14 -0500 (Thu, 16 Jan 2003) $ -->
<!-- CVS $Revision: 318954 $ $Date: 2003-01-17 02:30:14 +0530 (Fri, 17 Jan 2003) $ -->
<!-- Portions (C) International Organization for Standardization 1986
Permission to copy in any form is granted for use with
......
......@@ -16,4 +16,4 @@
<!ATTLIST s3 title CDATA #REQUIRED>
<!ATTLIST s4 title CDATA #REQUIRED>
<!-- CVS $Revision: 317483 $ $Date: 2001-08-22 20:35:39 -0400 (Wed, 22 Aug 2001) $ -->
\ No newline at end of file
<!-- CVS $Revision: 317483 $ $Date: 2001-08-23 06:05:39 +0530 (Thu, 23 Aug 2001) $ -->
\ No newline at end of file
......@@ -16,4 +16,4 @@
<!ELEMENT q (#PCDATA)>
<!ELEMENT a (%blocks;)+>
<!-- CVS $Revision: 317483 $ $Date: 2001-08-22 20:35:39 -0400 (Wed, 22 Aug 2001) $ -->
\ No newline at end of file
<!-- CVS $Revision: 317483 $ $Date: 2001-08-23 06:05:39 +0530 (Thu, 23 Aug 2001) $ -->
\ No newline at end of file
......@@ -19,4 +19,4 @@
<!ELEMENT code (#PCDATA|%links;)*>
<!ELEMENT br EMPTY>
<!-- CVS $Revision: 317483 $ $Date: 2001-08-22 20:35:39 -0400 (Wed, 22 Aug 2001) $ -->
<!-- CVS $Revision: 317483 $ $Date: 2001-08-23 06:05:39 +0530 (Thu, 23 Aug 2001) $ -->
......@@ -206,7 +206,7 @@ serializer.serialize(document);</source>
<faq title="Using DOM Level 3 with JDK 1.4 and higher">
<q>How do I run DOM Level 3 applications under JDK 1.4 and higher?</q>
<a> <anchor name="dom3-run"/>
<p>Use the <jump href="http://java.sun.com/j2se/1.4/docs/guide/standards/">
<p>Use the <jump href="http://download.oracle.com/javase/1.4.2/docs/guide/standards/">
Endorsed Standards Override Mechanism</jump> to specify xercesImpl.jar and xml-apis.jar.
A more complete description is available <jump href="http://xml.apache.org/xalan-j/faq.html#faq-N100D6">here</jump>.
</p>
......
......@@ -58,7 +58,7 @@
<q>How can I use JAXP 1.4 on JDK 1.4 and above?</q>
<a>
<p>
Use the <jump href="http://java.sun.com/j2se/1.4/docs/guide/standards/">Endorsed Standards Override Mechanism</jump>
Use the <jump href="http://download.oracle.com/javase/1.4.2/docs/guide/standards/">Endorsed Standards Override Mechanism</jump>
to specify xml-apis.jar and xercesImpl.jar. This will override the version of JAXP in the JDK. A more complete
description is available <jump href="http://xml.apache.org/xalan-j/faq.html#faq-N100EF">here</jump>.
</p>
......@@ -298,7 +298,7 @@ and xni.parser.PSVIConfiguration.
<p>
As of version 2.10.0, Xerces requires JDK 1.3 or later to run and also requires JDK 1.3 or
later to build the source code. Starting with the Xerces 2.11.0 release, the XML Schema 1.1
experimental distribution requires JDK 1.4 or later to run and also to build the source code.
distribution requires JDK 1.4 or later to run and also to build the source code.
</p>
</a>
</faq>
......
......@@ -22,9 +22,10 @@
<q>How do I validate against XML schema?</q>
<a>
<p>XML Schema 1.0 validation has been integrated with the
regular SAXParser and DOMParser classes. No special classes are
regular SAXParser and DOMParser classes, and also with the JAXP
validation API using the XSD 1.0 Schema factory. No special classes are
required to parse documents that use a schema.</p>
<p>For XML Schema 1.1 validation, you'll need to use the JAXP
<p>For XML Schema 1.1 validation, the preferred way is to use the JAXP
validation API, using the XSD 1.1 Schema factory. Here's an example: </p>
<source>import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
......@@ -43,6 +44,12 @@ Schema s = sf.newSchema(schemaDocuments);
Validator v = s.newValidator();
v.validate(instanceDocument);
</source>
<p>Similar to XML Schema 1.0 validation using SAXParser and DOMParser classes that was
available earlier with Xerces, the same has been enhanced to support XML Schema 1.1
validation as well. To be able to do this, we need to construct the XSD 1.1 Schema factory
with the following java statement, SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1")
and do the subsequent validation.
</p>
<p>You can also refer to the JAXP sample, SourceValidator, where you
can validate XML documents against 1.1 schemas by specifying the "-xsd11"
flag when running the sample.</p>
......@@ -50,8 +57,7 @@ v.validate(instanceDocument);
grammars it uses by using an xsi:schemaLocation attribute if they use
namespaces, and an xsi:noNamespaceSchemaLocation attribute
otherwise. These are usually placed on the root / top-level element
in the document, though they may occur on any element; for more details see XML
Schema Part 1 section 4.3.2.
in the document, though they may occur on any element; for more details see <jump href="https://www.w3.org/TR/xmlschema-1/#composition-instances">XML Schema Part 1 section 4.3.2</jump>.
Here is an example with no target namespace: </p>
<source>&lt;document
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
......@@ -73,29 +79,28 @@ v.validate(instanceDocument);
</a>
</faq>
<faq title="XPath 2.0 support for XML Schema 1.1 validation">
<q>How Xerces-J uses an XPath 2.0 engine for XML Schema 1.1 assertions and type alternatives?</q>
<q>How an XPath 2.0 engine is used for XML Schema 1.1 assertions and CTAs?</q>
<a>
<p>XML Schema 1.1 'assertions' and 'type alternatives' require an <jump href="http://www.w3.org/TR/xpath20/">XPath 2.0</jump> processor
for evaluation. For XSD 1.1 assertions, full XPath 2.0 support is required. For XSD 1.1 type alternatives, XML schema engines can
provide full XPath 2.0 support or they can implement a smaller XPath 2.0 subset, as defined by the XSD 1.1 language.
Within the type alternatives implementation, Xerces-J first attempts to compile the XPath expression with a native Xerces "XPath subset"
parser. If parsing with the native Xerces "XPath subset" parser fails, Xerces-J transparently switches over to another processor which
supports all of XPath 2.0. The native processor in Xerces-J was written for efficiency, so you will likely get better performance if your
<p>XML Schema 1.1 assertions and CTAs require an XPath processor during evaluation. For XSD 1.1 assertions,
full <jump href="http://www.w3.org/TR/xpath20/">XPath 2.0</jump> support is required. For XSD 1.1 CTAs the XSD schema engines can
provide full XPath 2.0 support, or they can implement a <jump href="http://www.w3.org/TR/xmlschema11-1/#coss-ta">smaller XPath subset</jump>
as defined by the XSD 1.1 language. For CTAs Xerces uses the XSD 1.1 CTA XPath subset language by default, but can be made to use the full XPath 2.0 support by
setting the value of Xerces feature <code>http://apache.org/xml/features/validation/cta-full-xpath-checking</code> to 'true'.
The native CTA XPath processor in Xerces-J was written for efficiency, so you will likely get better performance if your
XPath expressions fall within the minimum subset defined by the XML Schema 1.1 specification. For full XPath 2.0 evaluation
(for XSD 1.1 'assertions', and optionally for 'type alternatives'), Xerces-J uses the
<jump href="http://wiki.eclipse.org/PsychoPathXPathProcessor">Eclipse/PsychoPath XPath 2.0 engine</jump>.
(for XSD 1.1 assertions, and optionally for CTAs), Xerces-J uses the <jump href="http://wiki.eclipse.org/PsychoPathXPathProcessor">Eclipse/PsychoPath XPath 2.0 engine</jump>.
Xerces-J does bundle along a PsychoPath XPath 2.0 jar (which requires JDK 1.4 or later).
</p>
<p>
Xerces-J bundles a PsychoPath XPath 2.0 jar (which requires JDK 1.4 or later).
We would like to acknowledge, work of following people for the XPath 2.0 support that comes with Xerces's
XML Schema 1.1 processor: Andrea Bittau (responsible for the original design and implementation, of XPath 2.0
processor that's been used by Xerces. Andrea donated his XPath 2.0 processor to the Eclipse Foundation, that
Xerces uses.), Dave Carver (Dave helped to set up software infrastructure at Eclipse Foundation's Web Tools Platform project,
for testing the XPath 2.0 processor as per W3C XPath 2.0 test suite. He also helped to improve compliance of
XPath 2.0 processor, to the W3C XPath 2.0 test suite by providing numerous bug fixes and implementation.),
Jesper Steen Moeller (Jesper as an Eclipse's Web Tools Platform committer, helped to improve the implementation
of the XPath 2.0 processor).
</p>
<note>
Users should be aware that more recent releases of the PsychoPath
XPath engine may have better conformance to the W3C XPath 2.0 language than the PsychoPath XPath 2.0 jar that's bundled with Apache Xerces-J.
Builds of the PsychoPath XPath 2.0 jar are available for download from following location,
<jump href="http://www.eclipse.org/webtools/">Eclipse Web Tools Platform (WTP) Project</jump> - The latest 'Released' or a 'Stable milestone'
WTP version can be downloaded from here (from which the PsychoPath XPath 2.0 jar can be extracted). The latest PsychoPath XPath 2.0 engine
builds at Eclipse require a minimum JDK level of 1.5.
</note>
</a>
</faq>
<faq title="Using Entities and CDATA Sections">
......@@ -115,7 +120,31 @@ v.validate(instanceDocument);
</p>
</a>
</faq>
<faq title="User defined error messages, for XML Schema 1.1 assertion failures">
<q>How to specify a user defined error message, when an XML Schema 1.1 assertion returns a 'false' result?</q>
<a>
<p>When evaluation of an XSD 1.1 assertion fails the Xerces XML Schema validator would produce a default error message,
which would say that which element or attribute was not validated successfully by an assertion and the schema type involved
during validation. It is however possible to, specify an user-defined error message for assertion failures. This is done by
specifying an attribute <code>"message"</code> in the XML namespace <code>'http://xerces.apache.org'</code> on an
<code>xs:assert</code> or <code>xs:assertion</code> element in the schema. In this case, the value of attribute <code>"message"</code>
is a text of user-defined assertion error message which is generated by the Xerces XML Schema validator when an assertion fails.
</p>
<p>
While using <code>xs:assertion</code> facet within simple types, if a user defined error message is used, a user may
dynamically construct the assertion error message by getting the value of XPath 2.0 context variable
<code>$value</code> into the error message. Following is an example of such an assertion error message:
<code>xerces:message="The number {$value} is not divisible by 2"</code>. With such a description of assertion error message,
a value from XML instance document is assigned to a variable reference <code>{$value}</code> which is a defined keyword.
During a validation failure, an error message for this example would be produced as follows,
<code>"The number 3 is not divisible by 2"</code> (the variable reference <code>{$value}</code> is assigned a value 3).
</p>
<note>
User-defined error messages for assertion failures are not a standard feature of the XML Schema 1.1 specification, and
are a Xerces extension to help XML Schema document authors to specify a problem domain specific error messages.
</note>
</a>
</faq>
<faq title="XML Schema API">
<q>Does Xerces provide access to the post schema validation infoset (PSVI)?</q>
<a>
......
......@@ -34,15 +34,10 @@
<link idref='xni'>XNI Manual</link>.
</p>
<p>
Xerces2 is a <jump href='http://www.w3.org/TR/xmlschema-1/#key-fullyConforming'>
fully conforming</jump> XML Schema 1.0 processor. A partial experimental implementation
of the XML Schema 1.1
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/'>Structures</jump> and
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/'>Datatypes</jump>
Working Drafts (December 2009) and an experimental implementation of the
Xerces2 is a fully conforming XML Schema 1.0 and 1.1 processor. An experimental implementation of the
<jump href='http://www.w3.org/TR/2010/CR-xmlschema-ref-20100119/'>XML Schema Definition
Language (XSD): Component Designators</jump> (SCD) Candidate Recommendation (January 2010)
are provided for evaluation. For more information, refer to the <link idref='xml-schema'>
is also provided for evaluation. For more information, refer to the <link idref='xml-schema'>
XML Schema</link> page.
</p>
<p>
......@@ -134,10 +129,9 @@
</li>
<li>
<jump href='http://www.w3.org/XML/Schema'>XML Schema</jump> 1.1
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/'>Structures</jump>
<jump href='http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/'>Structures</jump>
and
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/'>Datatypes</jump>
Working Drafts (December 2009)
<jump href='http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/'>Datatypes</jump> Recommendations
</li>
<li>
<jump href='http://www.w3.org/TR/2010/CR-xmlschema-ref-20100119/'>XML Schema Definition Language
......@@ -158,9 +152,7 @@
<p>
The &ParserNameLong; &ParserVersion; expands on its experimental support for XML Schema 1.1
by providing implementations for the simplified complex type restriction rules (also known as
subsumption), xs:override and a few other XML Schema 1.1 features. This release also introduces
experimental support for XML Schema Component Designators (SCD). It fixes several bugs which
by providing fully compliant XML Schema 1.1 implementation. It fixes several bugs which
were present in the previous release and also includes a few other minor enhancements.
</p>
<p>
......
......@@ -15,9 +15,93 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<!-- $Id: releases.xml 1039518 2010-11-26 19:19:32Z mrglavas $ -->
<!-- $Id: releases.xml 1829634 2018-04-20 08:38:24Z mukulg $ -->
<!DOCTYPE releases SYSTEM 'dtd/releases.dtd'>
<releases>
<release version='&ParserName; 2.12.0'>
<desc>
<p>
This release expands on Xerces-J's experimental support for XML Schema 1.1
by providing a fully compliant XML Schema 1.1 implementation. It fixes several bugs
which were present in &ParserName; 2.11.0 and also includes a few other minor enhancements.
</p>
</desc>
<changes>
<add>
<note>
Report all id/idref problems when validating XML against DTD or XML Schema.
</note>
<submitter name='Michael Glavassevich'/>
</add>
<add>
<note>
Implemented improvements to XML Schema 1.1 CTA implementation and inheritable attributes.
</note>
<submitter name='Mukul Gandhi, Hiranya Jayathilaka'/>
</add>
<update>
<note>
Implemented improved error/warning message reporting for various XML Schema use cases.
</note>
<submitter name='Mukul Gandhi'/>
</update>
<update>
<note>
Implemented few performance enhancements (affecting parsing/validation latency and memory footprint) to the implementation.
</note>
<submitter name='Michael Glavassevich'/>
</update>
<fix>
<note>
Fixed minor bugs in Xerces-J's regex support in XML Schema &lt;pattern&gt; facet.
</note>
<submitter name='Michael Glavassevich, Khaled Noaman, Sandy Gao'/>
</fix>
<fix>
<note>
Implemented various fixes to XML Schema 1.1 assert/assertion implementation.
</note>
<submitter name='Mukul Gandhi'/>
</fix>
<fix>
<note>
Implemented minor and major fixes in certain areas, to XML Schema 1.0 and 1.1 implementations.
</note>
<submitter name='Michael Glavassevich, Khaled Noaman, Sandy Gao, Mukul Gandhi'/>
</fix>
<fix>
<note>
Fixed the issue related to, XIncludeTextReader doesn't handle null Content Types properly.
</note>
<submitter name='Michael Glavassevich'/>
</fix>
<fix>
<note>
Fixed minor problems in the DOM (Level 3 Core) implementation.
</note>
<submitter name='Michael Glavassevich'/>
</fix>
<fix>
<note>
Fixed few errors related to Xerces-J's build component.
</note>
<submitter name='Michael Glavassevich'/>
</fix>
<fix>
<note>
Solved a minor bug in SoftReferenceSymbolTable implementation component.
</note>
<submitter name='Michael Glavassevich'/>
</fix>
<fix>
<note>
Octavian and Radu, from Oxygen XML Editor team have contributed much by way of intimating numerous bugs
and implementation ideas, for Xerces-J's XML Schema 1.0 and 1.1 implementations.
</note>
<submitter name='Octavian Nadolu, Radu Coravu'/>
</fix>
</changes>
</release>
<release version='&ParserName; 2.11.0'>
<desc>
<p>
......
......@@ -60,8 +60,9 @@
<p>
A sample demonstrating how to use the JAXP 1.4 Validation API
to create a validator and use the validator to validate input
from SAX, DOM or a stream. The output of this program shows the
time spent executing the Validator.validate(Source) method.
from SAX, DOM, StAX or a stream. The output of this program
shows the time spent executing the Validator.validate(Source)
method.
</p>
<p>
This class is useful as a "poor-man's" performance tester to
......@@ -70,8 +71,8 @@
validation time of a validator will include both VM class load time
and validator initialization that would not be present in subsequent
validations with the same document. Also note that when the source for
validation is SAX or a stream, the validation time will also include
the time to parse the document, whereas the DOM validation is
validation is SAX, StAX or a stream, the validation time will also
include the time to parse the document, whereas the DOM validation is
completely in memory.
</p>
<note>
......
......@@ -47,10 +47,10 @@
</p>
<p>
If you do not already have a JDK already on your computer download
one from Sun&apos;s Java website:
<jump href="http://java.sun.com">http://java.sun.com</jump> or from
IBM&apos;s website
<jump href="http://www.ibm.com/developer/java/">http://www.ibm.com/developer/java/</jump>.
one from Oracle&apos;s Java website:
<jump href="http://www.oracle.com/technetwork/java/index.html">http://www.oracle.com/technetwork/java/index.html</jump>
or from IBM&apos;s website
<jump href="http://www.ibm.com/developerworks/java/jdk/">http://www.ibm.com/developerworks/java/jdk/</jump>.
The sample applications described in the following pages support
Java 1.x (e.g. 1.1.8, etc) and/or Java 2 (e.g. 1.2.2, 1.3, etc).
The UI samples are written using Swing and require Java 2 in order
......
<?xml version="1.0"?>
<!-- CVS $Revision: 317483 $ $Date: 2001-08-22 20:35:39 -0400 (Wed, 22 Aug 2001) $ -->
<!-- CVS $Revision: 317483 $ $Date: 2001-08-23 06:05:39 +0530 (Thu, 23 Aug 2001) $ -->
<loader>
<processor name="xslt">
......
......@@ -18,24 +18,22 @@
<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
<s1 title="XML Schema">
<s2 title="Introduction">
<p>This package contains an implementation of the W3C XML
Schema 1.0 Language, a recommendation of the Worldwide Web Consortium
available in three parts:
<p>This package contains the implementations of the W3C XML
Schema 1.0 and 1.1 Languages, that are recommendation of the Worldwide Web Consortium.
The XML Schema 1.0 Language is 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.
This package also contains a partial experimental implementation
of the XML Schema 1.1
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-1-20091203/'>Structures</jump> and
<jump href='http://www.w3.org/TR/2009/WD-xmlschema11-2-20091203/'>Datatypes</jump>
Working Drafts (December 2009). The XML Schema 1.1 features supported by this
release are listed below.
The XML Schema 1.1 Language is available in two parts:
<jump href='http://www.w3.org/TR/xmlschema11-1/'>Structures</jump> and
<jump href='http://www.w3.org/TR/xmlschema11-2/'>Datatypes</jump>.
The XML Schema 1.1 features supported by this release are listed 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 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.
Please read this document before using this package.
</p>
</s2>
......@@ -130,6 +128,14 @@
Javadoc for javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING for
more details.
</li>
<li> The JAXP class javax.xml.validation.Schema is defined to be thread safe, i.e.
applications are encouraged to share it across many threads. There are few cases
observed while doing XML Schema 1.1 validation, where the thread safe definition
of javax.xml.validation.Schema is not honored. This problem is observed, while
using the XSD 1.1 syntax &lt;assert&gt; in the XSD documents. But there are also, various
cases observed while using XSD 1.1 syntax &lt;assert&gt;, when thread safety of javax.xml.validation.Schema
is honored correctly.
</li>
</ul>
</s2>
<s2 title="Other Notes">
......
......@@ -60,7 +60,7 @@ import ui.DOMTreeFull;
* which allow the user to create and view the progress of a NodeIterator
* in the DOM tree.
*
* @version $Id: IteratorView.java 950355 2010-06-02 03:43:24Z mrglavas $
* @version $Id: IteratorView.java 1612914 2014-07-23 18:45:18Z mrglavas $
*/
public class IteratorView
extends JFrame
......@@ -379,10 +379,6 @@ public class IteratorView
}
TreePath path = new TreePath(
((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
if (path == null) {
setMessage("Could not create a path.");
return;
}
if(!jtree.getSelectionModel().isPathSelected(path))
return;
Node node = jtree.getNode(treeNode);
......@@ -452,10 +448,6 @@ public class IteratorView
}
TreePath path = new TreePath(
((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
if (path == null) {
setMessage("Could not create a path.");
return;
}
if(!jtree.getSelectionModel().isPathSelected(path))
return;
Node node = jtree.getNode(treeNode);
......
......@@ -66,7 +66,7 @@ import org.xml.sax.SAXParseException;
*
* @author Michael Glavassevich, IBM
*
* @version $Id: InlineSchemaValidator.java 447685 2006-09-19 02:37:49Z mrglavas $
* @version $Id: InlineSchemaValidator.java 1335920 2012-05-09 04:15:35Z mrglavas $
*/
public class InlineSchemaValidator
implements ErrorHandler, NamespaceContext {
......@@ -117,13 +117,13 @@ public class InlineSchemaValidator
//
/** Print writer. */
protected PrintWriter fOut = new PrintWriter(System.out);
protected final PrintWriter fOut = new PrintWriter(System.out);
/** Prefix to URI mappings for the NamespaceContext. */
protected HashMap fPrefixToURIMappings;
protected final HashMap fPrefixToURIMappings;
/** URI to prefix mappings for the NamespaceContext. */
protected HashMap fURIToPrefixMappings;
protected final HashMap fURIToPrefixMappings;
//
// Constructors
......
......@@ -65,7 +65,7 @@ import org.xml.sax.helpers.XMLReaderFactory;
*
* @author Michael Glavassevich, IBM
*
* @version $Id: SourceValidator.java 710010 2008-11-03 05:06:19Z mrglavas $
* @version $Id: SourceValidator.java 1335920 2012-05-09 04:15:35Z mrglavas $
*/
public class SourceValidator
implements ErrorHandler {
......@@ -123,7 +123,7 @@ public class SourceValidator
// Data
//
protected PrintWriter fOut = new PrintWriter(System.out);
protected final PrintWriter fOut = new PrintWriter(System.out);
//
// Constructors
......
......@@ -43,11 +43,11 @@ import org.xml.sax.helpers.DefaultHandler;
*
* @author Ankit Pasricha, IBM
*
* @version $Id: DatatypeInterfaceUsage.java 447687 2006-09-19 02:39:08Z mrglavas $
* @version $Id: DatatypeInterfaceUsage.java 1335922 2012-05-09 04:19:51Z mrglavas $
*/
public class DatatypeInterfaceUsage extends DefaultHandler {
private PSVIProvider provider;
private final PSVIProvider provider;
public DatatypeInterfaceUsage(PSVIProvider p) {
provider = p;
......
......@@ -28,11 +28,11 @@ import java.net.Socket;
import java.util.Random;
import org.apache.xerces.parsers.SAXParser;
import org.xml.sax.AttributeList;
import org.xml.sax.HandlerBase;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
import socket.io.WrappedInputStream;
import socket.io.WrappedOutputStream;
......@@ -86,7 +86,7 @@ import socket.io.WrappedOutputStream;
*
* @author Andy Clark, IBM
*
* @version $Id: KeepSocketOpen.java 699895 2008-09-28 21:21:24Z mrglavas $
* @version $Id: KeepSocketOpen.java 1358665 2012-07-07 22:56:29Z mrglavas $
*/
public class KeepSocketOpen {
......@@ -245,7 +245,7 @@ public class KeepSocketOpen {
* @author Andy Clark, IBM
*/
public static final class Client
extends HandlerBase
extends DefaultHandler
implements Runnable {
//
......@@ -295,7 +295,7 @@ public class KeepSocketOpen {
public Client(String address, int port) throws IOException {
this(address, port, false);
fParser = new SAXParser();
fParser.setDocumentHandler(this);
fParser.setContentHandler(this);
fParser.setErrorHandler(this);
}
......@@ -358,7 +358,7 @@ public class KeepSocketOpen {
} // run()
//
// DocumentHandler methods
// ContentHandler methods
//
/** Start document. */
......@@ -371,18 +371,18 @@ public class KeepSocketOpen {
} // startDocument()
/** Start element. */
public void startElement(String name, AttributeList attrs) {
public void startElement(String uri, String localName, String qName, Attributes atts) {
fElementCount++;
fAttributeCount += attrs != null ? attrs.getLength() : 0;
} // startElement(String,AttributeList)
fAttributeCount += atts != null ? atts.getLength() : 0;
} // startElement(String,String,String,Attributes)
/** Ignorable whitespace. */
public void ignorableWhitespace(char[] ch, int offset, int length) {
public void ignorableWhitespace(char[] ch, int start, int length) {
fIgnorableWhitespaceCount += length;
} // ignorableWhitespace(char[],int,int)
/** Characters. */
public void characters(char[] ch, int offset, int length) {
public void characters(char[] ch, int start, int length) {
fCharactersCount += length;
} // characters(char[],int,int)
......
......@@ -40,7 +40,7 @@ import java.util.Properties;
* class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java 924308 2010-03-17 14:36:25Z mrglavas $
* @version $Id: ObjectFactory.java 1391588 2012-09-28 18:40:23Z mrglavas $
*/
final class ObjectFactory {
......@@ -365,10 +365,10 @@ final class ObjectFactory {
throws ClassNotFoundException, ConfigurationError
{
//throw security exception if the calling thread is not allowed to access the package
//restrict the access to package as speicified in java.security policy
//restrict the access to package as specified in java.security policy
SecurityManager security = System.getSecurityManager();
if (security != null) {
final int lastDot = className.lastIndexOf(".");
final int lastDot = className.lastIndexOf('.');
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
......
This diff is collapsed.
......@@ -17,6 +17,8 @@
package xni;
import java.util.Locale;
import org.apache.xerces.xni.Augmentations;
import org.apache.xerces.xni.QName;
import org.apache.xerces.xni.XMLAttributes;
......@@ -33,7 +35,7 @@ import org.apache.xerces.xni.XNIException;
*
* @author Andy Clark, IBM
*
* @version $Id: UpperCaseFilter.java 447690 2006-09-19 02:41:53Z mrglavas $
* @version $Id: UpperCaseFilter.java 1358670 2012-07-07 23:11:38Z mrglavas $