Thanks for the comment. Trying out the sample, something did not work. Error below. However, I did get the sql ddl schema, so the main purpose worked. I have already started to look into the example and am experimenting with my application. Thanks.
In any case, looking into some xmlbeans api, (org.apache.xmlbeans.SchemaTypeSystem) there is a tree-walk example. However, I am not sure how to get the type system of my compiled schema. Is the following the correct method? SchemaTypeSystem sts = MyRootDocument.Factory.newInstance().schemaType().getTypeSystem(); (Seemed cumbersome to have to create an instance first.) Regarding the use of getChildName() or xgetChildName(). Well, the former returns a java.lang.String object and the latter returns what I need, i.e. an XmlAnySimpleType which can be used for validation. However, I'll first study the Velocity example a bit more, and come back with further question. --------------- $ ant -f run.xml -Dtemplate=datamodel.vm -Doutput=database.xml -Dschema=schemas/easypo.xs Buildfile: run.xml init: [echo] xmlbeans.home: ../../../share/xmlbeans-2.1.0 [echo] xmlbeans.lib: ../../../share/xmlbeans-2.1.0/lib runjava: [java] 2006-01-06 07:21:48,877 INFO org.apache.xmlbeans.samples.vxsdb.VelocityXmlBea ? [java] Using the Velocity template, datamodel.vm [java] 2006-01-06 07:21:48,924 INFO org.apache.xmlbeans.samples.vxsdb.VelocityXmlBea ? [java] Using the xml schema, schemas/easypo.xsd [java] 2006-01-06 07:21:49,877 INFO org.apache.xmlbeans.samples.vxsdb.VelocityXmlBea ? [java] Using the output file, database.xml create-db-sql: [ddl] 06.jan.2006 07:21:50 org.apache.commons.digester.Digester startElement [ddl] SEVERE: Begin event threw exception [ddl] org.xml.sax.SAXException: Name attribute is required. [ddl] at org.apache.commons.betwixt.digester.ElementRule.begin(ElementRule.java [ddl] at org.apache.commons.digester.Rule.begin(Rule.java:200) [ddl] at org.apache.commons.digester.Digester.startElement(Digester.java:1273) [ddl] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sourc [ddl] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement own Source) [ddl] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentD cher.dispatch(Unknown Source) [ddl] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unk Source) [ddl] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [ddl] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) [ddl] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) [ddl] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) [ddl] at org.apache.commons.digester.Digester.parse(Digester.java:1605) [ddl] at org.apache.commons.betwixt.XMLIntrospector.findByXMLDescriptor(XMLIntr tor.java:756) [ddl] at org.apache.commons.betwixt.XMLIntrospector.introspect(XMLIntrospector. 291) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.getElementDes or(BeanRuleSet.java:401) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRule RuleSet.java:260) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(Bean t.java:468) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(Bean t.java:448) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addChildRule RuleSet.java:355) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.addRule(Bean t.java:468) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet$ReadingContext.<init>(BeanR .java:224) [ddl] at org.apache.commons.betwixt.io.BeanRuleSet.addRuleInstances(BeanRuleSe :197) [ddl] at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1663) [ddl] at org.apache.commons.betwixt.io.BeanReader.addBeanCreateRule(BeanReader 339) [ddl] at org.apache.commons.betwixt.io.BeanReader.registerBeanClass(BeanReader 127) [ddl] at org.apache.commons.sql.io.DatabaseReader.<init>(DatabaseReader.java:8 [ddl] at org.apache.commons.sql.task.DDLTask.loadDatabase(DDLTask.java:243) [ddl] at org.apache.commons.sql.task.DDLTask.execute(DDLTask.java:192) [ddl] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [ddl] at org.apache.tools.ant.Task.perform(Task.java:364) [ddl] at org.apache.tools.ant.Target.execute(Target.java:341) [ddl] at org.apache.tools.ant.Target.performTasks(Target.java:369) [ddl] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [ddl] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [ddl] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe java:40) [ddl] at org.apache.tools.ant.Project.executeTargets(Project.java:1068) [ddl] at org.apache.tools.ant.Main.runBuild(Main.java:668) [ddl] at org.apache.tools.ant.Main.startAnt(Main.java:187) [ddl] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [ddl] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) [ddl] 06.jan.2006 07:21:50 org.apache.commons.betwixt.XMLIntrospector findByXMLDes r Thanks for help. -- Jon -----Original Message----- From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 11:39 PM To: user@xmlbeans.apache.org Subject: RE: Html forms -> xmlBeans -> xml document A couple of comments: - why do you say that you have to use xget/xset some times and set/get other times? It seems to me you should be able to standardize on one approach, the one that suits you best - we have an example of using Velocity + XmlBeans in the samples section on the website (http://xmlbeans.apache.org/samples/index.html), not sure if you saw that or if it is relevant to you Radu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]