On Wed, 05 Jan 2005 10:47:26 -0500, Rick Mangi <[EMAIL PROTECTED]> wrote:
>
> I love solving my own problems, thanks to the folks who offered to help,
> but I figured it out. Here's the deal for anyone else who encounters
> this oddity.
>
> I created my schema by running the dtd through XMLSpy (I couldn't get
> the castor dtd converter to work, it complained about default
> namespaces. I saw a few postings about this but no solutions). Anyway,
> it did a decent job, but created a few odd bits of code... in particular:
>
> <xs:element name="REAgents">
> <xs:complexType>
> <xs:sequence maxOccurs="unbounded">
> <xs:element ref="REAgent"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> This will cause REAgents.java to be created with an ArrayList of
> REAgentsItem objects which contain the REAgent objects.
>
> Not what we want. In order to cause the REAgent objects to stored in the
> collection in REAgents you have to do this (which is what you would do
> by hand...)
>
> <xs:element name="REAgents">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="REAgent" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> Basically, you have to move the multiplicity to the element, not the
> sequence. This is obvious now that I figured it out. So I've gone
> through the schema generated and fixed a bunch of this (along with some
> other really funky stuff...) and it looks great.
>
> Hope this helps somebody else sometime.
Rick ,
I was actually focused on this same exact area of the XSD and the fact
that you said that you used XMLSpy to convert the DTD into the XSD.
I'm happy to year that your problem has been solved.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL
PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project
http://www.castor.org/
Apache Geronimo
http://geronimo.apache.org/
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user