> It disappeared becaue the "shadow" root document fragment disappeared,
> which was a quick-and-hacked implementation and caused no end of trouble.
>
> Our ResultTreeFrag specialization of XalanDocumentFragment also
> disappeared, as it was offering no value and just created complications.
>
> The real "root" is now the result tree fragment itself.  Is there any
> reason why that won't work?
>
I'm just not sure how I add this to a nodeset.  Do I have to clone it?

theNodeList->addNode((*it).second->rtree().cloneNode( false ));

Should the deep flag be set? Does the nodelist then own (and therefore
ultimately cleanup) the cloned tree?

Thanks,

Mark


> Dave
>
>
>
> |---------+--------------------------->
> |         |           "Mark Weaver"   |
> |         |           <[EMAIL PROTECTED]|
> |         |           >               |
> |         |                           |
> |         |           04/07/2004 05:26|
> |         |           AM              |
> |         |           Please respond  |
> |         |           to xalan-c-users|
> |---------+--------------------------->
>
> >-----------------------------------------------------------------
> ---------------------------------------------------------|
>   |
>                                                            |
>   |        To:      "Xalan-C-Users"
> <[email protected]>
>                        |
>   |        cc:      (bcc: David N Bertoni/Cambridge/IBM)
>                                                            |
>   |        Subject: rtree()->getNodesetRoot()
>                                                            |
>
> >-----------------------------------------------------------------
> ---------------------------------------------------------|
>
>
>
> I've recently moved up to Xalan 1.7 and it seems that the getNodeSetRoot()
> function has disappeared from XalanDocumentFragment.  This was used in one
> of my (nasty) extension functions that implements a dictionary.
>
> Basically, I'm trying to stick the RTF to a nodeset in the following code:
>
>                          dictionary_t::iterator it =
> m_dic.find(arg1->str().data());
>
> XPathExecutionContext::BorrowReturnMutableNodeRefList
> theNodeList(executionContext);
>                          if (it != m_dic.end()) {
>
> theNodeList->addNode((*it).second->rtree().getNodesetRoot());
>                          }
>                          return
> executionContext.getXObjectFactory().createNodeSet(theNodeList);
>
> the idea being that the nodeset is empty if the dictionary key
> could not be
> found or contains the node otherwise.  (There's also a corresponding
> function to return all of the nodes).
>
> Could anyone advise as to the correct way to do this these days?
>
> Thanks,
>
> Mark
>
>
>
>
>

Reply via email to