Hello Sean, I'm CC'ing this message to the user group, as I think it may be of interest to a larger audience. So far, I hadn't validated jOOQ's code generation / runtime configuration against the XSD specification that I have published. You're probably right, elementFormDefault="qualified" should be specified as such. I have registered #2008 for this: https://github.com/jOOQ/jOOQ/issues/2008
Cheers Lukas 2012/12/13 Sean Qiu <[email protected]>: > Hello Lukas, > > I've been using JOOQ with one of our projects. Everything has been working > great and I like it a lot. > There is one issue I did ran into to lately which is about loading schema > mapping configuration from the xml file into a Settings object. > > When I follow the xml example you have in the manual and validate against > "http://www.jooq.org/xsd/jooq-runtime-2.5.0.xsd", it fails. > > Here the xml contents I got: > > <settings xmlns="http://www.jooq.org/xsd/jooq-runtime-2.5.0.xsd"> > <renderMapping> > <schemata> > <schema> > <input>dev</input> > <output>my_schema</output> > <tables> > <table> > <input>table</input> > <output>my_table</output> > </table> > </tables> > </schema> > </schemata> > </renderMapping> > </settings> > > The error message is:Error - Line 2, 17: org.xml.sax.SAXParseException; > lineNumber: 2; columnNumber: 17; cvc-complex-type.2.4.a: Invalid content was > found starting with element 'renderMapping'. One of '{renderSchema, > renderMapping, renderNameStyle, renderKeywordStyle, renderFormatted, > statementType, executeLogging, executeListeners, > executeWithOptimisticLocking, attachRecords}' is expected. > > If I add elementFormDefault="qualified" in the xsd file you provide, the > validation will succeed. > > I got the same error either when doing the validation on > http://www.utilities-online.info/xsdvalidation/#.UMlnoKWVtAS > or when I am unmarshaling the settings in Java and with JAXB debug mode > turned on. > > So my question is has anyone else ran into the same issue as I did, and if > it is possible to add the elementFormDefault="qualified" option into the xsd > file. > > Thanks, > Sean > >
