xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Brook (JIRA)" <xmlbeans-...@xml.apache.org>
Subject [jira] Commented: (XMLBEANS-320) compiled schema Unable to parse xs:date field
Date Wed, 28 Mar 2007 11:33:32 GMT

    [ https://issues.apache.org/jira/browse/XMLBEANS-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484826
] 

Andy Brook commented on XMLBEANS-320:
-------------------------------------

Thanks for the example, I'm now seeing some validation issues:-

[0]-/home/axb/workspaces/itds/itds-webapp/src/examples/Outbound/Digital/ContentOrder.xml:0:
error: date: Invalid date value: wrong type: 2007-04-01
[1]-/home/axb/workspaces/itds/itds-webapp/src/examples/Outbound/Digital/ContentOrder.xml:0:
error: date: Invalid date value: wrong type: 2007-04-08
[2]-/home/axb/workspaces/itds/itds-webapp/src/examples/Outbound/Digital/ContentOrder.xml:0:
error: date: Invalid date value: wrong type: 2007-04-01
[3]-/home/axb/workspaces/itds/itds-webapp/src/examples/Outbound/Digital/ContentOrder.xml:0:
error: date: Invalid date value: wrong type: 2007-04-08

I've tried the following (64bit) JVMs which all replicate the same issue:

ibm-java2-x86_64-50-r2
jrockit-R27.1.0-jdk1.5.0_08
jdk1.5.0_11
jdk1.6.0

I'm going to try the test on win32 and 32bit Ubuntu, Ill post those results also.

Checking http://www.w3.org/TR/NOTE-datetime, the dates above seem to be valid ISO8601 format,
so why the error?



> compiled schema Unable to parse xs:date field
> ---------------------------------------------
>
>                 Key: XMLBEANS-320
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-320
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 2.2
>         Environment: Linux-Debian/Ubuntu 6.10/X86_64
>            Reporter: Andy Brook
>         Attachments: ContentOrder.xml, DateParseTest.java, DateParseTest.java, ManifestFile1.xsd
>
>
> I have a provided schema that contains a Duration, comprising of start and end xs:date
fields.  The schema compiled perfectly and Im pulling out all data.  The only problem is xs:date
fields.  As soon as I access getStart (xs:date) I get the following stack:
> Exception in thread "main" org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException:
Invalid date value: wrong type: 2007-04-01
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase$ValueOutOfRangeValidationContext.invalid(XmlObjectBase.java:285)
> 	at org.apache.xmlbeans.impl.values.JavaGDateHolderEx.lex(JavaGDateHolderEx.java:81)
> 	at org.apache.xmlbeans.impl.values.JavaGDateHolderEx.set_text(JavaGDateHolderEx.java:56)
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1135)
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1274)
> 	at org.apache.xmlbeans.impl.values.JavaGDateHolderEx.calendarValue(JavaGDateHolderEx.java:192)
> 	at org.apache.xmlbeans.impl.values.XmlObjectBase.getCalendarValue(XmlObjectBase.java:1516)
> 	at com.bvi.schemas.itds.interfaces.manifestFile.impl.DurationImpl.getStart(DurationImpl.java:42)
> Given the only code I've actually written is the test code, and that I cannot change
the schema.  The xml document is valid according to the schema, and the actual date node text
appears to be ISO8601 (YYYY-MM-DD).  Is this a bug or am I missing something?
> A workaround is to access the node directly, and get the child node values out.  Schema,
example XML and test code to be attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


Mime
View raw message