You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Smith, Doug" <Do...@fmr.com> on 2000/08/22 00:56:03 UTC

namespace bug?

Folks,

My apologies if this is not the right forum for this. 

I'm seeing a change in how namespaces are handled from Xerces-J 1.0.2 to
Xerces-J 1.1.3.

Specifically, given the following XML:

<SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1"
	xmlns="urn:schemas-xtrac-fmr-com:xtrac.v3.3.1"
	SOAP:encodingStyle="urn:schemas-xtrac-fmr-com:xtrac.v3.3.1">
  <SOAP:Header>
<Cookie>123</Cookie>
  </SOAP:Header>
  	<SOAP:Body>
		<RetWitemRule>
				<NodeId>RSCAN</NodeId>
				<ItemType>DNACCT</ItemType>
				<ItemSubtype>DIRA</ItemSubtype>
		</RetWitemRule>
</SOAP:Body>
</SOAP:Envelope>

Xerces 1.0.2 was able to keep the default namespace and the SOAP namespace
straight when parsing the document. Putting some printlns in the content
handler gave the following output:

startElement: <local, raw, uri> = <Envelope, SOAP:Envelope,
urn:schemas-xmlsoap-org:soap.v1>
startElement: <local, raw, uri> = <Header, SOAP:Header,
urn:schemas-xmlsoap-org:soap.v1>
startElement: <local, raw, uri> = <Cookie, Cookie,
urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
endElement: <local, raw, uri> = <Cookie, Cookie,
urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
endElement: <local, raw, uri> = <Header, SOAP:Header,
urn:schemas-xmlsoap-org:soap.v1>
startElement: <local, raw, uri> = <Body, SOAP:Body,
urn:schemas-xmlsoap-org:soap.v1>
etc...

I recently upgraded from 1.0.2 to 1.1.3 in order to use Xalan/XSLT.
Xerces-1.1.3 (with and without Xalan installed) now gets confused when
switching between namespaces. I now get the following:

startElement: <local, raw, uri> = <Envelope, SOAP:Envelope,
urn:schemas-xmlsoap-org:soap.v1>
startElement: <local, raw, uri> = <Header, SOAP:Header,
urn:schemas-xmlsoap-org:soap.v1>
startElement: <local, raw, uri> = <Cookie, Cookie,
urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
endElement: <local, raw, uri> = <Cookie, Cookie,
urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
endElement: <local, raw, uri> = <Header, SOAP:Header,
urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
kaboom!

Note the incorrect namespace being reported for SOAP:Header in endElement.
Since my codes uses the uri to know when it's processing SOAP tags, I'm
boofed at this point.

Is this a known problem?

Thanks.

--Doug Smith

Re: namespace bug?

Posted by Eric Ye <er...@locus.apache.org>.
Yes, this is a known bug, and it has been fixed in the current CVS
repository. A new release is expected  in the week of 8/28, which is next
week.

Eric Ye
IBM JTC-Silicon Valley


----- Original Message -----
From: "Smith, Doug" <Do...@fmr.com>
To: <xe...@xml.apache.org>
Sent: Monday, August 21, 2000 3:56 PM
Subject: namespace bug?


> Folks,
>
> My apologies if this is not the right forum for this.
>
> I'm seeing a change in how namespaces are handled from Xerces-J 1.0.2 to
> Xerces-J 1.1.3.
>
> Specifically, given the following XML:
>
> <SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1"
> xmlns="urn:schemas-xtrac-fmr-com:xtrac.v3.3.1"
> SOAP:encodingStyle="urn:schemas-xtrac-fmr-com:xtrac.v3.3.1">
>   <SOAP:Header>
> <Cookie>123</Cookie>
>   </SOAP:Header>
>   <SOAP:Body>
> <RetWitemRule>
> <NodeId>RSCAN</NodeId>
> <ItemType>DNACCT</ItemType>
> <ItemSubtype>DIRA</ItemSubtype>
> </RetWitemRule>
> </SOAP:Body>
> </SOAP:Envelope>
>
> Xerces 1.0.2 was able to keep the default namespace and the SOAP namespace
> straight when parsing the document. Putting some printlns in the content
> handler gave the following output:
>
> startElement: <local, raw, uri> = <Envelope, SOAP:Envelope,
> urn:schemas-xmlsoap-org:soap.v1>
> startElement: <local, raw, uri> = <Header, SOAP:Header,
> urn:schemas-xmlsoap-org:soap.v1>
> startElement: <local, raw, uri> = <Cookie, Cookie,
> urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
> endElement: <local, raw, uri> = <Cookie, Cookie,
> urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
> endElement: <local, raw, uri> = <Header, SOAP:Header,
> urn:schemas-xmlsoap-org:soap.v1>
> startElement: <local, raw, uri> = <Body, SOAP:Body,
> urn:schemas-xmlsoap-org:soap.v1>
> etc...
>
> I recently upgraded from 1.0.2 to 1.1.3 in order to use Xalan/XSLT.
> Xerces-1.1.3 (with and without Xalan installed) now gets confused when
> switching between namespaces. I now get the following:
>
> startElement: <local, raw, uri> = <Envelope, SOAP:Envelope,
> urn:schemas-xmlsoap-org:soap.v1>
> startElement: <local, raw, uri> = <Header, SOAP:Header,
> urn:schemas-xmlsoap-org:soap.v1>
> startElement: <local, raw, uri> = <Cookie, Cookie,
> urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
> endElement: <local, raw, uri> = <Cookie, Cookie,
> urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
> endElement: <local, raw, uri> = <Header, SOAP:Header,
> urn:schemas-xtrac-fmr-com:xtrac.v3.3.1>
> kaboom!
>
> Note the incorrect namespace being reported for SOAP:Header in endElement.
> Since my codes uses the uri to know when it's processing SOAP tags, I'm
> boofed at this point.
>
> Is this a known problem?
>
> Thanks.
>
> --Doug Smith
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>