On 10/04/11 09:09, Dave Reynolds wrote:
On Sat, 2011-04-09 at 22:45 -0400, Evan Patton wrote:
Hello,

I'm having some issues with SPARQL/Update support in ARQ using Jena
2.6.4 and Joseki 3.4.3. I obtain query results in N3 format from
the endpoint using a DESCRIBE query and the results include some
XMLLiterals specified using the ^^ syntax. However, if I attempt to
load these files using a LOAD query, all of the<  and>  characters
are encoded as&lt; and&gt; and when queried using the DESCRIBE no
longer make sense to other tools. First, is this the expected
behavior for loading XML Literals?

No, that's not normal, at least at the level of basic N3 (well
Turtle) parsing it's not. For example:

modelFromN3(":r :p '<a>foo</a>'^^rdf:XMLLiteral .")
.write(System.out, "RDF/XML-ABBREV");

generates

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
xmlns:owl="http://www.w3.org/2002/07/owl#";
xmlns:xsd="http://www.w3.org/2001/XMLSchema#";
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
xmlns="http://jena.hpl.hp.com/eg#";> <rdf:Description
rdf:about="http://jena.hpl.hp.com/eg#r";> <p
rdf:parseType="Literal"><a>foo</a></p> </rdf:Description> </rdf:RDF>

No quoting of<  >.

Is the XMLLiteral syntax correct? Can you try using jena.rdfcat to
check that the source data can be correctly parsed.

Dave

It should work - do you have a complete, minimal example or what your trying?

        Andy

Reply via email to