xmlns format

S

Simon Wright

I've been using a tool that objects to

<XMI xmlns:UML='org.omg.xmi.namespace.UML'

because

Invalid absolute IRI (Internationalized Resource Identifier) for
namespace: "org.omg.xmi.namespace.UML"

I know that most examples on the Web use URLs (eg http://...), but is
this IRI actually illegal?

I've checked RFC 3987 (http://www.rfc-editor.org/rfc/rfc3987.txt), and
I'm wondering whether the tool writer has misread the text specifying an
IRI-reference; this looks like an irelative-ref, which involves an
irelative-part, and the definition of irelative-part runs from the
bottom of Page 7 to the top of Page 8, which would allow an
ipath-noscheme ...
 
B

Bjoern Hoehrmann

* Simon Wright wrote in comp.text.xml:
I've been using a tool that objects to

<XMI xmlns:UML='org.omg.xmi.namespace.UML'

because

Invalid absolute IRI (Internationalized Resource Identifier) for
namespace: "org.omg.xmi.namespace.UML"

I know that most examples on the Web use URLs (eg http://...), but is
this IRI actually illegal?

See <http://www.w3.org/TR/xml-names/#iri-use>, it's not forbidden by the
main specification, but specifications that use XML can of course do so,
and programmers may of course decide to not support them in their tools.
The error message is misleading though, it's not an absolute IRI at all,
it should instead say that it does not accept relative references.
 
S

Simon Wright

Bjoern Hoehrmann said:
* Simon Wright wrote in comp.text.xml:

See <http://www.w3.org/TR/xml-names/#iri-use>, it's not forbidden by the
main specification, but specifications that use XML can of course do so,
and programmers may of course decide to not support them in their tools.
The error message is misleading though, it's not an absolute IRI at all,
it should instead say that it does not accept relative references.

Thanks very much.
 
J

Joe Kesselman


Yeah. There was a major debate about that -- one of the few times I've
found myself arguing directly with Tim B-L. It was settled, I think, by
the observation that namespaces are supposed to have semantic meaning
(and are part of the basis for the Semantic Web ideas), and the idea of
"relative semantics" is inherently broken.

Also, relative IRIs would break the whole reason for using IRIs in the
first place, that being that we already know how to manage them to avoid
collisions between development groups.

There were also arguments about whether equivalent IRIs should be
considered the same namespace -- with the conclusion being that
"equivalent" was as poorly defined as relative.

So: The namespace name is treated as a literal string for comparison
purposes, which Must be in the form of an IRI and Should be in the form
of an absolute IRI -- relative is deprecated, so some tools May insist
on absolute.

--
Joe Kesselman,
http://www.love-song-productions.com/people/keshlam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 
S

Simon Wright

Joe Kesselman said:
So: The namespace name is treated as a literal string for comparison
purposes, which Must be in the form of an IRI and Should be in the
form of an absolute IRI -- relative is deprecated, so some tools May
insist on absolute.

The particular tool is in fact a general XML access library (in Ada);
personally, I think the decision to accept or reject should be left to
the tool that uses the library, not to the library.
 
J

Joe Kesselman

The particular tool is in fact a general XML access library (in Ada);
personally, I think the decision to accept or reject should be left to
the tool that uses the library, not to the library.

Until relative namespace names are un-deprecated -- which TB-L thought
might happen someday, but which I consider extremely unlikely for the
reasons cited -- I have trouble faulting a library which rejects them.
XML's greatest strength is that it is a standardized syntax which can
reliably be passed between tools and machines. Relaxing that standard
does a disservice to the users, by encouraging the creation of documents
which can not be interchanged.

Yes, I see the argument for "strict creation, lax acceptance". But that
still means digging yourself into a hole that you *will* eventually have
to fix, and it's cheaper to get it fixed earlier. You're going to wind
up fighting this battle to get people migrated off broken tools sooner
or later; better to do it sooner, in my opinion. Especially in something
like Ada.

Meanwhile, if you don't like one implementation of the XML libraries
you're free to find or write another, and someone has probably already
done so. Of course that may have its own limitations or issues. That's
the nature of engineering; pick the tool which is the best for your
particular task.

--
Joe Kesselman,
http://www.love-song-productions.com/people/keshlam/index.html

{} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
/\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top