W3C home > Mailing lists > Public > www-rdf-interest@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>;
<xmlschema-dev@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
name
> > -- 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
reversible.
>
> As a workaround we use this simple hack:   before concatenating the
> namespace and local name we add a trailing '#' to the namespace iff
the
> namespace does not alreasy have a trailing '#' .  This ensures that
the
> 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
other
> namespaces work also.
>
> Regards,
> Arnold
Received on Monday, 12 February 2001 20:45:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:48 GMT