[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

Subject: Re: XSLT has raised bar for compiler writers (my ponderings ..)
From: "Liam R. E. Quin liam@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 8 Oct 2016 07:30:32 -0000
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)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.