Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use xsd datatypes (e.g. xsd:string) and xml language attribute simultaneously in OWL2/RDF?

Tags:

types

xml

xsd

rdf

owl

I'm using Protege 4.3 to create my OWL2 ontologies. Recently i mentioned that when adding the annotation property rdfs:label you can choose to define a datatype (e.g. xsd:string) or a language (xml:lang). But it is impossible to define both. If you choose a datatype, the language field is faded and vice versa.

This could be a Protege specific problem, but i wonder if OWL2 itself prohibits the use of datatype and language at the same time. I did some research but I couldn't find any document where this is explicitly mentioned. But i also couldn't find an example where it is done. Something like ...

<Class rdf:about="MyClass">
    <rdfs:label xml:lang="en" rdfs:Datatype="xsd:string">My special class</rdfs:label>
</Class>

... or ...

<http://example.org/AboutMe> ns0:gender "male"@en^^xsd:string .

I guess the above examples are not valid, but why?

like image 482
JimBo Avatar asked Dec 09 '13 10:12

JimBo


1 Answers

You can't do this. It's not a property of OWL, but of the underlying RDF. From Resource Description Framework (RDF): Concepts and Abstract Syntax:

3.4 Literals

Literals are used to identify values such as numbers and dates by means of a lexical representation. Anything represented by a literal could also be represented by a URI, but it is often more convenient or intuitive to use literals.

A literal may be the object of an RDF statement, but not the subject or the predicate.

Literals may be plain or typed:

  • A plain literal is a string combined with an optional language tag. This may be used for plain text in a natural language. As recommended in the RDF formal semantics [RDF-SEMANTICS], these plain literals are self-denoting.
  • A typed literal is a string combined with a datatype URI. It denotes the member of the identified datatype's value space obtained by applying the lexical-to-value mapping to the literal string.

There's an upcoming new version of RDF, and in it, this is somewhat simplified. There will be no more plain literals; everything will have a datatype. What used to be plain literals will be have the same lexical form, and will have datatype xsd:string. A language tagged string will have the datatype http://www.w3.org/1999/02/22-rdf-syntax-ns#langString. This is described in 3.3 Literals of RDF 1.1 Concepts and Abstract Syntax: W3C Candidate Recommendation 05 November 2013. It's possible that that document could change before it's accepted though, so if you use it as a reference, be sure to get the latest version.

like image 182
Joshua Taylor Avatar answered Nov 11 '22 12:11

Joshua Taylor