You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Gu...@inexware.fr on 2001/04/02 14:02:13 UTC

Undeclared prefix

Hello,

A SAXParseException is thrown by crimson (version 1.1) when I try to parse
this document :

<SOAP-ENV:Envelope
    SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
</SOAP-ENV:Envelope>

Stack Trace :
org.xml.sax.SAXParseException: Undeclared prefix: "SOAP-ENV:encodingStyle".
        at org.apache.crimson.parser.Parser2.error(Parser2.java:3013)
        at org.apache.crimson.parser.Parser2.processName(Parser2.java:1581)
        at
org.apache.crimson.parser.Parser2.processAttributeNS(Parser2.java:1553)
        at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1410)
        at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at Test.main(Test.java:41)

But no Exception is thrown when I try to parse this document
(the namespace prefix declaration is now the first attribute) :

<SOAP-ENV:Envelope
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
</SOAP-ENV:Envelope>

Xerces works.
Aelfred2 throws an ArrayIndexOutOfBoundsException in the first case.

Hope its not to hard to track down.

Gwenn.
Bye.
--
I will not spin the turtle
                                          Bart's BlackBoard (The Simpsons)

Re: Undeclared prefix

Posted by Edwin Goei <Ed...@sun.com>.
Guenael.Treguier@inexware.fr wrote:
> 
> Hello,
> 
> A SAXParseException is thrown by crimson (version 1.1) when I try to parse
> this document :
> 
> <SOAP-ENV:Envelope
>     SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
>     xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
> </SOAP-ENV:Envelope>
> 
> Stack Trace :
> org.xml.sax.SAXParseException: Undeclared prefix: "SOAP-ENV:encodingStyle".

This has been fixed in CVS.  Thanks for the report.  The root of the
problem was that the code was derived from SAX2 code which had the same
bug, but has since been fixed.

-Edwin

---------------------------------------------------------------------
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


Re: Undeclared prefix

Posted by Edwin Goei <Ed...@sun.com>.
Guenael.Treguier@inexware.fr wrote:
> 
> Hello,
> 
> A SAXParseException is thrown by crimson (version 1.1) when I try to parse
> this document :
> 
> <SOAP-ENV:Envelope
>     SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
>     xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
> </SOAP-ENV:Envelope>

OK, thanks for the bug report.  I'll let you know when it's fixed.

-Edwin

---------------------------------------------------------------------
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