I can see why inst2xsd tool is doing that.
<subComponents>
<subComponent/>
<subComponent>
<sequence/>
</subComponent>
</subComponents>
The tools sees:
<subcomponent />
and <subComponent><sequence /> ...
As 2 different types, if you want to correct that, you can try making
them both subComponent Elements as
<subComponent>
<sequence/>
...
HTH,
-jacobd
On Wed, Mar 19, 2008 at 2:12 PM, Dan Hwang <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've beening using inst2xsd script to generate xsd from xml.
> I added <relationships> block to add some new features.
> After regenerating the xsd, I noticed that <subComponents> has been changed.
>
> ------------before------------
> ...
> <xs:element name="subComponents">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="subComponent" maxOccurs="unbounded"
> minOccurs="0">
> ...
> ------------after------------
> ...
> <xs:element name="subComponents">
> <xs:complexType>
> <xs:choice maxOccurs="unbounded" minOccurs="0">
> <xs:element name="subComponent">
> ...
>
>
>
> I'm running the following to generate xsd.
> ./xmlbeans-2.0.0/bin/inst2xsd -design rd -enumerations never
> -simple-content-types string rail.xml
>
>
> ------------rail.xml------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <rail>
> <keyword>
> <first/>
> <second/>
> <third/>
> </keyword>
> <relationships>
> <displayType/>
> <relationship>
> <type/>
> <content/>
> </relationship>
> </relationships>
> <component>
> <sequence/>
> <name/>
> <header>
> <graphic>
> <image/>
> <altText/>
> <URL/>
> </graphic>
> <html>
> <text/>
> <URL/>
> </html>
> </header>
> <subComponents>
> <subComponent/>
> <subComponent>
> <sequence/>
> </subComponent>
> </subComponents>
> </component>
> </rail>
>
> --------------------------
>
> Thanks for your help~
> -Dan
>
> PS: I noticed that putting the <relationships> block underneath the
> <component> seems to leave the <subComponents> unchanged...
> However, there's gotta be something wrong with the way I'm using it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
I'm competing in a Half-Ironman distance triathlon to raise money for
the fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]