Can QName be used without a local name part?

Hello everyone!

I'm wondering if it is possible to use QNames in the form of 'prefix:' (without a local name, e.g. the part after the colon).

Say a prefix foo is assigned to the full URI of some property.

@prefix foo: <> .
<#a> foo: <#b> .

This way publishers could use custom names, which could be handy for various reasons (shortening, translating etc.).

I just realized this is not possible in RDF/XML serialization, because the tag name cannot be empty, according to the spec. [1]

<rdf:Description about="#a">
 <foo: rdf:Resource="#b">

Anyways, what do you think about this idea? Is there any solution/hack for the implementation in RDF/XML? Is there any other way to do this?


This is why I like standards specifications--because they let you look up definitive answers to questions like this. Production 27 at shows that the local name is optional in Turtle.

Interestingly, the SPARQL spec doesn't mention qnames. makes it official that local names are required in XML.

Yes this should be valid in Turtle, Notation 3 and SPARQL as far as I am aware.

As you say this is obviously not valid in RDF/XML