xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugh Greene <hgre...@netphysic.com>
Subject Crimson 1.1.1 and 1.1.2beta2 don't like XML decls?
Date Tue, 02 Oct 2001 17:06:42 GMT
Hi there,

I'm trying to use Crimson (via JAXP 1.1) to parse some XML files and it 
seems to throw exceptions if a file begins with an XML declaration.  I've 
tried both 1.1.1 (from the JAR which comes with Sun's JAXP 1.1 download) 
and 1.1.2beta2 (which seems to work fine as a direct replacement for the 
above, without me needing to upgrade to JDK 1.4).  This isn't urgent, as I 
don't currently care too much about the XML decls, but it seems like a 
pretty fundamental bug (or error on my part, of course ;-).

In particular, the message it gives is "XML declaration may only begin 
entities."  The stack trace (which I don't have to hand) shows the call 
path (in org.apache.Crimson.Parser2) as being parseInternal:487 -> 
maybeMisc:1088 -> maybePI:966 (line numbers from 1.1.2beta2 source 
code).  This suggests that for some reason maybeXmlDecl is failing to 
recognise the declaration, but I can't understand why.  It's just the usual 
'<?xml version="1.0"?>', it's right at the start of the file, and the 
file's just a typical Windows file with CR-LF line endings.

I can provide a reproducible case on request, I'm sure.

Any clues?  Is this a known bug?  Or is it obvious where I'm going wrong?

Thanks in advance,

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message