users@jaxb.java.net

Re: Still no Substitution group support?

From: Brandon Franklin <brandon_at_thoughtriver.com>
Date: Fri, 06 Jun 2003 10:35:44 +0930

Can't you just do it like this:

 <complexType name="Dog">
  <complexContent>
   <extension base="myNamespace:Animal" />
  </complexContent>
 </complexType>

? Maybe I'm missing your point...but if you want some examples of using a
base type in a schema, and extending that into another type in a different
schema so that the two share a common interface, there are LOTS of examples
in our open source CVS folder for the Singularity System:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/singularity-sys/singularity/s
chemas/

Our system is built on JAXB so we know these work with it.

-Brandon
 Thought River South


----- Original Message -----
From: "Gary Gregory" <ggregory_at_seagullsw.com>
To: <JAXB-INTEREST_at_JAVA.SUN.COM>
Sent: Friday, June 06, 2003 9:24 AM
Subject: Re: Still no Substitution group support?


> IOW, how do I do this:
>
> Snoopy.xml:
> <dog name="Snoopy"><!-- dog elements --></dog>
>
> Felix.xml:
> <cat name="Felix"><!-- cat elements --></cat>
>
> And get
>
> interface Dog extends Animal
> interface Cat extends Animal
> Animal implements get/setName()
>
> ?
>
> Thanks,
> Gary
>
>
> -----Original Message-----
> From: Gary Gregory
> Sent: Thursday, June 05, 2003 16:13
> To: 'Discussion list for the Java Architecture for XML Binding'
> Subject: Still no Substitution group support?
>
> Hello,
>
> >From the 1.0 spec:
>
> "Substitution group
> Any XML Schema concepts indicating that substitution group support is
> a necessary component of the schema should be reported as an error."
>
> When will Substitution group be supported?
>
> Is my only alternative is to use a vendor extension to specify a common
> supertype?
>
> Thanks,
> Gary
>