You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@jena.apache.org by "Vladimir Alexiev (Jira)" <ji...@apache.org> on 2022/03/30 10:28:00 UTC

[jira] [Created] (JENA-2318) jena rejects some valid xsd:date literals

Vladimir Alexiev created JENA-2318:
--------------------------------------

             Summary: jena rejects some valid xsd:date literals
                 Key: JENA-2318
                 URL: https://issues.apache.org/jira/browse/JENA-2318
             Project: Apache Jena
          Issue Type: Bug
            Reporter: Vladimir Alexiev


(related to https://github.com/schemaorg/schemaorg/issues/1781)

On a query like this:
{noformat}
PREFIX schema: <http://schema.org/>
PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
select * {
    bind("2022-01-01"^^schema:Date < "02022-01-02"^^schema:Date as ?x1)
    bind(str("2022-01-01"^^schema:Date) < str("02022-01-02"^^schema:Date) as ?x2)
    bind("2022-01-01"^^xsd:date < "02022-01-02"^^xsd:date as ?x3)
    bind("1"^^schema:Integer < "02"^^schema:Integer as ?x4)
    bind(str("1"^^schema:Integer) < str("02"^^schema:Integer) as ?x5)
    bind("1"^^xsd:integer < "02"^^xsd:integer as ?x6)
}
{noformat}
- http://sparql.org/sparql.html returns UNDEF for ?x3
- arq returns 
{noformat}
WARN  NodeValue       :: Datatype format exception: "02022-01-02"^^xsd:date
{noformat}

But according to https://en.wikipedia.org/wiki/ISO_8601#Years, one can use more than 4 digits (to accommodate years >10000).

Negative years are also allowed, but sparql.org returns UNDEF for comparison of "-2022-01-02"^^xsd:dateTime





--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: jira-unsubscribe@jena.apache.org
For additional commands, e-mail: jira-help@jena.apache.org