THRIFT-3523 : XML Generator #774
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've put together an XML model for Thrift IDL that is very similar in concept and structure to the model created by the JSON generator of the Thrift compiler. The code is based on the JSON generator, and inherits the 'merge' option from that module for including the model of all includes in a single file if desired.
This generator is useful if you wish to extend the Thrift compiler with some XML based templating engine such as XSLT. For example I have prototyped transforms that can create valid XML schema and WSDL files from Thrift IDL, as well as transform SOAP requests and responses to and from Thrift messages. Those transforms are not included because they may be outside the scope of Thrift, but I can provide them if interested. Regardless, I feel the XML model is generally useful and might be a good addition to the Thrift compiler.
Also included is an XML schema for the model file format and tests that generate XML from existing IDL in the Thrift test suite to validate against that schema. These tests are Ant based and so only run when --with-java is enabled in ./configure