You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by kk...@apache.org on 2004/10/29 02:33:13 UTC

cvs commit: xml-xmlbeans/samples/values/DateTime/xml datetimesample.xml newdatetimesample.xml

kkrouse     2004/10/28 17:33:13

  Added:       samples/values/DateTime .cvsignore README.txt build.xml
               samples/values/DateTime/schemas datetime.xsd
               samples/values/DateTime/src/org/apache/xmlbeans/samples/datetime
                        DateTime.java DateTimeTest.java
               samples/values/DateTime/xml datetimesample.xml
                        newdatetimesample.xml
  Log:
  XMLBEANS-73: DateTime sample
  Contributed by Rashmi Banthia
  
  Revision  Changes    Path
  1.1                  xml-xmlbeans/samples/values/DateTime/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  build
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/README.txt
  
  Index: README.txt
  ===================================================================
  Sample: DateTime
  Author: Rashmi Banthia (rjain29@gmail.com)
  Last Updated: Oct. 11, 2004
  
  Versions:
      xmlbeans-1.0.3
  
  
  -----------------------------------------------------------------------------
  
  This sample demonstrates how you can work with XML Schema primitive types date,
  dateTime, time, duration, gDay.
  
  This sample illustrates how you can
  (1) Convert org.apache.xmlbeans.XmlDate to java.util.Calendar,org.apache.xmlbeans.GDate, java.util.Date
  (2) Convert org.apache.xmlbeans.XmlTime to java.util.Calendar,org.apache.xmlbeans.GDate, java.util.Date
  (3) Convert org.apache.xmlbeans.XmlDuration to org.apache.xmlbeans.GDuration
  (4) Convert org.apache.xmlbeans.XmlGday to java.util.Calendar,org.apache.xmlbeans.GDate, Day - primitive java int
  (5) Get/Set XML Schema primitive types date, dateTime, time, duration, and gDay.
  
  
  XMLBean Types provide mapping between natural Java classes and W3C Schema types.
  For eg:
  
  Schema Type             Formal Class            Natural Java Class
  xs:date                 XmlDate                 java.util.Calendar (XmlCalendar)
  xs:duration             XmlDuration             - *
  xs:dateTime             XmlDateTime             java.util.Calendar (XmlCalendar)
  xs:time                 XmlTime                 java.util.Calendar (XmlCalendar)
  
  The XmlCalendar is a subclass of GregorianCalendar that modifies several key
  details in the behavior of GregorianCalendar to make it more useful when
  dealing with XML dates.
  
  *javax.xml.datatype.Duration(J2SE 5.0)
  
  
  When you run this sample:
  (1) It will print element values using different formats ie. Calendar, Date, GDate. Please
  note it prints only first occurence of element's value for the purpose of simplicity.
  (2) It will create a new <important-date> element and saves the same in a XML Document.
  
  
  To try out this sample:
  
  1. Set XMLBEANS_HOME in your environment
  2. Ant must be on your PATH
  3. To compile the schemas and sample source, run "ant build"
  4. To execute the sample, run "ant run"
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/build.xml
  
  Index: build.xml
  ===================================================================
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
   -->
   
  <project name="DateTime" default="build">
  	<property environment="env"/>
  
      <path id="DateTime.path">
          <path refid="xmlbeans.path"/>
          <fileset dir="build/lib" includes="*.jar"/>
          <pathelement path="build/classes"/>
      </path>
      
      <target name="init">
          <property name="xmlbeans.home" value="${env.XMLBEANS_HOME}"/>
          <echo message="xmlbeans.home: ${xmlbeans.home}"/>
  
          <!-- check for xbean.jar from binary distribution -->
          <available
              property="xmlbeans.lib"
              value="${xmlbeans.home}/lib"
              file="${xmlbeans.home}/lib/xbean.jar" />
  
          <!-- check for xbean.jar compiled from source -->
          <available
              property="xmlbeans.lib"
              value="${xmlbeans.home}/build/lib"
              file="${xmlbeans.home}/build/lib/xbean.jar" />
  
          <fail message="Set XMLBEANS_HOME in your enviornment."
              unless="xmlbeans.lib"/>
  
          <echo message="xmlbeans.lib: ${xmlbeans.lib}"/>
          <path id="xmlbeans.path">
              <fileset dir="${xmlbeans.lib}" includes="*.jar"/>
          </path>
  
          <taskdef name="xmlbean"
              classname="org.apache.xmlbeans.impl.tool.XMLBean"
              classpathref="xmlbeans.path"/>
      </target>
  
  	<!-- ========================== clean ==== -->
  
      <target name="clean">
          <delete dir="build"/>
      </target>
  
      <!-- ========================== build ==== -->
  
      <target name="build" depends="init,schemas.jar,DateTime.classes">
      </target>
      
       <target name="schemas.check">
          <uptodate property="schemas.notRequired"
              targetfile="build/lib/schemas.jar">
              <srcfiles dir="schemas" includes="**/*.xsd"/>
          </uptodate>
      </target>
  
      <target name="schemas.jar" depends="init,schemas.check"
          unless="schemas.notRequired">
          <mkdir dir="build/lib"/>
  
          <xmlbean schema="schemas"
              destfile="build/lib/schemas.jar"
              srcgendir="build/src"
              classpathref="xmlbeans.path"
              debug="on"
              />
      </target>
  
      <target name="DateTime.classes" depends="init">
          <mkdir dir="build/classes"/>
  		
          <javac srcdir="src"
              destdir="build/classes"
              classpathref="DateTime.path"
              debug="on"
              source="1.4"
              />  
      </target>
       	
   	 <!-- ========================== run ==== -->
  
      <target name="run" depends="init,build">
          <echo message="============================== running DateTime"/>
          <java
              classname="org.apache.xmlbeans.samples.datetime.DateTime"
              classpathref="DateTime.path"
              fork="true">
              <arg line="xml/datetimesample.xml xml/newdatetimesample.xml"/>
          </java>
      </target>
    
       <!-- ========================== test ==== -->
  
      <target name="test" depends="init,build">
          <echo message="============================== testing DateTime"/>
          <java
              classname="org.apache.xmlbeans.samples.datetime.DateTimeTest"
             classpathref="DateTime.path"
              fork="true">
              <arg line="xml/datetimesample.xml xml/newdatetimesample.xml"/>
          </java>
      </target>
  
      
  </project>
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/schemas/datetime.xsd
  
  Index: datetime.xsd
  ===================================================================
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
   -->
   <xs:schema targetNamespace="http://xmlbeans.apache.org/samples/datetime"
   xmlns:xs = "http://www.w3.org/2001/XMLSchema"
   xmlns:dt = "http://xmlbeans.apache.org/samples/datetime"
   elementFormDefault="qualified" >
   
   <xs:element name="datetime">
   	<xs:complexType>
   		<xs:sequence>
   			<xs:element name="important-date" type="dt:important-date" minOccurs="1" maxOccurs="unbounded"/>
   		</xs:sequence>
   	</xs:complexType>
   </xs:element>
   
   <xs:complexType name="important-date" >
   	<xs:sequence>
   		<xs:element name="holiday" type="xs:date" minOccurs="0" maxOccurs="unbounded" />
   		<xs:element name="fun-begin-time" type="xs:time" minOccurs="1" maxOccurs="1" />
   		<xs:element name="fun-end-time" type="xs:time" minOccurs="1" maxOccurs="1" />
   		<xs:element name="job-duration" type="xs:duration" minOccurs="1" maxOccurs="1" />
   		<xs:element name="birthdatetime" type="xs:dateTime" minOccurs="1" maxOccurs="1" />
   		<xs:element name="payday" type="xs:gDay" minOccurs="1" maxOccurs="1" />
   		<xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1" />	
   	</xs:sequence>
   </xs:complexType>
   
   
   </xs:schema>
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/src/org/apache/xmlbeans/samples/datetime/DateTime.java
  
  Index: DateTime.java
  ===================================================================
  /*   Copyright 2004 The Apache Software Foundation
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package org.apache.xmlbeans.samples.datetime;
  
  import java.io.File;
  import java.io.IOException;
  import java.util.Calendar;
  import java.util.ArrayList;
  
  import org.apache.xmlbeans.XmlException;
  import org.apache.xmlbeans.XmlOptions;
  import org.apache.xmlbeans.XmlError;
  import org.apache.xmlbeans.XmlObject;
  
  import org.apache.xmlbeans.GDuration;
  import org.apache.xmlbeans.XmlDate;
  import org.apache.xmlbeans.XmlCalendar;
  
  import java.util.Calendar;
  import java.text.SimpleDateFormat;
  import java.util.Date;
  
  import org.apache.xmlbeans.samples.datetime.ImportantDate;
  import org.apache.xmlbeans.samples.datetime.DatetimeDocument;
  
  /**
   * The sample illustrates how you can work with XML Schema types date,
   * dateTime, time, duration, gDay.
   * It parses the XML Document, prints first occurence of <important-date>
   * value, creates a new <important-date> element and saves it in a new XML Document.
   * This sample illustrates how you can convert XMLBean types to Java types
   * (java.util.Date, java.util.Calendar).
   * It uses the schema defined in datetime.xsd.
   */
  public class DateTime {
  
     /**
      * Receives an XML Instance and prints the element values,
      * Also creates a new XML Instance.
      *
      * @param args An array containing
      *             (a)Path to the XML Instance conforming to the XML schema in datetime.xsd.
      *             (b)Path for creating a new XML Instance.
      */
     public static void main(String args[]){
         // Create an instance of this class to work with.
         DateTime dt = new DateTime();
  
         // Create an instance of a Datetime type based on the received XML's schema
         DatetimeDocument doc = dt.parseXml(args[0]);
  
         // Prints the element values from the XML
         dt.printInstance(doc);
  
         // Creates a new XML and saves the file
         dt.createDocument(doc,args[1]);
  
     }
  
     /**
      * Creates a File from the XML path provided in main arguments, then
      * parses the file's contents into a type generated from schema.
      */
     public DatetimeDocument parseXml(String file){
         // Get the XML instance into a file using the path provided.
         File xmlfile = new File(file);
  
         // Create an instance of a type generated from schema to hold the XML.
         DatetimeDocument doc = null;
  
         try {
             // Parse the instance into the type generated from the schema.
             doc = DatetimeDocument.Factory.parse(xmlfile);
         }
         catch(XmlException e){
             e.printStackTrace();
         }
         catch(IOException e){
             e.printStackTrace();
         }
         return doc;
     }
  
     /**
      * This method prints first occurence of <important-date>
      * value. It also prints converted values from  XMLBean types to Java types
      * (java.util.Date, java.util.Calendar) and org.apache.xmlbeans.GDate.
      */
     public void printInstance(DatetimeDocument doc){
         // Retrieve the <datetime> element and get an array of
         // the <important-date> elements it contains.
         DatetimeDocument.Datetime dtelement = doc.getDatetime();
         ImportantDate[] impdate = dtelement.getImportantDateArray();
  
         // Loop through the <important-date> elements, printing the
         // values for each.
         for (int i=0;i<impdate.length;i++){
  
             //For purpose of simplicity in output, only first occurrence is printed.
             if (i==0){
  
                 //Retrieving all <holiday> elements within  <important-date> element
                 XmlDate[] holiday = impdate[i].xgetHolidayArray();
                 System.out.println("Holiday(xs:date): ");
  
                 for (int j=0;j<holiday.length;j++){
                     if (j==0){
                         //XmlDate to java.util.Calendar,org.apache.xmlbeans.GDate, java.util.Date
                         System.out.println("Calendar:" + holiday[j].getCalendarValue() );
                         System.out.println("Date:"+holiday[j].getDateValue() );
                         System.out.println("GDate:"+holiday[j].getGDateValue() +"\n");
                     }
                 }
  
                 //XmlTime to java.util.Calendar, org.apache.xmlbeans.GDate, java.util.Date
                 System.out.println("Fun Begin Time(xs:time): ");
                 System.out.println("Calendar:"+impdate[i].getFunBeginTime());
                 System.out.println("GDate:"+impdate[i].xgetFunBeginTime().getGDateValue()  );
  
                 //To convert java.util.Calendar to java.util.Date
                 SimpleDateFormat sdf = new SimpleDateFormat("H:mm:ss");
                 Date dt = impdate[i].getFunBeginTime().getTime();
                 System.out.println("Date:"+ sdf.format(dt) +"\n" );
  
  
                 //XmlDuration to org.apache.xmlbeans.GDuration
                 System.out.println("Job Duration(xs:duration): ");
                 System.out.println("GDuration:"+impdate[i].getJobDuration() +"\n" );
  
                 //XmlDate to Calendar,GDate, Date
                 System.out.println("Birth DateTime(xs:dateTime): ");
                 System.out.println("Calendar:"+impdate[i].getBirthdatetime());
                 System.out.println("Date:"+impdate[i].xgetBirthdatetime().getDateValue());
                 System.out.println("GDate:"+impdate[i].xgetBirthdatetime().getGDateValue() +"\n" );
  
  
                 //XmlGday to Calendar,GDate, Day - primitive java int
                 System.out.println("Pay Day(xs:gDay): ");
                 System.out.println("Calendar:"+impdate[i].getPayday());
                 System.out.println("GDate:"+impdate[i].xgetPayday().getGDateValue());
                 System.out.println("Day:"+ impdate[i].xgetPayday().getGDateValue().getDay() +"\n" );
  
                 System.out.println("\n\n");
             }
         }
  
     }
  
     /**
      * This method creates an new <important-date> element and attaches to the existing XML Instance, and saves the
      * new Instance to a file(args[1]).
      */
     public void createDocument(DatetimeDocument doc , String file){
         // Retrieve the <datetime> element and add a new <important-date> element.
         DatetimeDocument.Datetime dtelement = doc.getDatetime();
  
         //
         // add an important date using XmlCalendar
         //
  
         ImportantDate impdate = dtelement.addNewImportantDate();
  
         //Creating value for <holiday> element
         Calendar  holiday = new XmlCalendar("2004-07-04");
  
         //Creating value for <fun-begin-time> element
         Calendar  funbegintime = new XmlCalendar("10:30:33");
  
         //Creating value for <fun-end-time> element
         Calendar  funendtime = new XmlCalendar("12:40:12");
  
         //Creating value for <birthdatetime> element
         Calendar  birthdatetime = new XmlCalendar("1977-11-29T10:10:12");
  
         //Creating value for <job-duration> element
         GDuration jobduration =  new GDuration(1,2,4,5,10,12,15,null);
  
         //Creating value for <payday> element
         Calendar payday = new XmlCalendar("---12");
  
         //Setting all the elements
         impdate.addHoliday(holiday);
         impdate.setFunBeginTime(funbegintime);
         impdate.setFunEndTime(funendtime);
         impdate.setJobDuration(jobduration);
         impdate.setBirthdatetime(birthdatetime);
         impdate.setPayday(payday);
         impdate.setDescription("Using XmlCalendar");
  
  
         //
         // add another important date using Calendar
         //
  
         impdate = dtelement.addNewImportantDate();
  
         //Creating value for <holiday> element using XmlCalendar
         holiday = new XmlCalendar("2004-07-04");
  
         //Creating value for <fun-begin-time> element using GregorianCalendar
         funbegintime = Calendar.getInstance();
         funbegintime.clear();
         funbegintime.set(Calendar.AM_PM , Calendar.AM);
         funbegintime.set(Calendar.HOUR, 10);
         funbegintime.set(Calendar.MINUTE, 30 );
         funbegintime.set(Calendar.SECOND, 35 );
  
         //Creating value for <fun-end-time> element
         funendtime = Calendar.getInstance();
         funendtime.clear();
         funendtime.set(Calendar.AM_PM , Calendar.AM);
         funendtime.set(Calendar.HOUR, 12);
         funendtime.set(Calendar.MINUTE, 40 );
         funendtime.set(Calendar.SECOND, 12 );
  
         //Creating value for <birthdatetime> element
         birthdatetime = Calendar.getInstance();
         birthdatetime.clear();
         birthdatetime.set(1977,10,29,10,10,12);
  
         //Creating value for <job-duration> element
         jobduration =  new GDuration(1,2,4,5,10,12,15,null);
  
         //Creating value for <payday> element
         payday = Calendar.getInstance();
         payday.clear();
         payday.set(Calendar.DAY_OF_MONTH,12);
  
         //Setting all the elements
         impdate.addHoliday(holiday);
         impdate.setFunBeginTime(funbegintime);
         impdate.setFunEndTime(funendtime);
         impdate.setJobDuration(jobduration);
         impdate.setBirthdatetime(birthdatetime);
         impdate.setPayday(payday);
         impdate.setDescription("Using Calendar");
  
         XmlOptions xmlOptions = new XmlOptions();
         xmlOptions.setSavePrettyPrint();
  
         // Validate the new XML
         boolean isXmlValid = validateXml(doc);
         if (isXmlValid) {
             File f = new File(file);
  
             try{
                 //Writing the XML Instance to a file.
                 doc.save(f,xmlOptions);
             }
             catch(IOException e){
                 e.printStackTrace();
             }
             System.out.println("\nXML Instance Document saved at : " + f.getPath());
         }
     }
  
     /**
      * <p>Validates the XML, printing error messages when the XML is invalid. Note
      * that this method will properly validate any instance of a compiled schema
      * type because all of these types extend XmlObject.</p>
      *
      * <p>Note that in actual practice, you'll probably want to use an assertion
      * when validating if you want to ensure that your code doesn't pass along
      * invalid XML. This sample prints the generated XML whether or not it's
      * valid so that you can see the result in both cases.</p>
      *
      * @param xml The XML to validate.
      * @return <code>true</code> if the XML is valid; otherwise, <code>false</code>
      */
     public boolean validateXml(XmlObject xml)
     {
         boolean isXmlValid = false;
  
         // A collection instance to hold validation error messages.
         ArrayList validationMessages = new ArrayList();
  
         // Validate the XML, collecting messages.
         isXmlValid = xml.validate(new XmlOptions().setErrorListener(validationMessages));
  
         if (!isXmlValid)
         {
             System.out.println("Invalid XML: ");
             for (int i = 0; i < validationMessages.size(); i++)
             {
                 XmlError error = (XmlError) validationMessages.get(i);
                 System.out.println(error.getMessage());
                 System.out.println(error.getObjectLocation());
             }
         }
         return isXmlValid;
     }
  
  }
  
  
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/src/org/apache/xmlbeans/samples/datetime/DateTimeTest.java
  
  Index: DateTimeTest.java
  ===================================================================
  /*   Copyright 2004 The Apache Software Foundation
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  package org.apache.xmlbeans.samples.datetime;
  
  import org.apache.xmlbeans.samples.datetime.DatetimeDocument ;
  
  /**
   * A class with which to test the DateTime sample.
   */
  public class DateTimeTest
  {
      /**
       * Tests the DateTime sample.
       *
       * @param args An array in which the first item is a path to an XML file
       * based on the schema in datetime.xsd.
       */
      public static void main(String[] args)
      {
          // Create an instance of this sample to work with.
          DateTime sample = new DateTime();
  
          // Create an schema type instance from the XML indicated by the path.
          DatetimeDocument doc = sample.parseXml(args[0]);
  
          sample.printInstance(doc);
  
          // Validate the XML.
          boolean exampleIsValid = sample.validateXml(doc);
          assert exampleIsValid;
  
          //Creating a new XML document
          sample.createDocument(doc,args[1]);
  
      }
  }
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/xml/datetimesample.xml
  
  Index: datetimesample.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
   -->
  <datetime xmlns="http://xmlbeans.apache.org/samples/datetime">
    <important-date>
      <holiday>2004-11-02</holiday>
      <fun-begin-time>18:00:00</fun-begin-time>
      <fun-end-time>23:00:00</fun-end-time>
      <job-duration>P1Y1DT20H25M30S</job-duration>
      <birthdatetime>2001-04-16T15:23:15</birthdatetime>
      <payday>---15</payday>
      <description>2nd-Nov-2004, 6:00PM, 11:00PM, 1Yr and a day - 20hours, 16th Apr 2001 3:23 and 15 seconds</description>
    </important-date>
    <important-date>
      <holiday>2004-07-04</holiday>
      <fun-begin-time>10:30:35</fun-begin-time>
      <fun-end-time>12:40:12</fun-end-time>
      <job-duration>P2Y4M5DT10H12M15S</job-duration>
      <birthdatetime>1977-11-29T10:10:12</birthdatetime>
      <payday>---30</payday>
      <description>Description</description>
    </important-date>   
  </datetime>
  <!-- Professional XML pgno.201  =  duration = 11Y0M1DT20:25:30 -->
  
  
  
  1.1                  xml-xmlbeans/samples/values/DateTime/xml/newdatetimesample.xml
  
  Index: newdatetimesample.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.-->
  <datetime xmlns="http://xmlbeans.apache.org/samples/datetime">
    <important-date>
      <holiday>2004-11-02</holiday>
      <fun-begin-time>18:00:00</fun-begin-time>
      <fun-end-time>23:00:00</fun-end-time>
      <job-duration>P1Y1DT20H25M30S</job-duration>
      <birthdatetime>2001-04-16T15:23:15</birthdatetime>
      <payday>---15</payday>
      <description>2nd-Nov-2004, 6:00PM, 11:00PM, 1Yr and a day - 20hours, 16th Apr 2001 3:23 and 15 seconds</description>
    </important-date>
    <important-date>
      <holiday>2004-07-04</holiday>
      <fun-begin-time>10:30:35</fun-begin-time>
      <fun-end-time>12:40:12</fun-end-time>
      <job-duration>P2Y4M5DT10H12M15S</job-duration>
      <birthdatetime>1977-11-29T10:10:12</birthdatetime>
      <payday>---30</payday>
      <description>Description</description>
    </important-date>
    <important-date>
      <holiday>2004-07-04</holiday>
      <fun-begin-time>10:30:33</fun-begin-time>
      <fun-end-time>12:40:12</fun-end-time>
      <job-duration>P2Y4M5DT10H12M15S</job-duration>
      <birthdatetime>1977-11-29T10:10:12</birthdatetime>
      <payday>---12</payday>
      <description>Using XmlCalendar</description>
    </important-date>
    <important-date>
      <holiday>2004-07-04</holiday>
      <fun-begin-time>10:30:35</fun-begin-time>
      <fun-end-time>12:40:12</fun-end-time>
      <job-duration>P2Y4M5DT10H12M15S</job-duration>
      <birthdatetime>1977-11-29T10:10:12</birthdatetime>
      <payday>---12</payday>
      <description>Using Calendar</description>
    </important-date>
  </datetime>
  <!--Professional XML pgno.201  =  duration = 11Y0M1DT20:25:30-->
  
  

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