Well, this theoretic discussion won't get us anywhere as I don't clearly
see what you are trying to achieve. Could you provide an example?
Since you are obviously annotating Java classes: what will you be
needing the generated schema for?
I don't see the problem with @XmlElements/_at_XmlElement: The
element's namespace is/can be inherited.
In your first email you refer to @XmlElementDecl being connected
to substitution groups - I think you meant @XmlElementRef?
-W
On Wed, Mar 25, 2009 at 12:48 PM, Tuomas Kiviaho <tuomas.kiviaho_at_iki.fi>wrote:
>
> Substitution grouping is the only inheritance option what I see to fit for
> element substitution that doesn't require explicit declaration of
> subsitees.
>
> The other ways I know how to declare element substitution are:
> - @XmlElements (@XmlElement namespace must be different of the enclosing
> class)
> - @XmlElementRef without parametric type
>
> I believe that both approaches require each substitution possibility to be
> declared and XmlElement becomes a bit verbose when namespace has to be set
> even when it really doesn't differ from encosing class. Too bad these two
> can be mixed.
>
> XmlElementRef with parametric type visits all derivations thus it doesn't
> require annotations for all of the possibilities
> <
> http://www.nabble.com/schemagen-and-using-%40XmlElementRef-on-a-non-collection-property-td11532413.html
> >.
> I find this approach to be uncontrollable and schema vice verbose. Hence I
> try to avoid it .
>
> I'd be happy to hear from other element substitution possibilities that
> JAXB
> offers.
>
> --
> Tuomas
>
>
>
> Wolfgang Laun-2 wrote:
> >
> > Why do you want to see substitution groups in the generated schema?
> > There are other ways an XML schema can express inheritance.
> >
> > -W
> >
> >
> > On Wed, Mar 25, 2009 at 11:32 AM, Tuomas Kiviaho
> > <tuomas.kiviaho_at_iki.fi>wrote:
> >
> >>
> >> Has somebody managed to generate substitution groups using schemagen?
> >>
> >> XmlElementDecl is the only space where I can find any annotation
> >> attributes
> >> over substitution groups, but I've not managed to generate anything out
> >> from
> >> them. XmlRootElement doesn't seem to have these attributes for some
> >> reason.
> >>
> >> --
> >> Tuomas
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Generating-substitution-groups-in-schema-tp22698884p22698884.html
> >> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> >> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Generating-substitution-groups-in-schema-tp22698884p22700014.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>