It would just be useful for the classes generated to reflect the XML
instance data as much as possible so any XML schema constructs such as
groups, choices and sequences should not be present in the object model
itself as classes. It's partly because xpath expressions have to be
translated to the Castor-generated object model and in an xpath
expression that deals with the data you wouldn't see groups, choices,
sequences, etc.

Cheers
Alex

-----Original Message-----
From: Werner Guttmann [mailto:[email protected]] 
Sent: Wednesday, October 19, 2011 12:40 AM
To: [email protected]
Cc: Alex Milanovic
Subject: Re: [castor-user] How to avoid generating Java classes for
element groups?

Hi Alex,



On 18.10.2011 21:07, Alex Milanovic wrote:
> Hi,
>
> SourceGenerator in Castor 1.3.2 (with the 'element' method) produces 
> Java classes for element groups. In XML documents, though, element 
> groups have no representation. They're only used for modeling in XML 
> schemas. Is there a way to turn off the generation of Java classes for

> element groups?
No, not to my knowledge. Having said that, though, does it really make a
difference, when the XML produced/parsed matches the XML schema given ? 
Or do you need the classes generated for other things as well ?

Regards
Werner Guttmann
>
> Attribute groups don't have this problem in SourceGenerator as no 
> special Java classes are generated for them.
>
> Thanks
> Alex
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to