XML to XSD issue with date

This should cover W3C XML Schema, Relax NG and DTD related problems.
yoshio
Posts: 2
Joined: Wed Feb 24, 2010 11:25 am

XML to XSD issue with date

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: XML to XSD issue with date

Post 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
George Cristian Bina
yoshio
Posts: 2
Joined: Wed Feb 24, 2010 11:25 am

Re: XML to XSD issue with date

Post by yoshio »

I will appreciate your help for the trang.jar. I don't have the JDK installed.

Thank you.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: XML to XSD issue with date

Post 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
George Cristian Bina
Post Reply