W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2001

Simple extname<->URI-ref hack

From: Arnold deVos <adv@langdale.com.au>
Date: Tue, 13 Feb 2001 08:39:56 +1100
Message-ID: <006201c0953c$5d3b07e0$ea2d18cb@cockatoo>
To: "David Megginson" <david@megginson.com>, <www-rdf-interest@w3.org>, <xmlschema-dev@w3.org>
> 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 16:38:48 GMT

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