[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Re: A small issue about the behavior of the returned XMLStreamReader
From:       "Ajith Ranabahu" <ajith.ranabahu () gmail ! com>
Date:       2006-03-24 5:56:44
Message-ID: f43ea5790603232156q16612eaby309c1557f7bf28dc () mail ! gmail ! com
[Download RAW message or body]

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 <cowtowncoder@yahoo.com> 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
> stax_builders@yahoogroups.com
> 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: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
>
>


--
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic