5
1

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: <http://example.org/terms/#veryLongPropertyName> .
<#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">
</rdf:Description>

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?

  1. http://www.w3.org/TR/REC-xml/#NT-NameStartChar

asked 18 Feb '11, 13:26

vujke's gravatar image

vujke
1075
accept rate: 0%


This is why I like standards specifications--because they let you look up definitive answers to questions like this. Production 27 at http://www.w3.org/TeamSubmission/turtle/#sec-grammar-grammar shows that the local name is optional in Turtle.

Interestingly, the SPARQL spec doesn't mention qnames. http://www.w3.org/TR/REC-xml-names/#ns-qualnames makes it official that local names are required in XML.

permanent link

answered 18 Feb '11, 14:22

bobdc's gravatar image

bobdc
4.1k7
accept rate: 15%

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

permanent link

answered 18 Feb '11, 13:34

Rob%20Vesse's gravatar image

Rob Vesse ♦
13.9k1715
accept rate: 29%

... and that's part of the reason why certain predicate URIs are simply unusable in RDF/XML. :-(

(18 Feb '11, 23:36) tobyink ♦ tobyink's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×869
×78
×18

question asked: 18 Feb '11, 13:26

question was seen: 1,392 times

last updated: 18 Feb '11, 14:22