I don't think there is any optional behavior on xsd2inst that you can
set (other than the root element name).

If I understand correctly what you are saying, then it would be bug, but
I just tried a very simple example and it worked for me:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  <xs:complexType name="type">
    <xs:sequence>
      <xs:element name="a" minOccurs="0" type="xs:string"/>
      <xs:element name="b" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="root" type="type"/>

</xs:schema>

output:

<root>
  <!--Optional:-->
  <a>string</a>
  <b>string</b>
</root>

Radu

On Mon, 2007-06-11 at 08:02 -0700, Alan Beccati wrote:
> Hi all,
> i run xsd2inst tool against a schema and for leaf elemens with
> minOccours set to zero it prints out only the the <!--Optional:--> or
> <!--Zero or more repetitions:--> comments without an instance of the
> element while optional elements containing other elements (non leaf
> elements) are printed out below the comments.
> 
> I was wondering if there is a way to make xsd2inst print out the
> actual
> optional elements when they occour as leaf in the schema file with the
> aforementioned commands immediately above the actual optional
> elements.
> 
> I searched the documentation without finding any command line option
> for
> setting this behaviour, is this behaviour by design or have i found
> out
> a tool bug?
> 
> best regards.
> A1an
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to