Xml Interpretation

XT -- A Bundle of Program Transformation Tools
Conversion to ATerms with knowledge of a schema for the XML document is called interpretation of XML against a schema. This kind of conversion is work in pogress, xml-tools already comes with xml-interpret, a proof of concept of XML interpretation.

XML interpretation gives the XML instance document much more structure:

  • introduction of lists and tuples
  • Optional content is represented with None or Some(_)
  • introduction of integers

XML interpretation is based on regular tree grammars. A schema in a specific schema language like a Document Type Definition, Stratego signature? or SDF syntax definition (with annotated constructur names), is transformed into a regular tree grammar (rtg). The concrete syntax? and abstract syntax? of the rtg language is defined in the package stratego-regular.

Relation to XML data binding?

XML interpretation is related to XML data binding?, where XML documents are mapped to data structures that provide a more natural reperesentation of the document in a certain programming language. In a certain way the more structured representation of the XML document in an Stratego.ATerm is the natural representation of the document in Stratego.

XML interpretation is however different from XML data binding? because the Stratego.ATerm format is just like XML and exchange format for structured data. XML data binding provides a natural mapping into data structures of a programming languages, XML interpretation is not specific to a certain programming language: it provides a natural mapping from XML to the Stratego.ATerm exchange format.


Tools.XmlInterpretation moved from Stratego.XmlInterpretation on 27 Jun 2004 - 20:00 by MartinBravenboer - put it back