REXML namespace support

From: Matt Gushee [mailto:mgushee@havenrock.com]
Sent: Monday, September 30, 2002 3:41 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.

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.

ActiveState is encouraging development of SWSAPI for a number of scripting
languages including Ruby. I don’t know the level of their support for other
uses of Ruby. To date there are implementations of SWSAPI for Perl, Python
and PHP.

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.

I think you are correct there. WSDL uses this as a way to refer from one
element to another instead of using DTD IDREFs or XML Schema keyrefs.

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.

Not at all. I’m sure I’ll have many more questions as I’m developing this
so I look forward to more responses from you.

···

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


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.