RE: [xslt] small patch for xsltFreeStylePreComps()



Hi, 

> -----Original Message-----
> From: xslt-bounces gnome org [mailto:xslt-bounces gnome org] 
> On Behalf Of Aleksey Sanin> 

> > I just committed the changes; hope it works for you.
> 
> I might be missing something ... but it seems that the cleanup is
> called from xsltFreeStylesheet() function. Unfortunately, at the
> end of xsltFreeStylesheet() the "style->doc" is destroyed. Thus,
> I still can not reuse it :(
> 
> Would it be possible to create yet another function that combines
> xsltCleanupStylesheetTree() and xsltRestoreDocumentNamespaces()
> calls from the top of xsltFreeStylesheet() ?

Ah, I now hope to understand what you were actually doing. Is the
following correct?
1) you detached the style->doc from the stylesheet
2) you called xsltFreeStylePreComps() (with the psvi cleanup)
   explicitely
3) you set style->preComps to NULL
3) at last you freed the stylehssheet

I have no problem with the addition of a function like
xsltDetachStylesheetDocument(), in order to detach the doc from
the stylesheet struct and do all the cleanup.
I just fear, that, if we provide such a public function, Daniel
will have to answer even more questions about why the
stylesheet-tree has changed, as such a function may be
misunderstood as an indication that reuse of the stylesheet-doc
is intended by design.

So I can only defer back to Daniel :-)

Regards,

Kasimier


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