OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XSLT: beyond a transformation tool for XML documents



>
> XSLT's Template Dispatch
>
>    by Clark C. Evans
>    December 1, 2000
>
>    XSLT is a language for transforming XML texts. The
>    language includes familiar constructs such as for-each
>    iteration, conditional statements, and callable
>    functions.

A good article.
Anyway it would be sounder to say
"XSLT is a language for transforming document trees"

instead of
"XSLT is a language for transforming XML texts"

Of course this observation is not relevant inside the context of this article, but
I think it is interesting to characterize XSLT in these terms (i.e,
as a language for transforming a particular sort of attributed ordered trees:
those conforming the XPath/XSLT data model, that can be properly
represented using DOM).

For instance, I've made a little experiment in transforming
context-free languages conforming a LALR(1) concrete syntax into
an XML representation of their abstract syntax. Transformation for
concrete to abstract syntax is specified as a XSLT sytlesheet modelling
a transformation from a DOM representation of the 'concrete syntax'
parse tree to a DOM representation of the abstract syntax. Using an
scanner and a parse generator it is straightforward to generate front-ends
for building DOM representations of parse trees for a given language
when they are provided with an appropiated syntactic description of this
language. Then it is possible to connect these front-ends with a XSLT
engine in order to generate the abstract syntax representations. Finally,
by attaching a 'printer' back-end it is possible to generate 'textual'
representations of the generated DOM trees (maybe XML, maybe ground
Prolog terms, maybe Lisp expressions...). Either front-ends and back-ends
rely on general conventions for representing parse trees in terms of DOM and
for mapping DOM representations into an object language (e.g. my back-ends
have nothing to do with 'formatting semantics'. They just carry out textual
serializations of the DOM tree using an appropriated convention for each object
language).

Best regards

Jose-Luis

--
Jose-Luis Sierra-Rodriguez
------------------------------------------------------------
Dpto. Sistemas Informaticos |Room:  465 (Fac. Matematicas)
y Programacion              |Phone: (+34)91-3944311
Facultad CC. Matematicas    |Fax:   (+34)91-3944602
Universidad Complutense |mailto:jlsierra@sip.ucm.es
de Madrid               |http://bogart.sip.ucm.es/~jlsierra
Avd. Complutense S/N    |
28040 - Madrid (Spain)  |
============================================================