dev@fi.java.net

Re: StAX and TCK

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 18 Jan 2005 19:15:46 +0100

Joe Wang wrote:
> EventEquals: the analysis I've done so far, the event returned from
> our EventReader does not match that from the RI event reader. One point
> I saw ours returned StartElement but RI returned Characters. We might
> have some work to do preserving Characters(whitespace) in conversion as
> Paul and I discussed last week.

We need to discuss this further as i am not sure what is going on.

My guess is that this is most likely to do with the parsing of the
orginal XML document (i.e. this parse is removing white spaces). The FI
StAX parser does not remove white spaces (i think this is an additional
feature in StAX that needs to be implemented).


> xmltosaxtofi couldn't convert nameSpace.xml used for one of the tests
> into finf., return exception like this: java.net.UnknownHostException: dev
> at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
> Paul, I've attached the file. Could you see the problem?
>

This is a problem with parsing using the crimson XML parser in JDK 1.4.x

The XML file you attached looks fine:

<one:doc xmlns:one="uri:one">
   <one:test one:attribute="onetwo"></one:test>
   <doc xmlns:two="uri:two">
     <two:test></two:test>
     <two:test/>
   </doc>
   <one:test></one:test>
</one:doc>

are you sure there is not a DTD information included the original XML
file. It looks like the parser is attempting to derefrence a URL.

Have you tried a really simple XML file like:

<doc/>

to see if the problem is generic?

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_fi.dev.java.net
For additional commands, e-mail: dev-help_at_fi.dev.java.net