Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-840

riot is too permissive towards yearFrag of xsd:datetime

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • Jena 2.13.0
    • None
    • RIOT
    • None

    Description

      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 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:
        [56]   yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))
        

      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

      Attachments

        1. test-gYearMonth.ttl
          0.1 kB
          Vladimir Alexiev
        2. test-datetime.ttl
          0.1 kB
          Vladimir Alexiev

        Activity

          People

            Unassigned Unassigned
            vladimir.alexiev Vladimir Alexiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: