View Single Post
Old 09-06-2015, 12:57 PM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by bmix View Post
I am not sure, which XSL version this covers. If it is being libxml, then this would allow for XSL v1 only. Personally I use Saxon, since that is XML v2 capable, which is much more powerful.
calibre already ships with python2-lxml -- python bindings for libxml2 and libxslt -- bundled into the binary distribution (and a linux source/distro install requires it as a dependency).
That would appear to be xslt 1.0 only.

In order to use Saxon -- or any other tool you have a specific attachment to that doesn't come with calibre -- you'd need to bundle it in the plugin, and most likely require the user installs a JVM separate from calibre, then fiddle with their environment variables on Windows.
I am not aware of any Saxon bindings for python, so it'd be subprocesses all the way.

You'll have to decide whether that is worth the additional benefits XSLT v2 brings.

Last edited by eschwartz; 09-06-2015 at 12:59 PM.
eschwartz is offline   Reply With Quote