REXML namespace support

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 ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.. 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.

···

-----Original Message-----


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.


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.

I’m not sure how to parse that sentence. Is ActiveState doing Ruby now?
That would be cool–and encouraging for the future of the language. Not
to say that what you’re doing is uncool otherwise.

Read more about it
at ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.. 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.

That must be a WSDL thing. AFAIK the Namespaces spec doesn’t provide for
namespaces in attribute values. But I haven’t read the whole spec, and
it’s been a while since I’ve read any of it. I do remember a recurring
debate about whether it’s a good idea to design language specs that call
for namespaces in attribute values.

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.

Yes, I saw that. Your message arrived after mine left. Anyway, I wasn’t
upset–God knows I don’t always properly thank people–and I hope you’re
not either.

···

On Tue, Oct 01, 2002 at 03:52:48AM +0900, Volkmann, Mark wrote:


Matt Gushee
Englewood, Colorado, USA
mgushee@havenrock.com

W3C appears to have sanctioned the practice. Personally, I think the idea is
appalling.

···

On 9/30/02 4:40 PM, “Matt Gushee” mgushee@havenrock.com wrote:

On Tue, Oct 01, 2002 at 03:52:48AM +0900, Volkmann, Mark wrote:

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.

That must be a WSDL thing. AFAIK the Namespaces spec doesn’t provide for
namespaces in attribute values. But I haven’t read the whole spec, and
it’s been a while since I’ve read any of it. I do remember a recurring
debate about whether it’s a good idea to design language specs that call
for namespaces in attribute values.