
Hi,
--- Ursprüngliche Nachricht --- Von: Stefan Behnel <behnel_ml@gkec.informatik.tu-darmstadt.de> An: ML-Lxml-dev <lxml-dev@codespeak.net> Betreff: [lxml-dev] document('') fixed Datum: Fri, 21 Apr 2006 13:17:05 +0200
Hi,
I played with the XSLT document loaders and found that the default loader can apparently handle "document('')" on XSL documents read from strings as long as they have a non-empty URL. This only makes sense when you know that libxslt keeps a list of known documents during the transformation, so it apparently searches that list for the URL of the requested document.
I changed the code on the trunk to create a fake URL for the case that the document URL is empty. So, document('') should now work from any stylesheet (if anyone wants to verify...)
Does it still reparse the stylesheet document? If you managed to reuse the stylesheet-tree for this purpose then this will produce problems, since the stylesheet-compilation process of Libxslt will change the tree; i.e., e.g. it will eliminate xsl:text elements and preserve whitespace-only text-nodes if they are children of xsl:text. Regards, Kasimier