From: "Volkmann, Mark" Date: 2002-10-01T03:52:48+09:00 Subject: RE: REXML namespace support This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C268B2.5170F5A0 Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Matt Gushee [mailto:mgushee@havenrock.com] > Sent: Monday, September 30, 2002 12:20 PM > To: ruby-talk@ruby-lang.org > Subject: Re: REXML namespace support > > It might be interesting to hear more about the problem the original > poster was trying to solve. I'm implementing SWSAPI defined by ActiveState in Ruby. Read more about it at http://aspn.activestate.com/ASPN/WebServices/SWSAPI. This requires parsing WSDL. Some attribute *values* contain qualified XML names, for example, "tns:TemperaturePortType". In this case I can determine the namespace using the element that contains the attribute as follows. namespace = element.namespace('tns') When attribute values don't contain prefixes, I believe I'm supposed to assume the targetnamespace which I can get from the "targetNamespace" attribute on the "definitions" element. > But he seems to have either given up, or > been satisfied with the answers he got I was satisfied with the answers I got. > and wandered off without > bothering to say "thanks." Oh, well. That's mailing-list life. I did that this morning when I thanked the person who correctly suspected that I really *did* have a reference to a REXML Element that I could use to get the namespace I needed. *********************************************************************************** WARNING: All e-mail sent to and from this address will be received or otherwise recorded by the A.G. Edwards corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ************************************************************************************ ------_=_NextPart_001_01C268B2.5170F5A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: REXML namespace support

> -----Original Message-----
> From: Matt Gushee [mailto:mgushee@havenrock.com]
> Sent: Monday, September 30, 2002 12:20 PM
> To: ruby-talk@ruby-lang.org
> Subject: Re: REXML namespace support
>
> It might be interesting to hear more about the prob= lem the original
> poster was trying to solve.

I'm implementing SWSAPI defined by ActiveState in Ruby.&n= bsp; Read more about it at http://aspn.activestate.com/ASPN/WebServi= ces/SWSAPI.  This requires parsing WSDL.  Some attribute *val= ues* contain qualified XML names, for example, "tns:TemperaturePortTyp= e".  In this case I can determine the namespace using the element= that contains the attribute as follows.

  namespace =3D element.namespace('tns')

When attribute values don't contain prefixes, I believe I= 'm supposed to assume the targetnamespace which I can get from the "ta= rgetNamespace" attribute on the "definitions" element.

> But he seems to have either given up, or
> been satisfied with the answers he got

I was satisfied with the answers I got.

> and wandered off without
> bothering to say "thanks." Oh, well. That= 's mailing-list life.

I did that this morning when I thanked the person who cor= rectly suspected that I really *did* have a reference to a REXML Element th= at I could use to get the namespace I needed.



***************************************************************************= ********
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
***************************************************************************= *********
------_=_NextPart_001_01C268B2.5170F5A0--