[Nml-wg] NML namespace

Jeroen van der Ham vdham at uva.nl
Tue Jul 31 04:34:43 EDT 2012


Hi,

On 26 Jul 2012, at 16:23, Freek Dijkstra wrote:
> It turns out that namespaces in XML and RDF are used for a different
> purpose, and in practice may look subtly different (e.g. the NML RDF
> namespace contains a hash, while the NML XML variant does not).

I dove down the XML & RDF Namespace rabbit hole also unfortunately, and I have to correct the above:
- Namespaces in XML are used for scoping, in XML the element name and namespace are separate parts in identifying a single thing.
- Namespaces in RDF are used like prefixing, the element name and namespace are concatenated to form a single identifying URI.
- It is *best practice* to not end XML namespaces in "/" or "#", but it is perfectly valid to do so, and many standards do.
- It is *best practice* to end an RDF namespace in "#", but it is perfectly valid to use something else, some standards also use "/".
- The RDF standard states that "rdf:id" values are transformed by appending "#" to the namespace, and then appending the value. In practice "rdf:id" is not used.
- The RDF syntax further complicates things by stating informatively that implementations must add a "/" to the end of a namespace if it is a hierarchical namespace.

With that in mind, I would propose that we use http://schemas.ogf.org/nml/2012/10/nml/ as the namespace, so that we can use the same for both XML and RDF.

Jeroen.



More information about the nml-wg mailing list