value = new XRTreeFrag(handle, xctxt);
}
else if (obj instanceof DTM)
{
DTM dtm = (DTM)obj;
DTMIterator iterator = new DescendantIterator();
// %%ISSUE%% getDocument may not be valid for DTMs shared by multiple
// document trees, eg RTFs. But in that case, we shouldn't be trying
// to iterate over the whole DTM; we should be iterating over
// dtm.getDocumentRoot(rootNodeHandle), and folks should have told us
// this by passing a more appropriate type.
iterator.setRoot(dtm.getDocument(), xctxt);
value = new XNodeSet(iterator);
}
else if (obj instanceof DTMAxisIterator)
{
DTMAxisIterator iter = (DTMAxisIterator)obj;