I figured it out after I sent the question. I build the document with Xerces. Wrap the document with a XercesDocumentWrapper. Add the document element to a nodelist and finally create a XObject around the nodelist.
The only problem I had was to handle the deallocation of the XercesDocumentWrapper. But that was solved by converting my extension function from a global to a local one, and store all created wrappers and documents in member vectors to be deleted in the destructor. Problem solved. Thank you. / Erik > -----Original Message----- > From: Joseph Kesselman [mailto:[EMAIL PROTECTED] > Sent: den 9 januari 2004 14:50 > To: [EMAIL PROTECTED] > Subject: Re: Implementing an extension function that returns result tree > fragment > > > > > > Use any DOM implementation (EXCEPT the one built into Xalan, which is > deliberately read-only), build your new tree using that, return its root > as > the result of your extension function. > > ______________________________________ > Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. > "The world changed profoundly and unpredictably the day Tim Berners Lee > got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
