Subject:[ convert dtd to xsd ] Author:TheMoon ... Date:19 Dec 2005 10:52 PM
Hi all,
I'd like to convert my dtd to xsd to use as a source file for JaxMe to generate jave code and then to RDBMS. I use dtd from Rosettanet (I don't know you know or not, it's the methodology for b2b business). I have trial version of stylus and convert dtd to xsd already but when I run jaxme to generate the code, it's fail:
-------------------------------------------------------------------------------------
java.lang.IllegalArgumentException, NCName xml:lang is invalid, because it contains a namespace prefix
at .....
-------------------------------------------------------------------------------------
Actually I don't understand with this error much, I'm new for java. Anyway any one knows the way or even concept to gen code please help.
Subject:[ convert dtd to xsd ] Author:prashant jain Date:13 Jan 2006 12:33 AM
hello,
Are you using WSAD as IDE. if yes then its very easy, just take that dtd and right click, press "Generate" and then click"XML Schema", ,xsd file will get generated.
Otherwise you are having problems with the namespace, you can put the builderFactory.nameSapceAware(false),
it will do thw ork for you.
Thanks
Subject:[ convert dtd to xsd ] Author:Tony Lavinio Date:13 Jan 2006 09:13 AM
1. Inside of Stylus Studio there is an option to generate
Java code from an XSD. You could try that.
2. The problem with jaxme appears to be (without having the
source files to look at) that xml:lang, which is an element
that holds the language code (e.g. "en" for English) isn't
being handled properly by them. QUite possibly, you can just
remove any instances of xml:lang from the XSD and still
generate the code properly. For that matter, according to http://ws.apache.org/jaxme/ you should be able to generate
the code straight from the DTD.
3. If you are updating a database, instead of doing things
the DTD -> XSD -> Java -> SQL way, you might consider using
the SQL/XML option, and doing it all in one step. See http://www.stylusstudio.com/docs/v2006/d_rdb35.html for how
to update data in a database direct from SQL/XML. And this
same idea can be embedded in Java code, as the surrounding
documentation shows.