You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jacob Danner (JIRA)" <xm...@xml.apache.org> on 2005/03/15 00:43:10 UTC

[jira] Resolved: (XMLBEANS-68) GDateBuilder outputs empty string when used without time or timezone

     [ http://issues.apache.org/jira/browse/XMLBEANS-68?page=history ]
     
Jacob Danner resolved XMLBEANS-68:
----------------------------------

     Resolution: Fixed
    Fix Version: Version 2 Beta 1
                 Version 2 Beta 2
                 Version 2

This issue is fixed in V2. An automated regression case has been created.
misc.detailed.JiraRegression50_100Test.test_jira_XmlBeans68

> GDateBuilder outputs empty string when used without time or timezone
> --------------------------------------------------------------------
>
>          Key: XMLBEANS-68
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-68
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 1.0.3
>  Environment: Windows XP, JRockit 1.4.1.
>     Reporter: Dmitri Colebatch
>     Assignee: Jacob Danner
>     Priority: Minor
>      Fix For: Version 2, Version 2 Beta 1, Version 2 Beta 2

>
> See http://issues.apache.org/eyebrowse/BrowseList?listName=user@xmlbeans.apache.org&by=thread&from=896554 for a discussion.
> To summarize, the following schema:
> <xsd:schema
> 	targetNamespace="urn:test-date-attribute"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 	xmlns="urn:test-date-attribute" elementFormDefault="qualified"
> attributeFormDefault="unqualified" version="1">
> 	<xsd:simpleType name="Date">
> 		<xsd:restriction base="xsd:date">
> 			<xsd:minInclusive value="1970-01-01"/>
> 			<xsd:maxInclusive value="2049-12-31"/>
> 			<xsd:pattern value="\d\d\d\d-\d\d-\d\d"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> 	<xsd:element name="TestElementWithDateAttribute">
> 		<xsd:complexType>
> 			<xsd:attribute name="SomeDate" type="Date" use="required"/>
> 		</xsd:complexType>
> 	</xsd:element>
> </xsd:schema>
> compiled using 1.03, and the following code:
>         GDateBuilder gdateBuilder = new
> GDateBuilder(Calendar.getInstance());
>         gdateBuilder.clearTime();
>         gdateBuilder.clearTimeZone();
>         GDate gdate = gdateBuilder.toGDate();
>         Date xdate = Date.Factory.newInstance();
>         xdate.setGDateValue(gdate);
>         TestElementWithDateAttributeDocument doc = TestElementWithDateAttributeDocument.Factory.newInstance();
> TestElementWithDateAttributeDocument.TestElementWithDateAttribute
> root = 
> 		doc.addNewTestElementWithDateAttribute();
>         root.xsetSomeDate(xdate);
>         System.out.println("Doc: " + doc);
> spits out:
> Doc: <TestElementWithDateAttribute SomeDate=""
> xmlns="urn:test-date-attribute"/>
> Cezar said this is a bug in 1.03 but works in the version 2 releases.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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