ASIS 2 XML

This program converts a unit's ASIS representation into XML, so as to make it easier to develop transformational tools using (for example) XSLT.

Releases up to 20130413 are in the gnat-asis repository at tools/asis2xml and can be downloaded here. Further development has been migrated here.

It has only been tested against GNAT.

Not every ASIS feature is supported yet, and in particular

  • what you get corresponds to a straightforward navigation through the tree, there's no cross-linking.
  • there's no attempt to relate the structure to the source text.
  • Comments aren't preserved.

There is no explicit XML Schema as yet, though this will obviously be an important part of the work. The output's structure is quite close to that of ASIS, at least in overall terms; for example, an A_Defining_Name element in ASIS is represented as a <defining_name/> element in XML. This is hardly surprising since the default strategy, faced with an ASIS Element, is to translate it to an XML element with the indicated substitution!

Another program in the same space is Avatox from McKae Technologies.


Ada programming, © 2005,2006 the Authors, Content is available under GNU Free Documentation License.