Re: [Axis2][Axiom] Correct behavior for the getNamespace method

Dennis Sosnoski <[email protected]>
Newsgroups gmane.text.xml.axis.devel,gmane.text.xml.commons.devel
Message-ID <[email protected]>
I believe this is actually an error in XMLBeans, given that the StAX 
specification doesn't specify the result. I ran into this when adding 
StAX support to JiBX. From what I saw the reference implementation 
always returns null for the no-namespace namespace, while the other 
implementations return an empty string. XMLBeans should accept either 
result.

There's been discussion of a StAX 1.1 specification, which would 
hopefully clean up some of the many ambiguities and oversights in the 
current specification. AFAIK this is stuck in limbo, though, because BEA 
owns the specification and as I understand it they're the ones who'd 
need to initiate the 1.1 JSR.

  - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Davanum Srinivas wrote:

> Ajith,
>
> Do you have a stripped down test that we can use to chase the woodstox
> folks for a fix?
>
> thanks,
> dims
>
> On 5/13/06, Ajith Ranabahu <[email protected]> wrote:
>
>> Hi all,
>> I've found that the cause of numerous bug reports concerning the
>> deserililzation of XMLBeans is actually an issue with the
>> getNamespaceURI(int index) method of the pullparser where it returns
>> null for the empty namespace URI. XMLBeans assumes the uri is never
>> null but the reader implementations (including the wstx implementation
>> that we use inside Axis2) return null for the empty namespace URI. I
>> can work around the bug but this is one fine point that should get
>> very clear about :)
>>
>> The Javadoc for XMLStreamReader is silent on this
>> (https://stax-utils.dev.java.net/nonav/javadoc/api/javax/xml/stream/XMLStreamReader.html#getNamespaceURI(int)) 
>>
>> but since the empty namespace is decalred with an empty string, I
>> would say it should return an empty string rather than a null!
>>
>> Thoughts ?
>>
>> -- 
>> Ajith Ranabahu
>>
>> PS - From a very quick test I've found out that the change occurred in
>> the transition of wstx version 2.8 to 2.9  - wstx 2.8.* returns "" but
>> 2.9.* returns null!.
>>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.