Hi, I would like to ask for advice on how to do the following. First some words of introduction.
JaxMe 1 is a Java/XML binding framework. It takes an XML Schema as input and creates sources that allow to marshal and/or unmarshal the generated Java objects into XML documents and vice versa. It also has a persistence layer: The generator allows to read the schema of an SQL table and add the columns to the schema at a designated place. The generated sources allow to read data from the table into the generated Java objects and vice versa. A concept which is well known to Torque users. See http://jaxme.sf.net/ for details on JaxMe 1. I am currently working on JaxMe 2. The main difference is that it follows the JAXB specification (see http://java.sun.com/) and it supports a much larger subset of XML Schema. It doesn't yet have a persistence layer. I am currently considering how to do this. IMO an excellent approach would be to use Torque as a base. See http://cvs.sf.net/cgi-bin/viewcvs.cgi/*checkout*/jaxme/JaxMe2/docs/Design.html for details on JaxMe 2. However, I have never looked into the Torque sources. It could probably help me a lot if some experienced Torque developer would tell me a general guideline on how to do this: - Create an Ant task very similar to sql2xml. This Ant task would take an XML Schema as input. At some point of the schema it would find the words "insert the columns of table foo here", which is exactly what the task would do. The main difference to sql2xml would be that no schema would be emitted, but JaxMe's internal representation of an XML Schema. - Create an Ant task very similar to "sql" that takes the above internal representation as input and generates similar sources. The main difference would be, that the target objects would be "JaxMe objects". JaxMe objects are, in general, Java Beans. However, they might have additional child elements or attributes, which are not covered by the columns. They also might have mixed content or whatever appropriate for XML. Regards, Jochen -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
