AFAIK for XMLLiterals you need to use rdf:parseType="Literal", rdf:datatype: https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-XML-literals
On Fri, 19 Apr 2024 at 18.18, Thomas Francart <thomas.franc...@sparna.fr> 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 > > > -- > > *Thomas Francart* -* SPARNA* > Web de *données* | Architecture de l'*information* | Accès aux > *connaissances* > blog : blog.sparna.fr, site : sparna.fr, linkedin : > fr.linkedin.com/in/thomasfrancart > tel : +33 (0)6.71.11.25.97, skype : francartthomas >