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 16:38:48 UTC