Leszek Gawron wrote:
Andre Juffer wrote:

Leszek Gawron wrote:

Andre Juffer wrote:

Leszek Gawron wrote:


There is no way for the generator to know how xml can be generated out of your domain object. There is no possibility to do that without "helping" the framework. I do not know what is expected from source to be xmlizable. I would have to look into the sources. Or even better do it yourself - you'll get a better knowledge of how cocoon works.




Yes, I thought already that it would go in that direction. I was hoping that reflection was used to get information about a class (e.g. as in Castor).



you can of course use castor generator but I do not know if castor is able to generate anything if it has no mapping file.

I meant transformer



Actually, it can, it will use reflection, at least the documentation tells so:

"Castor can marshal "almost" any arbitrary Object to and from XML. When descriptors are not available for a specfic Class, the marshalling framework uses reflection to gain information about the object."

see http://castor.codehaus.org/xml-framework.html

It does require that the object implements the java.io.Serializable interface, though, implying that one has to change the relevant DomainObject class (or extend them to create cocoon/castor specific classes).

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/CastorTransformer.html

Yes, this is the Transformer as provided by cocoon, which requires field descriptors. However, the 'original' Castor can handle this all also without descriptors using reflection. It is trivial of course to include a separate descriptor file, so it seems that the CastorTransformer could be a good choice. Thanks for the tip (I apprently overlooked this Transformer)







--
Andre H. Juffer              | Phone: +358-8-553 1161
The Biocenter and            | Fax: +358-8-553-1141
    the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to