• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSD question

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I have an XML file like the one shown below,



I was trying to define an XSD schema for the above XML, so that i will validate the XML data, also use the same for parsing the file using JAXB2.

In this regard, since the <In> and <Out> tag can appear in any order and any number of times, i couldn't exactly know how the complex type LogInOut should look.

Please see the XSD which i have created. Let me know the changes which i have to make to my XSD.




Not sure whether to use sequence or all or choice, certainly not choice.
Also i can't make the complextype as xs:sequence as there is no guarentee that <In> tag will be the first one.
Also if i make it xs:all in that case the maxOccurs must be 1, so i cant define more than one <In> or <Out> tags


Please help me in this regard.

Thanks

[ October 15, 2008: Message edited by: Raga Vendran ]
[ October 15, 2008: Message edited by: Raga Vendran ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic