You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Julien Plu <ju...@redaction-developpez.com> on 2013/09/12 12:47:34 UTC

Bug with xsd:date datatype

Hi,

I use Jena 2.10.1 to compute the age of people from french DBpedia dataset.

When I retrieve a date, sometimes, this code "date.getValue()", where
"date" is a "Literal", gives me an exception :

Lexical form '1993-11-31' is not a legal instance of Datatype[
http://www.w3.org/2001/XMLSchema#date].

Whereas in the dataset the value is "1993-11-31"^^
http://www.w3.org/2001/XMLSchema#date (even the toString() function gives
me this value).

I did something wrong or is-it a bug from Jena ?

Thanks in advance.

Julien.

Re: Bug with xsd:date datatype

Posted by Julien Plu <ju...@redaction-developpez.com>.
Ok good to know. Thanks for your quick replies :-)

Best regards.

Julien.


2013/9/12 Arthur Vaïsse-Lesteven <ar...@yahoo.fr>

> Jena implement the W3C standard most ( all ? ) the time.
>
> The W3C standard about the xsd:datetime says :
>
> [...]The value of each numeric-valued property
> (other than timeOnTimeline) is limited to the maximum value within the
> interval
> determined by the next-higher property. For example, the day value can
> never be 32,
> and cannot even be 29 for month 02 and year 2002 (February 2002).[...]
>
> Source : http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dt-dateTime
>
> So to answer your question :
> >Off course no, but the jena intern process check the date validity ?
>
> I'm not 100% sure, but I say yes, it's very likely that appends.
>
> VAISSE-LESTEVEN Arthur.
>
>
>
> ________________________________
>  De : Julien Plu <ju...@redaction-developpez.com>
> À : users@jena.apache.org
> Envoyé le : Jeudi 12 septembre 2013 13h05
> Objet : Re: Bug with xsd:date datatype
>
>
> Off course no, but the jena intern process check the date validity ?
>
>
> 2013/9/12 Martynas Jusevičius <ma...@graphity.org>
>
> > Does November ever have 31 days?
> >
> > On Thu, Sep 12, 2013 at 12:47 PM, Julien Plu
> > <ju...@redaction-developpez.com> wrote:
> > > Hi,
> > >
> > > I use Jena 2.10.1 to compute the age of people from french DBpedia
> > dataset.
> > >
> > > When I retrieve a date, sometimes, this code "date.getValue()", where
> > > "date" is a "Literal", gives me an exception :
> > >
> > > Lexical form '1993-11-31' is not a legal instance of Datatype[
> > > http://www.w3.org/2001/XMLSchema#date].
> > >
> > > Whereas in the dataset the value is "1993-11-31"^^
> > > http://www.w3.org/2001/XMLSchema#date (even the toString() function
> > gives
> > > me this value).
> > >
> > > I did something wrong or is-it a bug from Jena ?
> > >
> > > Thanks in advance.
> > >
> > > Julien.
> >
>

Re: Bug with xsd:date datatype

Posted by Arthur Vaïsse-Lesteven <ar...@yahoo.fr>.
Jena implement the W3C standard most ( all ? ) the time.

The W3C standard about the xsd:datetime says : 

[...]The value of each numeric-valued property
(other than timeOnTimeline) is limited to the maximum value within the interval
determined by the next-higher property. For example, the day value can never be 32,
and cannot even be 29 for month 02 and year 2002 (February 2002).[...]

Source : http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dt-dateTime

So to answer your question : 
>Off course no, but the jena intern process check the date validity ?

I'm not 100% sure, but I say yes, it's very likely that appends.

VAISSE-LESTEVEN Arthur.



________________________________
 De : Julien Plu <ju...@redaction-developpez.com>
À : users@jena.apache.org 
Envoyé le : Jeudi 12 septembre 2013 13h05
Objet : Re: Bug with xsd:date datatype
 

Off course no, but the jena intern process check the date validity ?


2013/9/12 Martynas Jusevičius <ma...@graphity.org>

> Does November ever have 31 days?
>
> On Thu, Sep 12, 2013 at 12:47 PM, Julien Plu
> <ju...@redaction-developpez.com> wrote:
> > Hi,
> >
> > I use Jena 2.10.1 to compute the age of people from french DBpedia
> dataset.
> >
> > When I retrieve a date, sometimes, this code "date.getValue()", where
> > "date" is a "Literal", gives me an exception :
> >
> > Lexical form '1993-11-31' is not a legal instance of Datatype[
> > http://www.w3.org/2001/XMLSchema#date].
> >
> > Whereas in the dataset the value is "1993-11-31"^^
> > http://www.w3.org/2001/XMLSchema#date (even the toString() function
> gives
> > me this value).
> >
> > I did something wrong or is-it a bug from Jena ?
> >
> > Thanks in advance.
> >
> > Julien.
>

Re: Bug with xsd:date datatype

Posted by Julien Plu <ju...@redaction-developpez.com>.
Off course no, but the jena intern process check the date validity ?


2013/9/12 Martynas Jusevičius <ma...@graphity.org>

> Does November ever have 31 days?
>
> On Thu, Sep 12, 2013 at 12:47 PM, Julien Plu
> <ju...@redaction-developpez.com> wrote:
> > Hi,
> >
> > I use Jena 2.10.1 to compute the age of people from french DBpedia
> dataset.
> >
> > When I retrieve a date, sometimes, this code "date.getValue()", where
> > "date" is a "Literal", gives me an exception :
> >
> > Lexical form '1993-11-31' is not a legal instance of Datatype[
> > http://www.w3.org/2001/XMLSchema#date].
> >
> > Whereas in the dataset the value is "1993-11-31"^^
> > http://www.w3.org/2001/XMLSchema#date (even the toString() function
> gives
> > me this value).
> >
> > I did something wrong or is-it a bug from Jena ?
> >
> > Thanks in advance.
> >
> > Julien.
>

Re: Bug with xsd:date datatype

Posted by Martynas Jusevičius <ma...@graphity.org>.
Does November ever have 31 days?

On Thu, Sep 12, 2013 at 12:47 PM, Julien Plu
<ju...@redaction-developpez.com> wrote:
> Hi,
>
> I use Jena 2.10.1 to compute the age of people from french DBpedia dataset.
>
> When I retrieve a date, sometimes, this code "date.getValue()", where
> "date" is a "Literal", gives me an exception :
>
> Lexical form '1993-11-31' is not a legal instance of Datatype[
> http://www.w3.org/2001/XMLSchema#date].
>
> Whereas in the dataset the value is "1993-11-31"^^
> http://www.w3.org/2001/XMLSchema#date (even the toString() function gives
> me this value).
>
> I did something wrong or is-it a bug from Jena ?
>
> Thanks in advance.
>
> Julien.