Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 8th, 2006, 09:35 PM
henribastien@gmail.com
Guest
 
Posts: n/a
Default get a XalanDocument

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?

  #2  
Old March 8th, 2006, 09:45 PM
Joseph Kesselman
Guest
 
Posts: n/a
Default Re: get a XalanDocument

henribastien@gmail.com wrote:[color=blue]
> I tried using getOwnerDocument but it returns null.[/color]

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...


--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
  #3  
Old March 9th, 2006, 01:45 PM
henribastien@gmail.com
Guest
 
Posts: n/a
Default Re: get a XalanDocument

Ahh. Thanks for your help. It got me really excited for a moment.
Though once I tried this and tried to call createElement on this
wonderful document I get this error "NOT_SUPPORTED_ERR". Well, seems
like I the version I have does not support creation of element... Well,
at least I tried..

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles