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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With