On 25/04/2024 07:58, Thomas Francart wrote:
Hello Andy
Le lun. 22 avr. 2024 à 21:03, Andy Seaborne <a...@apache.org> a écrit :
On 22/04/2024 08:02, Thomas Francart wrote:
Hello
This is 3.17.0. Pretty old, due to other dependency with TopQuadrant
SHACL
API.
It's not perfect in 5.0.0 either.
TopQuadrant SHACL is now 4.10.0. It would be good to upgrade because of
XML security issue fixes around Jena 4.3.2.
It is being rejected because it is not legal RDF 1.0. At 1.0, the
lexical space had restrictions (XML exclusive canonicalization) where
<symbol/> is not allowed. It has to be <symbol></symbol> -- there are
various other rules as well.
Thank you, I wasn't aware of this.
Nor was I until I checked!
The RDF 1.0 rules are quite confusing and this comes up from time to
time. At the time there was a DOM so no way to have a defined value
space other than strings and restrict the lexical form by exclusive
canonicalization.
(The DOM wasn't standardized at the time of RDF 1.0 IIRC)
The definition of rdf:XMLLiteral changed at RDF 1.1 to one where any XML
document fragment string is valid.
Seems not all places got updated. Partially, that is because it was
depending on the specific implementation of the Jena RDF/XML parser.
https://github.com/apache/jena/issues/2430
Do you happen to have the SPARQL queries? That part of your report is
related to the value space of RDF XML Literals.
Yes, the query is using the "=" operator :
OK - that will get fixed with
https://github.com/apache/jena/issues/2430
ask {
?uri a <http://exemple.com/MyClass> .
?uri <http://exemple.com/MyProperty> ?x, ?y.
filter (?x != ?y)
}
This false because use in the filter requires the value and the value is
undefined.
But then using the sameTerm function we don't get the error:
ask {
?uri a <http://exemple.com/MyClass> .
?uri <http://exemple.com/MyProperty> ?x, ?y.
FILTER ( !sameTerm(?x, ?y) )
}
A proper update to RDF 1.1 may change the value object class (it is
"string" for RDF 1.0, it is, by the spec, DocumentFragment for RDF 1.1;
it could be kept at document fragment toString() in jena. I'd like to
understand the usage to see which change is best).
Andy
BTW It's rdf:parseType="Literal" -- Jena 5.0.0 is not tolerant of lower
case "literal"
And that can be put back to be tolerant on input.
Thanks !
Thomas
Andy