owlcs / owlapi

OWL API main repository
821 stars 315 forks source link

Question to the construction of OWL Literals #1070

Closed psiotwo closed 2 years ago

psiotwo commented 2 years ago

I have came across this question when investigating https://github.com/ontodev/robot/issues/1020.

When the plain literal "a@b" is processed using getOWLLiteral method, it tries to interpret it as a lang literal. What is rationale behind this behaviour? In the ticket above, it is causing problems when at-signs are used inside a literal.

ignazio1977 commented 2 years ago

That's the syntax for rdf:langString literals. If the literal must be interpreted as xsd:string, it should be typed explicitly. Unfortunately the syntax choices for literals are confusing to say the least, they've confused me enough times and I'm not the only one bitten by them.

psiotwo commented 2 years ago

@ignazio1977 thanks for pointing me to the spec - I missed that bit. Although I can understand the intention, it is more than confusing, indeed ...