if (argIsNodeSetDTM)
{
Hashtable usedrefs = null;
DTMIterator ni = arg.iter();
int pos;
UnionPathIterator upi = new UnionPathIterator();
while (DTM.NULL != (pos = ni.nextNode()))
{
dtm = xctxt.getDTM(pos);
XMLString ref = dtm.getStringValue(pos);
if (null == ref)
continue;
if (null == usedrefs)
usedrefs = new Hashtable();
if (usedrefs.get(ref) != null)
{
continue; // We already have 'em.
}
else
{
// ISTRUE being used as a dummy value.
usedrefs.put(ref, ISTRUE);
}
LocPathIterator nl =
kmgr.getNodeSetDTMByKey(xctxt, docContext, keyname, ref,
xctxt.getNamespaceContext());
// try
// {
upi.addIterator((LocPathIterator)nl.asIterator(xctxt, docContext));
// }
// catch(CloneNotSupportedException cnse)
// {
// // will never happen.
// }
//mnodeset.addNodesInDocOrder(nl, xctxt); needed??
}
int current = xctxt.getCurrentNode();
upi.setRoot(current, xctxt);
nodes = new XNodeSet(upi);
}
else
{