Page 1 of 1

XML to XSD issue with date

Posted: Wed Feb 24, 2010 11:31 am
by yoshio
Hello,

We're trying to convert automatically with the tool an XML file to an XSD, but our date are converted into xs:string or xs:NMTOKEN.

We tried different format of date but it was a waste of time.


Could you explain how to format correctly the date in order to convert it correctly (or something else) ?


Thanks.

Re: XML to XSD issue with date

Posted: Thu Feb 25, 2010 6:08 pm
by george
This is an interesting topic.
The schema conversion/inference feature from oXygen is based on Trang. I looked into this and it turns out to be an issue in Trang as xs:NMTOKEN is checked before xs:date. I logged the issue on here
http://code.google.com/p/jing-trang/iss ... ail?id=104
and I already committed a fix for that. To get that in oXygen you need to follow the steps to build jing-trang (that is really easy, you just need to check out the project and run the ant command in the project folder) and replace the trang.jar from the oXygen lib folder with the one that you build. If you have difficulties with the build let me know and I will upload the updated trang.jar library.

Best Regards,
George

Re: XML to XSD issue with date

Posted: Thu Feb 25, 2010 10:21 pm
by yoshio
I will appreciate your help for the trang.jar. I don't have the JDK installed.

Thank you.

Re: XML to XSD issue with date

Posted: Fri Feb 26, 2010 11:33 am
by george
You can get the current Trang build from
http://www.oxygenxml.com/update/trang.jar
Please note that the above URL is not persistent, the library may be deleted from that location in a few days.

Best Regards,
George