150 lines
6.4 KiB
HTML
150 lines
6.4 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
||
|
|
||
|
<title>Migrate applications that use the XML parser for Java</title>
|
||
|
</head>
|
||
|
|
||
|
<BODY>
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
<h3><A NAME="migxml"></A>Migrate applications that use the XML parser for Java</h3>
|
||
|
|
||
|
<p>Recently, the Apache Software Foundation announced the
|
||
|
creation of the xml.apache.org project for Open Source XML solutions. As part
|
||
|
of that announcement, IBM announced that it was donating the XML4J, XML4C
|
||
|
and LotusXSL technologies to the xml.apache.org project. The parsing technologies
|
||
|
have been renamed Xerces, and the LotusXSL technology has been renamed Xalan.</p>
|
||
|
|
||
|
<p>IBM is shifting its XML parsing development resources to work on the Xerces
|
||
|
parsers. The objective is to use the Xerces code base as the foundation for
|
||
|
XML4J and XML4C. This version of XML4J is based on the Apache Xerces version
|
||
|
2.0 codebase.</p>
|
||
|
|
||
|
<p><strong>What's the difference between XML4J and Xerces?</strong></p>
|
||
|
|
||
|
<p>Xerces has been internally tested at IBM, in addition to the testing that
|
||
|
is done by the xml.apache.org project. The main JAR
|
||
|
files names changed from <tt>xml4j.jar</tt> to <tt>xmlParserAPIs.jar</tt> and <tt>xercesImpl.jar</tt>, and from <tt>xml4jSamples.jar</tt> to <tt>xercesSamples.jar</tt>.</p>
|
||
|
|
||
|
<p><strong>What part of the API is public, and what is subject to change?</strong></p>
|
||
|
|
||
|
<p>API status must be defined before this question can be answered:
|
||
|
|
||
|
<ul>
|
||
|
<li><strong>Public</strong> - This is the type of API that a typical client developer should
|
||
|
code against. Attempts are made to fix severe bugs in this type of API.
|
||
|
Much of this type of API (defined as public) has reached W3C Recommendation
|
||
|
status or a similar status in xml-dev working group. The interface is not expected to change much.</li>
|
||
|
<li><strong>Experimental</strong> - These interfaces and classes reflect the latest
|
||
|
W3C specifications and SAX specifications from the xml-dev working group.
|
||
|
Since these specifications are not finalized, the interfaces are subject to
|
||
|
change. As some of these experimental specifications work through
|
||
|
the working groups to the highest level, such as W3C Recommendation, they
|
||
|
will be upgraded to the "Public" category.</li>
|
||
|
<li><strong>Internal</strong> - These classes are considered to be internal to Xerces,
|
||
|
even though they may be public and have public methods. They can be used by
|
||
|
developers who have complex and specific needs, such as building their own
|
||
|
XML Parser. However, note that the architecture is subject to change.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
<table border="1">
|
||
|
|
||
|
<tr align="left" valign="top">
|
||
|
<th>API Status</th>
|
||
|
<th>API contents (packages, interfaces, classes and methods)
|
||
|
</th>
|
||
|
<th>Comments</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr align="left" valign="top">
|
||
|
<td><strong>Public</strong></td>
|
||
|
<td>DOM Level 1 interfaces and DOM Level 2 (DOM2) interfaces <p>The
|
||
|
DOM2 interfaces have been implemented in the same interfaces as DOM1, but
|
||
|
as new methods.</p>
|
||
|
<p>SAX Level 1 interfaces and SAX Level 2 (SAX2) interfaces</p>
|
||
|
</td>
|
||
|
<td>DOM L1, DOM L2, SAX1 and SAX2 Interfaces are stable.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr align="left" valign="top">
|
||
|
<td><strong>Experimental</strong></td>
|
||
|
<td>DOM Level 3 (DOM3) and Core DOM Level 3 (DOM3) Abstract
|
||
|
Schemas and Load and Save</td>
|
||
|
<td>DOM L3 is in working draft status. XML4J provides a
|
||
|
subset of DOM L3 support.</td>
|
||
|
</tr>
|
||
|
<tr align="left" valign="top">
|
||
|
<td><strong>Internal</strong></td>
|
||
|
<td> All other packages are considered to be internal.
|
||
|
</td>
|
||
|
<td>The internal Xerces architecture may change. </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</p>
|
||
|
|
||
|
<p>As an Apache Open Source project, the Xerces community is very
|
||
|
interested in your questions and feedback regarding the whole API, not only
|
||
|
that part designated above as public.</p>
|
||
|
|
||
|
<p>If you have specific questions, patches, or feedback regarding the Xerces API or code, see the <a href="http://xml.apache.org/" target="_blank">Apache Web site</a> <img src="www.gif" width="18" height="15" alt="Link outside Information Center" border="0">. </p>
|
||
|
|
||
|
<p><strong>What APIs should I use for new development?</strong></p>
|
||
|
|
||
|
<p>All new development should use the org.apache.xerces.parsers.* classes. The four
|
||
|
compatibility parser classes have been replaced by these two classes:
|
||
|
<pre>org.apache.xerces.parsers.SAXParser
|
||
|
org.apache.xerces.parsers.DOMParser</pre>
|
||
|
</p>
|
||
|
|
||
|
<p>The control over validation
|
||
|
has been changed to be a feature of the parser, rather then requiring separate
|
||
|
classes.</p>
|
||
|
|
||
|
<p>The future direction for the parser instantiation classes
|
||
|
is a parser instantiation API that results from the W3C DOM Level 3 effort,
|
||
|
which is just getting underway.</p>
|
||
|
|
||
|
<p>To make sure your code is as stable
|
||
|
as possible, use the interfaces specified in the <strong>Public</strong> section
|
||
|
of the preceding table (for example DOM1 and SAX1). The table is updated periodically
|
||
|
to reflect new interfaces and classes that are given <strong>Public</strong> status
|
||
|
(for example, DOM2 and SAX2).</p>
|
||
|
|
||
|
<p><strong>Is IBM making any additional support guarantees with XML4J?</strong></p>
|
||
|
|
||
|
<p>IBM is not making any additional support guarantees for XML4J. In particular,
|
||
|
IBM is not certifying that XML4J is Y2K compliant. XML4J makes no internal
|
||
|
date calculations.</p>
|
||
|
|
||
|
<p><strong>Migrating applications to use the XML4J 4.2.2 parser and the XSLT4J 2.5.4 transformer</strong></p>
|
||
|
|
||
|
<p>JAXP defines a pluggability mechanism
|
||
|
for a SAX and DOM parser via javax.xml.parsers APIs. Transformers are pluggable
|
||
|
via javax.xml.transform APIs.</p>
|
||
|
|
||
|
<p>WebSphere Application Server Version 5.1 includes an XML4J 4.2.2 parser and an XSLT4J 2.5.4 transformer. To use a different implementation of JAXP in an application, package the parser
|
||
|
and transformer in the application and change the class loader delegation
|
||
|
to PARENT_LAST on the application or Web module.</p>
|
||
|
|
||
|
<p>It is recommended
|
||
|
that applications do not use the parser or transformer implementation API
|
||
|
directly, but that the applications use the JAXP API.</p>
|
||
|
|
||
|
<p>You can change
|
||
|
an application to remove its dependency on the API in a previous version of
|
||
|
the parser or the transformer from an earlier version of WebSphere Application
|
||
|
Server. Package the JAR files in the application and set the classloader delegation
|
||
|
mode to PARENT_LAST.</p>
|
||
|
|
||
|
<p>You must only recompile a Version 4.0.x XML application
|
||
|
to migrate it to the Version 5.1 level.</p>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|