xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bentley Drake <bent...@nightfire.com>
Subject FW: FW: Crimson 1.1.3 bug and behavior changes?
Date Wed, 07 Nov 2001 22:16:19 GMT

-----Original Message-----
From: Bentley Drake 
Sent: Tuesday, November 06, 2001 8:27 AM
To: 'Edwin Goei'
Subject: RE: FW: Crimson 1.1.3 bug and behavior changes?


I didn't try Xerces2 because its a development branch whose APIs might be
changing. Also, we currently use the Sun ProjectX tr-2 parser, and I was
hoping the Crimson port would be easier (not to mention that it will be part
of JDK 1.4).  As I mentioned previously, the code ran fine under the
ProjectX tr-2 parser as well as the version of the Crimson parser that
shipped with the JAXP-1.1 reference implementation available on the Javasoft

I've managed to reproduce the problem that I emailed you about earlier using
the simplest-possible Java application and XML example.  I've attached the
source.  The main() method has all of the relevant code.  The following
statement is throwing the exception:

            Document copy = (Document)src.cloneNode( true );

When I run the application against the following XML document:

<?xml version="1.0"?>
      <CCNA value="fubar"/>

I get the following exception:

java -classpath  D:/tp/jaxp-1.1/crimson-1.1.3/crimson.jar;. TestCrimson
org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR: This node isn't
allowed there.
org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR: This node isn't
allowed there.
	at TestCrimson.main(TestCrimson.java:33)

However, if I remove the value attribute:

<?xml version="1.0"?>

The code executes without exceptions.  From this, I take it that the
cloneNode() call doesn't like the 'value' attribute.

Thanks in advance for taking a look at this and for any insight into the


-----Original Message-----
From: Edwin Goei [mailto:edwingo@sun.com]
Sent: Monday, November 05, 2001 7:25 PM
To: Bentley Drake
Subject: Re: FW: Crimson 1.1.3 bug and behavior changes?

Bentley Drake wrote:
> Edwin,
> Thanks for the responses.  I got the serialization approach from the
> following site: http://xml.apache.org/~edwingo/jaxp-faq.html

Unfortunately, I don't think I have time to look at this at the moment. 
If you send me a reproducible simple test case for the cloneNode
problem, I could look at it later.  Did you try using another parser
like Xerces2?


View raw message