Title: Question on Castor's Source Generator tool.
Hi Yan,
 
Are you using the CVS version?
 
Arnaud
-----Original Message-----
From: Yan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 7:11 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Question on Castor's Source Generator tool.

Hi,

I spend some time on Castors Source Generator. I think it is really a very good tool which does save resources and efforts for our company. But I came across some problems when I try to use Source Generator to generate classes from an XML schema.

The problem is when I use the following schema and try to generate according classes; it does not provide classes for simple type element. Therefore all of those generated classes can not be compiled.

The schema is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<schema targetNamespace="http://www.altova.com/IPO" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ipo="http://www.altova.com/IPO" elementFormDefault="unqualified" attributeFormDefault="unqualified">

        <annotation>

                <documentation>

   Addresses for International Purchase order schema

   Copyright 2000 Example.com. All rights reserved.

  </documentation>

        </annotation>

        <complexType name="Address">

                <sequence>

                        <element name="name" type="string" minOccurs="0"/>

                        <element name="street" type="string"/>

                        <element name="city" type="string"/>

                </sequence>

        </complexType> ……

The generated classes are:

public abstract class Address implements java.io.Serializable {

    private Name _name;

 

    private Street _street;

    private City _city;

      …      … 

 }

Since it did not generate Name, Street and City classes, I can not compile the Address class. But I did see some examples from Castors User Guideline for Source Generator. It seems it can map simple type in XML schema to Java types. Could you tell me how to solve it? Thank you very much.

Yan.



Reply via email to