RE: [seweb-list] Re: Compiling with XSLT

Jon Hanna:
> I'm pretty sure you could fake it [symbol table in XSLT]. I'm pretty sure you'd drive yourself insane though.

Some of the systems I create use XSLT as part of code generation pipeline from a dynamics model to simulation code in C or Java, (or even experimentally flight code in ADA), in effect acting as a compiler for a domain specific declaritive language.

I've though about making something like a symbol table to cache the queries instead of using XPath such as //mdl:class/mdl:attribute[@type='LiftTable'] over the place, but as most the models are only a few hundred classes the performance of the queries doesn't case enough of a delay in the compilation process (a few tens of seconds to compile, then a few hours to run the simulations). A better caching mechanism in the queries would eliminate the difference between having a symbol table and not- it is only an optimisation, not a functional difference. The bigger pain was implementing transient sub class relationships.

John, I don't get what you mean by saying that XML is context free- do you mean just the base encoding syntax of '<' and '>' or the tree which all the tools operate on(which has more context available than most ASTs, as you can use .. in XPath to navigate to the parent node)?


Pete

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

Received on Friday, 18 June 2004 05:23:59 UTC