File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes .xsd schema questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark ".xsd schema questions" Watch ".xsd schema questions" New topic
Author

.xsd schema questions

jim li
Ranch Hand

Joined: May 20, 2008
Posts: 180
hi

i have complextypes in .xsd schema file, and i want the complextypes to be generated as the order i preferred from java classes.

ie,

<xs:complexType name="currency">
<xs:sequence>
<xs:element name="currencyCode" type="tns:codedValue"/>
<xs:element name="amount" type="xs:double"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="codedValue">
<xs:sequence>
<xs:element name="codeSystem" type="xs:string"/>
<xs:element name="code" type="xs:string"/>
<xs:element minOccurs="0" name="displayName" type="xs:string"/>
</xs:sequence>
</xs:complexType>


since currency is depend on codedvalue. i want coded value to be generated first:

<xs:complexType name="codedValue">
<xs:sequence>
<xs:element name="codeSystem" type="xs:string"/>
<xs:element name="code" type="xs:string"/>
<xs:element minOccurs="0" name="displayName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="currency">
<xs:sequence>
<xs:element name="currencyCode" type="tns:codedValue"/>
<xs:element name="amount" type="xs:double"/>
</xs:sequence>
</xs:complexType>



thank you
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Hi Jim,

What do you mean by generated here? How are you trying to generate these xsds? Are these not manually written ?


Regards
KumarRaja

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1174
XML Schema Tutorial: Power Schemas with Stylus Studio says -

In general, there is no preferred order within a schema document ...



Btw, the BP goes out of its way to ensure "proper" ordering of the schema's content.

Regards,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
 
subject: .xsd schema questions