Re: [xslt] Release of libxslt-1.1.3



>   Adding node in the input document is not really sane. You could use
> the document() and exslt:node-set() to apply templates to data not
> in the main input. That sounds quite saner.

Of course. I quite realize that what I am doing is a bit insane.
Basically, I am applying a first layer of transformations to my source 
XML format (some aspects of which I do not like so much) before I write 
the XSL of the transformation proper. I should really make my rewritten 
nodes into a separate document, as you suggest; however, doing that 
means I cannot access the original document's nodes anymore in the 
templates that work on the sub-node. I guess I could pass the parent 
around as a parameter...  I may look at that option. But it is so much 
more convenient to do surgery on the DOM on-the-fly, and then to 
actually use the ancestor nodes from my transformed data!
But yes, it is certainly reckless.

Anyway, thanks again for checking carefully against the consequences of 
this sort of maneuver...

Marc-Antoine




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]