Generated: Monday, November 14, 2011, 09:25:19 | Copyright © 2006, Kurt Nørmark |
This example takes as a starting point a couple of XSLT programs found in the short paper What kind of language is XSLT? written by Michael Kay, Software AG.
Briefly stated, we develop an XML DTD for soccer results, and we generate the mirror in Scheme of this DTD. After this we have developed two diffent transformations of soccer results, exactly as shown in the paper referred above. Throughout we use the XML-in-LAML framework of LAML.
|
Notice that the two example documents (basic and elaborate) are identical, except for the loading of different Scheme transformation programs.
The XSLT example in the referred paper uses a declarative, functional approach based on pattern matching and replacement. XSLT is a special purpose (application oriented) language. The LAML solution uses a general purpose functional programming language (Scheme), the derived mirror functions (of the Soccer elements) and of XHTML, and a few AST access functions from the XML-in-LAML library. To avoid duplicated code, and in order to raise the level of abstraction, a number of small functions are defined as part of the transformation programs.
For a tutorial discussion of XML-in-LAML (and all the stuff illustrated above) please have a look at the appropriate part of the LAML tutorial.
If your browser will not present files with 'laml', 'scm', or 'dtd' extensions you should disable any special handling of these extensions on your system. In that way they are treated as pure text files.
Generated: November 14, 2011, 09:25:19