Hi Ryan,
On 09/09/2021 23:32, Shaw, Ryan wrote:
On Sep 9, 2021, at 4:00 PM, Andy Seaborne <[email protected]> wrote:
What is your usage scenario?
riot gives me the warning “Lexical form '0000' not valid for datatype XSD
gYear”. But according to XSD 1.1 Part 2, 0000 is a permitted value for gYear,
representing 1 BCE.
Command line riot?
Jena supports the XSD datatypes relevant to RDF independently of XML.
I had thought that the reason for this warning was that Jena was relying on the
default Java implementation of XSD datatypes (which is 1.0 not 1.1). But I
guess I was wrong, in which case using the Xerces2 parser would not resolve
this?
I'm afraid it won't.
This is warning happens for any input not just RDF/XML. The checking is
happening after parsing.
In Java code: RDFParser.checking(false).
It is just a warning the triple and it's object literal is still output
from the parser. From the command line "--nocheck" turns off the checking.
Now logged as
https://issues.apache.org/jira/browse/JENA-2158
Jena has it's own XSD parsing code which is copied from the internal
implementation in Xerces 2.11.0, not going through public APIs. It was
repackaged into the Jena code base so that any XML parser can be used,
normally the JDK one.
There is a constant to turn on XSD 1.1 schema mode for checking. It
affects year 0000, including the value of negative years, and some
duration detection. It does not seem to affect other parts of the Xerces
subsystem though.
Between the JDK and Xerces code there are slight differences (the JDK
does not, or at least did not, handle "T24:00:00" which is a legal time
by XSD.) So some checking to do.
Andy
Thanks,
Ryan