Re: [xslt] document re-use between contexts



"William M. Brack" <wbrack mmm com hk> writes:
>
> I have an even better idea here - why don't you use the existing
> flag that already does exactly what you want :-)?
>

Well that's no fun :-)

> The xsltDocument structure contains a (flag) field named "main",
> which I guess was chosen to show that it is the "main" document
> being processed by the stylesheet.  The *only* use for this flag is
> to indicate that, when the transform context is being freed, this
> document should not be freed.  So, after your call to xsltDocument,
> set doc->main = 1, and you should get the behaviour you desire.

You're right -- I saw the 'main' flag but I didn't investigate it
further.  I just thought it indicated something more important for
later on, but it didn't click that since we're in the process of
deleting everything around it, how important could it be? :)

> I'll enhance the documentation on this (as you may know, the "docs"
> are really just extractions from the source code) to assure that, in
> the future, it will be more apparent.

That'd be great, thank you.

> If you feel that this feedback was useful to you, one excellent way
> to indicate your appreciation would be to take a look at one of the
> outstanding Bugzilla entries in either libxml2 or libxslt and
> propose a patch to fix it :-)

Sounds like a fair deal.

Thanks again, I appreciate it.

jason


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