xmlns format

Discussion in 'XML' started by Simon Wright, Dec 3, 2011.

  1. Simon Wright

    Simon Wright Guest

    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 ...
    Simon Wright, Dec 3, 2011
    #1
    1. Advertising

  2. * 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.
    --
    Björn Höhrmann · mailto: · http://bjoern.hoehrmann.de
    Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
    25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
    Bjoern Hoehrmann, Dec 3, 2011
    #2
    1. Advertising

  3. Simon Wright

    Simon Wright Guest

    Bjoern Hoehrmann <> writes:

    > * 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.


    Thanks very much.
    Simon Wright, Dec 3, 2011
    #3
  4. On 12/3/2011 4:32 PM, Bjoern Hoehrmann wrote:
    > See<http://www.w3.org/TR/xml-names/#iri-use>


    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."
    Joe Kesselman, Dec 4, 2011
    #4
  5. Simon Wright

    Simon Wright Guest

    Joe Kesselman <> writes:

    > 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.
    Simon Wright, Dec 5, 2011
    #5
  6. On 12/5/2011 7:28 AM, Simon Wright wrote:
    > 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."
    Joe Kesselman, Dec 5, 2011
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pei_world
    Replies:
    4
    Views:
    10,220
    pei_world
    Jun 15, 2004
  2. Maziar Aflatoun

    Ignoreing xmlns in XML document

    Maziar Aflatoun, Aug 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    525
    Maziar Aflatoun
    Aug 25, 2005
  3. john1001

    Unrecognized attribute 'xmlns'.

    john1001, Oct 14, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    6,102
    Juan T. Llibre
    Oct 15, 2005
  4. Replies:
    0
    Views:
    1,346
  5. afshar
    Replies:
    3
    Views:
    24,231
    aljar
    May 19, 2010
Loading...

Share This Page