[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT has raised bar for compiler writers (my pond
On Fri, 2016-10-07 at 04:32 +0000, Mukul Gandhi gandhi.mukul@xxxxxxxxx wrote: > [...] > XSLT is a functional language which makes the > process > of writing its compiler different than procedural languages. XSLT > also has > procedural elements, like loops Strictly speaking XSLT does not have loops. It does have for-each, which establishes a mapping between a set (or list) of input items and a set of corresponding result items. > [...] > Given this characteristic of XSLT language, I'm amazed that the > compiler of XSLT language can be made for the full XSLT language, Functional languages have been around for a long time. There was a declarative subset of LISP, and by the mid 70s there was also John Backus' FP language [1] which was functional. Lazy evaluation and partial evaluation for declarative languages (whether based on functional calculus and combinators or not) were in use in the late 70s and early 80s. There's quite a large research literature in this area. However, most of the XSLT 2 and XQuery implementations I know of seem to be interpreted, or to compile down to byte code (rather like, say, UCSD Pascal in 1980 or so). One reason for this can be if the implementation supports an eval-like construct, requiring a full interpreter to be available at runtime. Implementing XSLT 2 (or 3) is a significant amount of work. I'd love to see an open source / libre implementation in C that could be called from PHP, Python, etc., but I think the nearest we're likely to get to that is Saxon-C from Saxonica. However, I agree for sure that writing even a partial XSLT compiler may make an interesting exercise. Liam -- Liam R. E. Quin <liam@xxxxxx> The World Wide Web Consortium (W3C)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|