[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The philosophical implications of an XSLT processo

Subject: Re: The philosophical implications of an XSLT processor implemented in XSLT
From: "John Lumley john@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 May 2020 15:57:09 -0000
Re:  The philosophical implications of an XSLT processo
On 22/05/2020 16:26, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote:
Actually, it is the latest developments in XPath 3 (maps) that made it possible to produce an XSLT processor written in XSLT, which is claimed to have a practically feasible performance.
I agree - maps make it feasable - you can do it without of course (my XSLT3 to 2 converter simulated maps with a pair of tunnelled key/value stack frames), but it is slow by probably a couple of orders of magnitude. And surprisingly we're finding accumulators an interesting tool for some of the work.

And, if I read well Dr. Kay's message, it is exactly the XPath parsing that **is not** implemented in XSLT, instead it is implemented in Javascript.

Yes indeed - the XPath parsing and compiling is performed in JavaScript, but this is principally for performance. I can assure you it is much much simpler to write the XPath code generator in XSLT


The earliest manifestations of this work derive from analysis of XSLT streamability in 2014 performed /entirely/ in XSLT (see https://www.balisage.net/Proceedings/vol13/html/Lumley01/BalisageVol13-Lumley01.html), which used an XPath parser generated by ReX into an XSLT executable.

The first work on adding XPath evaluation (i.e.support for xsl:evaluate) used this same XSLT-coded parser, and an XSLT-coded code generator, which attached to Saxon-JS in its beta phase. It worked effectively, enough to pass a good series of tests, but was unsurprisingly very slow,B certainly >O(10x) slower.

For the 1.0 release of Saxon-JS, which supported xsl:evaluate, the XPath parser was switched to JavaScript (again generated by ReX) and the code generator also recoded in JS. This was reported at XMLPrague in 2017: https://archive.xmlprague.cz/2017/files/xmlprague-2017-proceedings.pdf page 1.

(Well -- the history is something like that)

--
*John Lumley* MA PhD CEng FIEE
john@xxxxxxxxxxxx <mailto:john@xxxxxxxxxxxx>
on behalf of Saxonica Ltd

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.