Help with Derived Types

Hi

I am developing a schema for a tree-type structure:
   LF -> LFHeader, LFContext, LFNode

The idea being that different applications will derive their own types
for the header, context, and nodes.  

e.g, one application would define:

  LF from MYLF
  MyHeader from LFHeader
  MyContext from LFContext
  MyNode from LFNode

What would be the best way to define a base schema and
derived schemas? I welcome any suggestions...

I thought I could use substitutionGroups and the extension mechanism
but whenver I try and parse an instance of a derived class, I get
errors.

The first thing I tried was to replace the LFHeader with SequenceHeader
otherwise the schema is the same, but I get this error:

org.xml.sax.SAXException: unable to find FieldDescriptor for 'SequenceHeader' in ClassDescriptor of
LF
	at org.exolab.castor.xml.UnmarshalHandler.startElement(Unknown Source)

I have attached a txt file that has all the various schema definitions.  I don't
understand why I am unable to substitute the SequenceHeader element for
the LFHeader element?
 <<ALL.txt>> 
> Bowden
> g GE Global Research Center 
> ___________________________________________________________________________________________________
> ________________
G. Bowden Wise
mailto:wisegb@research.ge.com
Information and Decision Technologies
GE Global Research Center
Building K1, Room 5B2C
PO Box 8                            | One Research Circle
Schenectady, NY 12301       | Niskayuna NY 12309
Phone: 518-387-7833           | Fax: 518-387-6104




begin 600 ALL.txt
M3$9#;VYT97AT5'EP92YX<V0Z#0H\/WAM;"!V97)S:6]N(#T@(C$N,"(@96YC
M;V1I;F<@/2`B551&+3@B/SX-"CPA+2U'96YE<F%T960@8GD@6$U,($%U=&AO
M<FET>2X@0V]N9F]R;7,@=&\@=S-C(&AT='`Z+R]W=W<N=S,N;W)G+S(P,#$O
M6$U,4V-H96UA+2T^#0H\>'-D.G-C:&5M82!X;6QN<SIX<V0@/2`B:'1T<#HO
M+W=W=RYW,RYO<F<O,C`P,2]834Q38VAE;6$B/@T*#0H)/'AS9#IC;VUP;&5X
M5'EP92!N86UE(#T@(DQ&0V]N=&5X=%1Y<&4B(&%B<W1R86-T(#T@(G1R=64B
M+SX-"@T*/"]X<V0Z<V-H96UA/@T*#0I,1DAE861E<E1Y<&4N>'-D.@T*/#]X
M;6P@=F5R<VEO;B`]("(Q+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