XNodeSetForDOMpublic class XNodeSetForDOM extends XNodeSet This class overrides the XNodeSet#object() method to provide the original
Node object, NodeList object, or NodeIterator. |
Fields Summary |
---|
Object | m_origObj |
Constructors Summary |
---|
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
m_dtmMgr = dtmMgr;
m_origObj = node;
int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
m_obj = new NodeSetDTM(dtmMgr);
((NodeSetDTM) m_obj).addNode(dtmHandle);
| public XNodeSetForDOM(XNodeSet val)Construct a XNodeSet object.
super(val);
if(val instanceof XNodeSetForDOM)
m_origObj = ((XNodeSetForDOM)val).m_origObj;
| public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
m_dtmMgr = xctxt.getDTMManager();
m_origObj = nodeList;
// JKESS 20020514: Longer-term solution is to force
// folks to request length through an accessor, so we can defer this
// retrieval... but that requires an API change.
// m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
m_last=nsdtm.getLength();
m_obj = nsdtm;
| public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
m_dtmMgr = xctxt.getDTMManager();
m_origObj = nodeIter;
// JKESS 20020514: Longer-term solution is to force
// folks to request length through an accessor, so we can defer this
// retrieval... but that requires an API change.
// m_obj = new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
m_last=nsdtm.getLength();
m_obj = nsdtm;
|
Methods Summary |
---|
public org.w3c.dom.NodeList | nodelist()Cast result object to a nodelist. Always issues an error.
return (m_origObj instanceof NodeList)
? (NodeList)m_origObj : super.nodelist();
| public org.w3c.dom.traversal.NodeIterator | nodeset()Cast result object to a nodelist. Always issues an error.
return (m_origObj instanceof NodeIterator)
? (NodeIterator)m_origObj : super.nodeset();
| public java.lang.Object | object()Return the original DOM object that the user passed in. For use primarily
by the extension mechanism.
return m_origObj;
|
|