Code Generation With XSL
Generated Java Bean
To view the complete generated program, click here.
Think of how much time it would take to hand code this class versus the time spent to author the meta data file. And the generated code will compile and run properly the first time.
We developed a JavaBean generator to demonstrate the concept. XSL techniques such as modes and called routines were used to modularize the code. The code generation technique demonstrated here could also be used to generate EJB classes, JDBC code, or classes running on a framework like Struts. But the rest is up to you.
To download the example XML stream and stylesheet, click here.
About the Author
|Jeff Ryan is an architect for Hartford Financial Services. He has eighteen years of experience designing and developing automated solutions to business problems. His current focus is on Java, XML, and Web Services technology. He may be reached at firstname.lastname@example.org.|
|Other Articles Written by Jeff Ryan|
Page 3 of 3