[xml] namespace nodes and language wrappers to libxml2
- From: Stefan Seefeld <seefeld sympatico ca>
- To: xml gnome org
- Subject: [xml] namespace nodes and language wrappers to libxml2
- Date: Sat, 26 Apr 2003 15:50:07 -0400
I'v just run into a problem I remember having discussed a little
with Daniel some months ago. I construct a nodeset from an xpath
lookup, where the individual nodes are namespace nodes.
I'm working with a C++ wrapper lib I'm writing around libxml2,
where I bind a callback via xmlRegisterNodeDefault to create
wrapper objects each time a new node is created, and bind it to
the node's '_private' pointer.
Doing this I can dereference my wrapper from the nodes of said
As Daniel explained to me, namespace nodes exist as proper xmlNodes in
libxml2 only temporarily during the lifetime of the xpath object,
so I understand that there is no use for a similar mechanism to
bind wrapper objects around them.
However, I'm not sure how I should deal with the situation:
I may want to deal with namespace nodes the same way as other
nodes, i.e. if the xml specs allow for them to be treated as nodes,
I should provide a proper access through my API.
Has this issue come up for others already, notably language wrapper
writers (python comes to mind...) ? Any suggestions are highly
] [Thread Prev