Friday, November 13, 2009

A new COBOL structure to XML schema translator

I have posted an initial release of a new project called legstar-cob2xsd that basically does COBOL structure to XML Schema translation.
There were several factors that led to this project:
  • The legstar-schemagen module in LegStar that does the job today was written in C and the parsing logic was hand coded. I think this might have driven away some users. legstar-cob2xsd is pure java and uses ANTLR grammars for COBOL structure parsing.
  • There is a clear need for an autonomous open source COBOL to XML Schema utility. So it makes sense to isolate that feature in its own project. People who need just that functionality won't have to figure out how to extract it from the other LegStar modules.
  • legstar-schemagen was systematically adding LegStar JAXB style annotations to the XML Schema produced. While this is still needed if you want to use LegStar for runtime transformations, this is not the default option anymore. This means people can use the resulting XML Schema totally outside LegStar if they want.
  • The clear separation of the COBOL parsing logic from the XML Schema generation means it is much easier now to create other targets. For instance JSON schemas.
  • Finally the fact that legstar-cob2xsd is in java allows JUnit tests to be much more comprehensive (and they are!).

No comments:

Post a Comment