|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.
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
|
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
|

Cart








