W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: Simple extname<->URI-ref hack

From: Arnold deVos <adv@langdale.com.au>
Date: Tue, 13 Feb 2001 12:44:03 +1100
Message-ID: <004001c0955e$71da4bd0$ef01a8c0@lakes.com.au>
To: "David Megginson" <david@megginson.com>, <www-rdf-interest@w3.org>, <xmlschema-dev@w3.org>
I forgot to say: this hack does not actually make the
extname<->URI-ref mapping reversible.  The hack is to treat namespaces
http://mydomain/mynamespace and http://mydomain/mynamespace# as
identical. Thus its not possible to reconstruct the precise, original
namespace from the URI-ref.

Further to the hack: when declaring a namespace in RDF document we add
the trailing
'#', for other XML documents we leave it off.  This is mostly
interoperable, but unless everyone else followed the same convention,
its not reliable.

I said it was a hack didn't I?  To do better would require the RDF
spec to be changed, I think.

- Arnold

----- Original Message -----
From: Arnold deVos <adv@langdale.com.au>
To: David Megginson <david@megginson.com>; <www-rdf-interest@w3.org>;
Sent: Tuesday, February 13, 2001 8:39 AM
Subject: Simple extname<->URI-ref hack

> > From: "David Megginson" <david@megginson.com>
> > [...]  under the current state of the RDF-Syntax
> > spec, it is not possible to write robust, interoperable software
> > because of the concatenation of the Namespace URI with the local
> > -- this is a pragmatic engineering problem, not an abstract one.
> Yes - surely this is the key point.   As David wrote earlier, the
RDF way of
> creating a URI-reference from an XML extended name is not
> As a workaround we use this simple hack:   before concatenating the
> namespace and local name we add a trailing '#' to the namespace iff
> namespace does not alreasy have a trailing '#' .  This ensures that
> generated URI-reference always has a fragment part and the local
name can be
> recovered.
> OK its not perfect and its not per the RDF spec. But it works the
same way
> as RDF for typical RDF namespaces (with trailing '#') and it makes
> namespaces work also.
> Regards,
> Arnold
Received on Monday, 12 February 2001 20:45:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC