Re: [xslt] libxslt effects on _private member of libxml structures


On Tue, 25 Mar 2003, Daniel Veillard wrote:
> >  From a quick look at the archives, I got the impression that libxslt 
> > will, in some cases, change the "_private" member of the libxml 
> > structures.  I'm wondering what cases it will do this in.

interesting. This means that Gdome2 users may run into serious troubles as
Gdome2 uses _private to store pointers to its own wrappers. (We also have
a Gdome2-aware binding of libxslt).

>   For the stylesheet compilation, the document is modified and 
> _private is used to attach the compiled operations to the nodes
> in the stylesheet tree.

This may be OK as we assume the stylesheet becomes "opaque" after it is
compiled, even though a malicious user could in principle remember the
original DOM document...

>   For the input documents, _private is used only when key() are
> defined to attach the keys to the nodes.

So this is a problem (for Gdome2).

> to the node, and no other place to attach it than the _private 
> location.

an hash-table maybe?

The question is: is _private supposed to "private"? If so, it should
probably be hidden in the API and the user should uniformly use hash
tables to associate extra data to libxml2 nodes. If _private is supposed
to be used by the users, then libxml2 should not make any use of it.


-- luca

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