On 17/10/12 16:51, Michael Brunnbauer wrote:
Hello Andy,
[Fuseki does not accept RDF generated with Jena]
java-rdfa-0.4.2 isn't Jena.
On Wed, Sep 19, 2012 at 04:16:33PM +0100, Andy Seaborne wrote:
What would be the best way to check for such things in the same way as
Fuseki ?
See:
org.openjena.riot.system.IRIResolver.
We are now checking every IRI in the graphs with IRIResolver (btw the
documentation does not state that IRIResolver.checkIRI will return False
instead of True for a correct URI).
Here comes the next problem: Fuseki says "not a legal instance of Data type
XSD:hexBinary" if I try to load the attached file generated with Jena and
java-rdfa-0.4.2 from http://csarven.ca/7
which indeed has xsd:hexBinary like:
"AB 12"^^xsd:hexBinary
XSD hex binary does not allow spaces in the lexical form (we may wish it
did ... but it doesn't and it catches people out).
http://www.w3.org/TR/xmlschema-2/#hexBinary
But the check only causes the warning - it's the .hashCode that is the
problem.
"riot --validate" gives a warning.
17:13:46 INFO Fuseki :: [148664] POST
http://ts.foaf-search.net:3030/crawl/update
17:13:46 WARN SPARQL_Update$HttpActionUpdate :: Transaction still active in
endWriter - no commit or abort seen (forced abort)
17:13:46 WARN Fuseki :: [148664] RC = 500 : Lexical form 'C7 2A
28 FD 69 34 C0 62 FF 05 C9 7E 85 75 04 70
56 B4 CD AD 3A 6C AE 37 6F 50 6A D4 F4 8F 91 C9
A9 E2 C2 7E 93 3C 39 01 E7 CC A3 3F CF 4A AA 3B
3A 54 F3 AF 53 E2 5D D8 D4 9B 53 C3 3A 19 25 57
....
05 C6 8C C3' is not a valid value for 'hexBinary'.
at
com.hp.hpl.jena.graph.impl.LiteralLabelImpl.getValue(LiteralLabelImpl.java:326)
at
com.hp.hpl.jena.datatypes.xsd.XSDhexBinary.getHashCode(XSDhexBinary.java:81)
at
com.hp.hpl.jena.graph.impl.LiteralLabelImpl.hashCode(LiteralLabelImpl.java:448)
That is a problem - at that point it should be tolerant.
Something is odd about hexBinary because illegal lexical forms for other
things (e.g. xsd:float) do not preent this problem.
Recorded as JENA-335.
What should I do ? Would it be feasible to copy the Fuseki code checking the
data into our code ?
Get http://csarven.ca/7 corrected.
And you are welcome to copy the checking code - it's open source. The
key word there is "open". And "source".
Andy
Regards,
Michael Brunnbauer