|
From: Geert J. <Gee...@Da...> - 2001-01-05 10:37:50
|
> # Yes, a resulting node-set is incompatible... I was only thinking that far > # most xpath-expressions are used to select a value with xsl:value-of. That > # function always returns one of the simplest variable types, string or > # number... In those cases the result of XPath is just the value. > > yes, but you have to parse the file twice - once for DOM and once for > XPath - perhaps we can forget DOM and use XPath DOMish API only... > > Pavel The latter idea is a nice consideration, but requires that the full length of XSLT.pm has to be rewritten. It will definitely mean a gain in speed, without doubt, unless the stripped down version of the DOM-tree that the XPath-module uses has too little support to manipulate trees for transformation purposes; that is not what XPath was meant for... About the first: yes, the xml has to be parsed twice, but reading in the XML is not the bottleneck! :) The real bottleneck is the 'speed' of DOM-function. The other bottleneck is memory-usage, but that can only be solved by incorporating memory-swapping techniques. And doing that in Perl?? Hmmm.... :P Geert |