Hi Thomas, Which version of Jena is this?
Andy On 19/04/2024 17:18, Thomas Francart wrote:
Hello The RDF/XML parsing of the following succeeds: <rdf:Description> <epvoc:decisionAboutId rdf:parseType="literal"><am><reference><symbol href=" https://xx.xx.xx/PC"/></reference></am></epvoc:decisionAboutId> </rdf:Description> while the RDF/XML parsing of this gives an error : in that case the XML has simply be encoded with <, and > and the rdf:datatype has been explicitly set to XMLLiteral : <rdf:Description> <epvoc:decisionAboutId rdf:datatype=" http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"><am><reference><symbol href="https://xx.xx.xx/PC "/></reference></am></epvoc:decisionAboutId> </rdf:Description> The error is 13:08:04.742 WARN org.apache.jena.riot - Lexical form '<am><reference><symbol href="https://xx.xx.xx/PC"/></reference></am>' not valid for datatype XSD XMLLiteral and then further down in SPARQL queries: 13:08:04.775 WARN o.apache.jena.sparql.expr.NodeValue - Datatype format exception: "<am><reference><symbol href=\"https://xx.xx.xx/PC\ "/></reference></am>"^^rdf:XMLLiteral The encoded XML is however valid. Is it possible to explicitely create literals with XMLLiteral datatype in RDF/XML by setting this datatype explicitely ? Thanks Thomas