Browse Prior Art Database

Generating Java Code from an XML schema with an XSL stylesheet

IP.com Disclosure Number: IPCOM000013848D
Original Publication Date: 2001-Jun-26
Included in the Prior Art Database: 2003-Jun-18

Publishing Venue

IBM

Abstract

Disclosed is a method for generating Java code from an XML database schema using an XSL stylesheet and a customized XSLT processor. Java inheritance is used to separate generated code from the custom added business code. Commercial code generators normally do not allow to modify the rules used to generate the code. This often leads to a significant overhead when the generated code has to be adapted to the current situation. This overhead is generated every time the code is regenerated, as the code generation rules cannot be modified. Also often the schema definition is stored in a proprietary format so that it cannot be used in another context. With the proposed method the schema definition is stored in an XML file and the code generation rules are defined in an XSL stylesheet. XSL stylesheets are normally used to transform data from one XML format to another XML format. Here we use the XSL to generate an XML file, that is later post-processed to separate Java source files.