No, it's not acrude approach at all. I always thought that the code (source) generator already supports uotputting arbitrary information as part of the <xsd:documentation> elements. And I cannot see a valid reason why this should not work.

Have you tried it ?

Werner

PS Until now I didn't know there's actually a project out there that deals with adding arbitrary annotations to Castor ... seesm like I have to have a look at it.

James Cowan wrote:

Hi Werner

how does the castor source generator (plan to) deal with annotations?

There is this project https://castor-annotations.dev.java.net/ which appears
to tackle the problem (rather obscurely).

For example if I was adding hibernate persistence annotations, one would
need the source generator to output  "import javax.persistence.Entity;" at
the top of a generated class (perhaps in the xsd annotation for the xml
schema) and within the xsd annotation for an element to be able specify the
hibernate annotation "@Entity" which would be generated before the class
declaration..

I was wondering whether there was an mileage in the idea of putting java
annotations inside xsd annotation/documentation elements and for the source
generate to write out what is in the annotations verbatim.

I guess this is rather a crude suggestion...

James


---------------------------------------------------------------------
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