Hi Arnaud,

the Sourcegenerator from the latest CVS version sometimes generates classes
that are of no use:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:element name="Test">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="Any" type="AnyType"/>
                        </xs:sequence>
                </xs:complexType>
        </xs:element>
        <xs:simpleType name="AnyType">
                <xs:restriction base="xs:string">
                        <xs:enumeration value="a"/>
                        <xs:enumeration value="b"/>
                </xs:restriction>
        </xs:simpleType>
</xs:schema>

In this case Sourcegenerator generates the classes Test.java (ok),
types/AnyType.java (ok)and Any.java, which only contains a constructor and
the marshalling/unmarshalling methods and is not referenced by Test.java.
BTW: Thanks for eliminating the name clashing problem. The namespace
workaround was driving me crazy :)

Albert

-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 11:32 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] ANNOUNCEMENT: Container support -- Nested group


Hi,

A lot of changes have been made in the CVS version regarding container
support.
Let me remind you that a "container" is a Java object that holds other
objects without having necessary a corresponding XML tag. You can think
for instance of nested groups in an XML Schema: a sequence inside a
choice will be represented by a class (FooChoiceSequence) but no XML tag
will correspond to it.
Containers are supported via the SourceGenerator or via the Mapping
File.

The code has been totally refactored and a new behaviour is now in
place, it should get rid of all the famous "error-if-this-used"
ValidationException and it improves the overall unmarshalling process.

I advise anyone interested in Container support (or people who had
trouble unmarshalling their XML document) to test the CVS version and
let us know all the problems they encounter (you can also say that it is
working and thank us for the good work :) ).

Have fun,

Arnaud

PS: don't forget to regenerate the Object Model from the Schema

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to