W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

derived types and Casotr

From: Bowden Wise <wiseb@acm.org>
Date: Thu, 4 Jul 2002 00:51:55 -0400 (EDT)
Message-ID: <001501c22316$63af9820$843e1d18@nycap.rr.com>
To: <xmlschema-dev@w3.org>

I am developing a schema which may be used for different 
applications and purposes.  I want to be able to define one basic
schema but make it easy for it to be extended in different ways.

I have been reading some books on XML schema and other "Best 
Practice" notes about derived types, and substitution groups, etc but
am still not quite certain the best way to define the schema

The schema has one element


which can hold one a sequence of 0 or more elements.  Each
application may have a different set of allowable elements that 
may appear within the <results>

For example, one application may allow <results> containing
  <warning>, <note>, <caution>

another may allow a different set
  <tool>, <tasktime>, <consumale>

Also, <results> may appear more than once in an instance, but
each ocurrence of <results> will only contain a sequence of
one of the allowed types -- they would never be mixed.

The other requirement I have is that I want to be able to use Castor
to generate java code... when I tried using a base type with a substitution
group, Castor did not generate any classes for any of the derived types 

I would appreciate any suggestions, insights for how I migh define
this schema.

Received on Thursday, 11 July 2002 10:39:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC