I was wondering if there is a easy way to have the Source Generator use the 
java.util.Date data type instead of the internal castor Date datatype.
The xsd:integer one worked as I expected.

I used the following command to run the source generator

c:\j2sdk1.4.2_04\bin\java -cp 
libs\xerces.jar;libs\castor-0.9.6-xml.jar;libs\commons-logging.jar 
org.exolab.castor.builder.SourceGenerator  -types j2 -i SearchResultSet.xsd 

Contents of the xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:element name="SearchDocs" type="SearchDocType" />

    <xsd:complexType name="SearchDocType">
      <xsd:sequence>
          <xsd:element name="Status" type="xsd:string" minOccurs="1" 
maxOccurs="1"/>
          <xsd:element name="Keyword" type="xsd:string" minOccurs="0" 
maxOccurs="1"/>
          <xsd:element name="Catalog" type="xsd:string" minOccurs="0" 
maxOccurs="1"/>
          <xsd:element name="Pub" type="xsd:string" minOccurs="0" 
maxOccurs="1"/>
          <xsd:element name="DocResults" type="DocumentType" minOccurs="0" 
maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
   
     <xsd:complexType name="DocumentType">
        <xsd:sequence>
            <xsd:element name="PubTitle" type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="Format"  type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="FileSize"        type="xsd:integer" 
minOccurs="1" maxOccurs="1" />
            <xsd:element name="PubNumber"       type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="Ext_Description" type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="RevisionDate"    type="xsd:date" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="id"      type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="filename"        type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="lock"    type="xsd:string" minOccurs="1" 
maxOccurs="1" />
            <xsd:element name="attachment"      type="xsd:string" minOccurs="1" 
maxOccurs="1" />
        </xsd:sequence>        
     </xsd:complexType> 
</xsd:schema>


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to