Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Easy schema validation

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Nils_Kilden-Pedersen AT Countrywide.Com, xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Easy schema validation
  • Date: Mon, 7 Apr 2003 16:27:36 -0400

At 1:02 PM -0700 4/7/03, Nils_Kilden-Pedersen AT Countrywide.Com wrote:
Isn't SAXBuilder part of JDOM?



You're right. My brain's elsewhere. I meant Builder.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
From elharo AT metalab.unc.edu Tue Apr 8 08:16:55 2003
Return-Path: <elharo AT metalab.unc.edu>
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211])
by happyhouse.metalab.unc.edu (Postfix) with ESMTP id 14846200BF
for <xom-interest AT lists.ibiblio.org>;
Tue, 8 Apr 2003 08:16:55 -0400 (EDT)
Received: (qmail 21704 invoked from network); 8 Apr 2003 12:16:55 -0000
Received: from unknown (HELO [192.168.254.4]) ([216.254.85.72])
(envelope-sender <elharo AT metalab.unc.edu>)
by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP
for <passani AT eunet.no>; 8 Apr 2003 12:16:55 -0000
Mime-Version: 1.0
X-Sender: elharo AT mail.ibiblio.org
Message-Id: <p04330100bab86c386e2d@[192.168.254.4]>
In-Reply-To: <3E91FD9C.5080401 AT eunet.no>
References: <3E8ABE80.2060402 AT eunet.no>
<p04330100bab0841e9d32@[192.168.254.4]> <3E91FD9C.5080401 AT eunet.no>
Date: Tue, 8 Apr 2003 08:09:57 -0400
To: luca passani <passani AT eunet.no>, xom-interest AT lists.ibiblio.org
From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
Subject: Re: [XOM-interest] using xom/xerces for JSP app (tomcat 4.1.18)
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Apr 2003 12:16:55 -0000

At 12:37 AM +0200 4/8/03, luca passani wrote:
Elliotte,

I fixed temporarily this problem by miving the Xerces files

xercesImpl.jar
xercesSamples.jar
xml-apis.jar
xmlParserAPIs.jar

from here:
C:\Program Files\Apache Group\Tomcat 4.1\webapps\wurfl\WEB-INF\lib

to here:

C:\Program Files\Apache Group\Tomcat 4.1\common\lib

Any idea why this does the trick?

It probably changes which ClassLoader loads those files. ClassLoader issues are a real pain. It's possible to have two separate but equal versions of the same class loaded at the same time, which are not compatible with each other even though they are identical.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
From elharo AT metalab.unc.edu Tue Apr 8 08:17:05 2003
Return-Path: <elharo AT metalab.unc.edu>
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211])
by happyhouse.metalab.unc.edu (Postfix) with ESMTP id 3D1FC200CE
for <xom-interest AT lists.ibiblio.org>;
Tue, 8 Apr 2003 08:17:04 -0400 (EDT)
Received: (qmail 21808 invoked from network); 8 Apr 2003 12:17:01 -0000
Received: from unknown (HELO [192.168.254.4]) ([216.254.85.72])
(envelope-sender <elharo AT metalab.unc.edu>)
by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP
for <passani AT eunet.no>; 8 Apr 2003 12:17:01 -0000
Mime-Version: 1.0
X-Sender: elharo AT mail.ibiblio.org
Message-Id: <p04330103bab86dc8cc45@[192.168.254.4]>
In-Reply-To: <3E91EFF7.4080800 AT eunet.no>
References: <3E91EFF7.4080800 AT eunet.no>
Date: Tue, 8 Apr 2003 08:15:40 -0400
To: luca passani <passani AT eunet.no>,
xom <xom-interest AT lists.ibiblio.org>
From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
Subject: Re: [XOM-interest] XOM problem with servlets
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Apr 2003 12:17:06 -0000

At 11:39 PM +0200 4/7/03, luca passani wrote:


Wurfl() throws IOException {
this("C:/temp/wurfl.xml");
}
which invokes:


This one's easy. C:/temp/wurfl.xml is not a legal URL. Try file://C:/temp/wurfl.xml
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
From elharo AT metalab.unc.edu Wed Apr 9 12:24:34 2003
Return-Path: <elharo AT metalab.unc.edu>
Delivered-To: xom-interest AT lists.ibiblio.org
Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213])
by happyhouse.metalab.unc.edu (Postfix) with ESMTP id B4EB02014B
for <xom-interest AT lists.ibiblio.org>;
Wed, 9 Apr 2003 12:24:33 -0400 (EDT)
Received: (qmail 12574 invoked from network); 9 Apr 2003 16:24:37 -0000
Received: from unknown (HELO metalab.unc.edu) (elharo@[216.254.85.72])
(envelope-sender <elharo AT metalab.unc.edu>)
by mail13.speakeasy.net (qmail-ldap-1.03) with SMTP
for <xom-interest AT lists.ibiblio.org>; 9 Apr 2003 16:24:37 -0000
Message-ID: <3E94495F.5070701 AT metalab.unc.edu>
Date: Wed, 09 Apr 2003 12:25:03 -0400
From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918
X-Accept-Language: en-us, fr-fr
MIME-Version: 1.0
To: xom-interest <xom-interest AT lists.ibiblio.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [XOM-interest] XOM 1.0d11 Now with ants!
X-BeenThere: xom-interest AT lists.ibiblio.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: <xom-interest.lists.ibiblio.org>
List-Unsubscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=unsubscribe>
List-Archive: <https://lists.ibiblio.org/sympa/arc/xom-interest>
List-Post: <mailto:xom-interest AT lists.ibiblio.org>
List-Help: <mailto:sympa AT lists.ibiblio.org?subject=HELP>
List-Subscribe: <http://lists.ibiblio.org/mailman/listinfo/xom-interest>,
<mailto:xom-interest-request AT lists.ibiblio.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Apr 2003 16:24:34 -0000

I'm pleased to announce that I've posted build 1.0d11 of XOM in the ususal location:

http://cafeconleche.org/XOM/

The new feature in this release is an ANT build file. This should make it much easier to compile XOM from source. ANT is not included though. You'll have to download and install it separately.

Before I make a broader announcement, I'd appreciate it if you could download this and test out the build file. I've only used it with ANT 1.5b3 and Java 1.4.2b1 on Linux. If anyone has problems on other versions please let me know. I'm especially curious how this fares in Java 1.2 and 1.3 and on Windows.

There are no API-level changes in this release. All code that ran before should still run. This release does fix all three outstanding bugs
reported by users:

* Worked around a bug in later versions of Xerces that don't
like null entityresolvers
* Allow base URIs to contain % escapes
* Fixed a bug that throws NullPointerException when serializing
documents without a base URI with preserveBaseURI set

I've expanded the unit tests to catch these and related bugs. The unit tests all pass, assuming you use a non-buggy SAX2 parser. However, if you run the JUnit GUI from the ANT build file, some confusing class loader issues cause the more-buggy Crimson to be loaded instead of the less-buggy Xerces. This breaks four unit tests. Everything should pass if you run the tests directly instead of from ANT. (That is, type "java -Xmx96m junit.swingui.TestRunner nu.xom.tests.XOMTests" instead of "ant testui".) If anyone can explain to me how I might fix this, I'd appreciate it.

--
Elliotte




Archive powered by MHonArc 2.6.24.

Top of Page