• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

.xsd schema questions

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jim,

What do you mean by generated here? How are you trying to generate these xsds? Are these not manually written ?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
No holds barred. And no bars holed. Except this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic