python - How to improve eXSLT performance problems when using functions -
tl;dr: it seems running exslt waay slower counterpart in xslt2. (7 minutes vs 18 hours) below explain problem, writing down both implementations of same transform, in exslt , xslt2. of course, engines different, xslt2 use saxonhe, , exslt use python lxml. and ask improve speed in exslt part, prefer use python java. i have convert large (~200k tier 1 elements) xml csv. i've got 2 implementations: one uses python, libxml underneath, , use exsl. another uses saxonhe, use xsl2 tranformation it. since when writing csv, have print separators if there no value element, ive taken approach: i've created 2 functions: myf:printelement receives element , number represents number of separators must written if element empty. myf:printattr receives attribute, , prints plus separator. if defined separator as: <xsl:param name="delim" select="','"/> the functions declared in each file follows: xslt2 <!-- shortcut f...