You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by jayachandra <ja...@gmail.com> on 2005/05/17 12:57:54 UTC
[Axis2] OMElement API notes
Resending with [Axis2] prefix
---------- Forwarded message ----------
From: jayachandra <ja...@gmail.com>
Date: May 17, 2005 4:27 PM
Subject: OMElement API notes
To: axis-dev@ws.apache.org
Hi!
I see the following method signature in OMElement.java
public Iterator getAttributes(QName qname);
Should it not be something like
public OMAttribute getAttribute(QName qname);
Can there be a list of (more than one) attributes with the same qname
in an element? Am I mistaken somewhere?
Thank you
Jaya
--
-- Jaya
--
-- Jaya
Re: [Axis2] OMElement API notes
Posted by Venkat Reddy <vr...@gmail.com>.
Jaya, open a jira issue for this, before its gets lost ...
On 5/18/05, Glen Daniels <gl...@thoughtcraft.com> wrote:
>
> You are quite right, Jaya. That should get fixed.
>
> --Glen
>
> > -----Original Message-----
> > From: jayachandra [mailto:jayachandra@gmail.com]
> > Sent: Tuesday, May 17, 2005 6:58 AM
> > To: axis-dev@ws.apache.org
> > Subject: [Axis2] OMElement API notes
> >
> > Resending with [Axis2] prefix
> >
> > ---------- Forwarded message ----------
> > From: jayachandra <ja...@gmail.com>
> > Date: May 17, 2005 4:27 PM
> > Subject: OMElement API notes
> > To: axis-dev@ws.apache.org
> >
> >
> > Hi!
> > I see the following method signature in OMElement.java
> > public Iterator getAttributes(QName qname);
> >
> > Should it not be something like
> > public OMAttribute getAttribute(QName qname);
> >
> > Can there be a list of (more than one) attributes with the same qname
> > in an element? Am I mistaken somewhere?
> >
> > Thank you
> > Jaya
> > --
> > -- Jaya
> >
> >
> > --
> > -- Jaya
> >
> >
>
Re: [Axis2] OMElement API notes
Posted by jayachandra <ja...@gmail.com>.
Hi Eran!
I predicted this reply :-)
Then, at least the names should be changed. Otherwise
readability&usability of code is at stake.
We can have
public Iterator getAttributesNS(OMNamespace ns) to do what you wanted to do.
And when syntactically only one attribute with a given qname
(namespace + localname) can exist in an element, calling a
getFirstAttribute(qname) wouldn't look nice. Can its signature be
changed to
public OMAttribute getAttribute(QName qname)
If the suggested changes sound agreeable can you do them at your
earliest convenience.
Thank you
Jayachandra
On 5/18/05, Eran Chinthaka <ch...@opensource.lk> wrote:
> Nope.
>
> public OMAttribute getFirstAttribute(QName qname) throws OMException will
> fullfil that thing.
>
> But the public Iterator getAttributes(QName qname) method will do something
> different.
>
> Well from this method what I expected was, one can just get give the
> namespace and get all the attributes with that same namespace, like that.
> Well, I think I implemented this, but its now not in the source.
>
> Let me look at this.
>
> Regards,
> Chinthaka
>
> > -----Original Message-----
> > From: Glen Daniels [mailto:glen@thoughtcraft.com]
> > Sent: Wednesday, May 18, 2005 1:32 AM
> > To: axis-dev@ws.apache.org; 'jayachandra'
> > Subject: RE: [Axis2] OMElement API notes
> >
> >
> > You are quite right, Jaya. That should get fixed.
> >
> > --Glen
> >
> > > -----Original Message-----
> > > From: jayachandra [mailto:jayachandra@gmail.com]
> > > Sent: Tuesday, May 17, 2005 6:58 AM
> > > To: axis-dev@ws.apache.org
> > > Subject: [Axis2] OMElement API notes
> > >
> > > Resending with [Axis2] prefix
> > >
> > > ---------- Forwarded message ----------
> > > From: jayachandra <ja...@gmail.com>
> > > Date: May 17, 2005 4:27 PM
> > > Subject: OMElement API notes
> > > To: axis-dev@ws.apache.org
> > >
> > >
> > > Hi!
> > > I see the following method signature in OMElement.java
> > > public Iterator getAttributes(QName qname);
> > >
> > > Should it not be something like
> > > public OMAttribute getAttribute(QName qname);
> > >
> > > Can there be a list of (more than one) attributes with the same qname
> > > in an element? Am I mistaken somewhere?
> > >
> > > Thank you
> > > Jaya
> > > --
> > > -- Jaya
> > >
> > >
> > > --
> > > -- Jaya
> > >
> > >
>
>
--
-- Jaya
RE: [Axis2] OMElement API notes
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Hmmm. Is there a usecase for this? If not I suggest we remove it ..
Sanjiva.
On Wed, 2005-05-18 at 10:23 +0600, Eran Chinthaka wrote:
> Nope.
>
> public OMAttribute getFirstAttribute(QName qname) throws OMException will
> fullfil that thing.
>
> But the public Iterator getAttributes(QName qname) method will do something
> different.
>
> Well from this method what I expected was, one can just get give the
> namespace and get all the attributes with that same namespace, like that.
> Well, I think I implemented this, but its now not in the source.
>
> Let me look at this.
>
> Regards,
> Chinthaka
>
> > -----Original Message-----
> > From: Glen Daniels [mailto:glen@thoughtcraft.com]
> > Sent: Wednesday, May 18, 2005 1:32 AM
> > To: axis-dev@ws.apache.org; 'jayachandra'
> > Subject: RE: [Axis2] OMElement API notes
> >
> >
> > You are quite right, Jaya. That should get fixed.
> >
> > --Glen
> >
> > > -----Original Message-----
> > > From: jayachandra [mailto:jayachandra@gmail.com]
> > > Sent: Tuesday, May 17, 2005 6:58 AM
> > > To: axis-dev@ws.apache.org
> > > Subject: [Axis2] OMElement API notes
> > >
> > > Resending with [Axis2] prefix
> > >
> > > ---------- Forwarded message ----------
> > > From: jayachandra <ja...@gmail.com>
> > > Date: May 17, 2005 4:27 PM
> > > Subject: OMElement API notes
> > > To: axis-dev@ws.apache.org
> > >
> > >
> > > Hi!
> > > I see the following method signature in OMElement.java
> > > public Iterator getAttributes(QName qname);
> > >
> > > Should it not be something like
> > > public OMAttribute getAttribute(QName qname);
> > >
> > > Can there be a list of (more than one) attributes with the same qname
> > > in an element? Am I mistaken somewhere?
> > >
> > > Thank you
> > > Jaya
> > > --
> > > -- Jaya
> > >
> > >
> > > --
> > > -- Jaya
> > >
> > >
>
>
>
>
RE: [Axis2] OMElement API notes
Posted by Eran Chinthaka <ch...@opensource.lk>.
Nope.
public OMAttribute getFirstAttribute(QName qname) throws OMException will
fullfil that thing.
But the public Iterator getAttributes(QName qname) method will do something
different.
Well from this method what I expected was, one can just get give the
namespace and get all the attributes with that same namespace, like that.
Well, I think I implemented this, but its now not in the source.
Let me look at this.
Regards,
Chinthaka
> -----Original Message-----
> From: Glen Daniels [mailto:glen@thoughtcraft.com]
> Sent: Wednesday, May 18, 2005 1:32 AM
> To: axis-dev@ws.apache.org; 'jayachandra'
> Subject: RE: [Axis2] OMElement API notes
>
>
> You are quite right, Jaya. That should get fixed.
>
> --Glen
>
> > -----Original Message-----
> > From: jayachandra [mailto:jayachandra@gmail.com]
> > Sent: Tuesday, May 17, 2005 6:58 AM
> > To: axis-dev@ws.apache.org
> > Subject: [Axis2] OMElement API notes
> >
> > Resending with [Axis2] prefix
> >
> > ---------- Forwarded message ----------
> > From: jayachandra <ja...@gmail.com>
> > Date: May 17, 2005 4:27 PM
> > Subject: OMElement API notes
> > To: axis-dev@ws.apache.org
> >
> >
> > Hi!
> > I see the following method signature in OMElement.java
> > public Iterator getAttributes(QName qname);
> >
> > Should it not be something like
> > public OMAttribute getAttribute(QName qname);
> >
> > Can there be a list of (more than one) attributes with the same qname
> > in an element? Am I mistaken somewhere?
> >
> > Thank you
> > Jaya
> > --
> > -- Jaya
> >
> >
> > --
> > -- Jaya
> >
> >
RE: [Axis2] OMElement API notes
Posted by Glen Daniels <gl...@thoughtcraft.com>.
You are quite right, Jaya. That should get fixed.
--Glen
> -----Original Message-----
> From: jayachandra [mailto:jayachandra@gmail.com]
> Sent: Tuesday, May 17, 2005 6:58 AM
> To: axis-dev@ws.apache.org
> Subject: [Axis2] OMElement API notes
>
> Resending with [Axis2] prefix
>
> ---------- Forwarded message ----------
> From: jayachandra <ja...@gmail.com>
> Date: May 17, 2005 4:27 PM
> Subject: OMElement API notes
> To: axis-dev@ws.apache.org
>
>
> Hi!
> I see the following method signature in OMElement.java
> public Iterator getAttributes(QName qname);
>
> Should it not be something like
> public OMAttribute getAttribute(QName qname);
>
> Can there be a list of (more than one) attributes with the same qname
> in an element? Am I mistaken somewhere?
>
> Thank you
> Jaya
> --
> -- Jaya
>
>
> --
> -- Jaya
>
>