buda-base / owl-schema

BDRC Ontology Schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error using rdf:langString in union class expression

rjyounes opened this issue · comments

I tracked down the Protege error to this code:

bdo:LangStringOrNoColophon
	a rdfs:Datatype ;
	owl:equivalentClass [
		a rdfs:Datatype ;
		owl:unionOf (
			bdo:NoColophon
			rdf:langString
		) ;
	] ;
	.

The following also generates an error:

bdo:LangStringOrNoColophon
	a rdfs:Datatype ;
	owl:equivalentClass [
		a rdfs:Datatype ;
		owl:unionOf (
			rdf:langString
		) ;
	] ;
	.

As does

bdo:LangStringOrNoColophon
	a rdfs:Datatype ;
	owl:equivalentClass [
		a rdfs:Datatype ;
		owl:unionOf (
			xsd:integer
			rdf:langString
		) ;
	] ;
	.

The following does not generate an error is

bdo:LangStringOrNoColophon
	a rdfs:Datatype ;
	owl:equivalentClass rdf:langString ;
	.

owl:intersectionOf produces the same results. That is, an error is generated if and only if rdf:langString is used in a list.

ah, thanks a lot for that!! We can remove this, but I think the original intent was to say that the range of bdo:colophon was either a xsd:integer or rdf:langString... out of curiosity, is there a was to express that?

Unfortunately, I have no idea what's wrong with it. I've sent a message to my Semantic Arts colleagues asking if anyone can explain it. I forgot to mention that the error is generated in Protege but not rdf-toolkit, so it could be a Protege problem.

oh wait, I think Protege is only using RDF 1.0 in which rdf:langString is rdf:PlainLiteral, because it uses an owl java library that doesn't handle RDF 1.1... I think it was a major reason why we didn't want to use it

It appears that RDF 1.0 didn't define rdf:langString at all: https://www.w3.org/TR/rdf11-new/.

However, yes, it could be some Protege oddity. We should probably ignore it.

Actually, Protege 5.5, which I'm using, does use RDF 1.1, so it's still not clear what causes this error.

ah, I'm glad they finally updated that! Well, as I said, you can remove this piece of code, we won't use it anymore as we're transitionning to shacl

Oh, I see what you're asking above about the range of bdo:colophon. Yes, there is a way to express a union domain in OWL. I will make that change and remove the LangStringOrNoColophon datatype.

Fixed.

thanks!