Vladimir Alexiev created JENA-840:
-------------------------------------

             Summary: riot is too permissive towards yearFrag of xsd:datetime
                 Key: JENA-840
                 URL: https://issues.apache.org/jira/browse/JENA-840
             Project: Apache Jena
          Issue Type: Bug
          Components: RIOT
    Affects Versions: Jena 2.12.2
            Reporter: Vladimir Alexiev


I noticed that RIOT treats differently years in xsd:gYear & xsd:date vs 
xsd:datetime. It's more permissive towards the yearFrag in xsd:datetime:
- allows leading +
- allows leading zeros even for >4 digits

So I checked [the 
spec|http://www.w3.org/TR/xmlschema11-2/#rf-lexicalMappings-datetime] namely 
D.2.1 The Seven-property Model and D.2.2 Lexical Mappings.
- the year component (yearFrag) is treated the same in all date & time datatypes
- it allows any number of digits, leading -, no leading +, and leading zeros 
only up to 4 total digits:
{noformat}
[56]   yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))
{noformat}

After playing with "riot --validate", I think it gets it right for gYear, 
gYearMonth and date, but gets it wrong for datetime.

RIOT:       VERSION: 2.12.2-SNAPSHOT
RIOT:       BUILD_DATE: 2014-12-30T23:53:13+0000



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to