get a XalanDocument

H

henribastien

Hi, I'm trying to implement an extension function for Xalan-C that
returns a Nodeset. I've figured out most of the stuff I need to do.

I think I need to use the function createElement from a XalanDocument.
My problem is I don't know how to get hold of a XalanDocument.

I tried using getOwnerDocument but it returns null. I though About
using DOMImplementation::getImplentation()->createDocument() from
xerces and to somehow wrap this in a Xalan class but it does not seems
right.

Someone know how get hold of a XalanDocument in the context of an
Extension function?
 
J

Joseph Kesselman

I tried using getOwnerDocument but it returns null.

Note that the W3C DOM's getOwnerDocument operation returns null if the
node is a Document node. (Yes, I objected at the time.) Check the
nodetype first, or if this returns null, and if it tells you that you
already have a Document node use it as it stands...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top