BeanSource an xml InputSource that allows pojos to be presented as input sources to xml tools like transformers has released version 0.30. This version fixes generation of enums, collections and maps.
Here's how the Beansource works.
It uses the standard transformer templated code, except
we use the BeanSource as the input xml source.
---------------------------------------------------------
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(myStyleSheetSource);
t.transform(new BeanSource(myJavaBean), myResult);
---------------------------------------------------------... read more
If you walk into your corner drugstore you will see an endless supply of hair growth products. What does that say? None of them are all that good at growing hair. The same can probably be said about the options for generating dynamic html. We all know the nastiness that is jsp, and while things like struts, and tag libraries try to abait the problems, we often end up with lousy coded jsps. Marker libraries try to fix the problem by removing the customization code to outside the document, but again we end up with specialized coding. XML Transformations is promising in that we can specify what needs to be done in xml stylesheets, problem is of course that the data must be presented in xml format, something that till this point has been unpleasant. This library tries to eliminate, or reduce, this unpleasantness by allowing simple java beans to be used as the source for xml transformations, which allows developers to define dynamic content by apply transformations directly from the data model. Will this solution cause all other approaches to dissappear? Well, will see if the hair stops clogging up the drain, before we answer.