derived types and Casotr

Hi

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

<results>
</results>

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.

Thanks
Bowden
wiseb@acm.org

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