Hi guys, Thanks for the quick response :). I can write up a small test case but I'm not really sure whether the issue is worth putting a Jira on. Reading the response from Tatu, what I felt was that this is a issue we should be handling in our application rather than have XMLBeans deal with it. I'll anyway do a small test case and attach it to Jira, perhaps not as a bug but as an improvement or something.
Ajith On 3/22/06, Tatu Saloranta <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > A quick clarification about the behavior of the > > XMLStreamReader > > > returned from a XMLBeans object. > > > If there are any qualified attributes the reader > > correctly returns the > > > namespace URI and the prefix for that attribute > > through the > > > getAttributePrefix(int) and > > getAttributeNamespace(int) methods. > > > However that particular namespace decalration does > > not appear through > > > the getNamespacePrefix(int) method (it is not > > counted to from the > > > getNamespaceCount() method). > > > Axis2 actually got into trouble because of this > > behavior but I've > > > fixed it with a workaround. > > > What I'm not sure about is that whether this is an > > acceptable > > > behavior! I mean I don't see any faulty behavior > > since the namespace > > > is correctly associated with the attribute but the > > namespaces not > > > showing up in the declaration list makes me > > wonder! > > > > > > Any StAX guru who can clear this up ;) > > > > > > -- > > > Ajith Ranabahu > > One thing to keep in mind is that while > XMLStreamReader > has to keep track of the full namespace context (to do > proper namespace binding), getNamespaceXxx(int) > methods > only give information about specification declarations > for > the current element. Thus, if declaration for a prefix > was > done in an ancestor element, that information is not > accessible using those methods. If such information is > needed, > calling application has to keep similar stack, but I > guess > that's not a very common use case? > > Also... for questions related to StAX, it's good to cc > [EMAIL PROTECTED] > list (I'll cc my reply there too) > > -+ Tatu +- > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ajith Ranabahu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]