/** * Utility function used to convert a w3c Node into an internal DOM iterator. */ public static DTMAxisIterator node2Iterator(org.w3c.dom.Node node, Translet translet, DOM dom) { final org.w3c.dom.Node inNode = node; // Create a dummy NodeList which only contains the given node to make // use of the nodeList2Iterator() interface. org.w3c.dom.NodeList nodelist = new org.w3c.dom.NodeList() { public int getLength() { return 1; } public org.w3c.dom.Node item(int index) { if (index == 0) return inNode; else return null; } }; return nodeList2Iterator(nodelist, translet, dom); }
/** * Utility function used to convert a w3c Node into an internal DOM iterator. */ public static DTMAxisIterator node2Iterator(org.w3c.dom.Node node, Translet translet, DOM dom) { final org.w3c.dom.Node inNode = node; // Create a dummy NodeList which only contains the given node to make // use of the nodeList2Iterator() interface. org.w3c.dom.NodeList nodelist = new org.w3c.dom.NodeList() { public int getLength() { return 1; } public org.w3c.dom.Node item(int index) { if (index == 0) return inNode; else return null; } }; return nodeList2Iterator(nodelist, translet, dom); }
/** * Utility function used to convert a w3c Node into an internal DOM iterator. */ public static DTMAxisIterator node2Iterator(org.w3c.dom.Node node, Translet translet, DOM dom) { final org.w3c.dom.Node inNode = node; // Create a dummy NodeList which only contains the given node to make // use of the nodeList2Iterator() interface. org.w3c.dom.NodeList nodelist = new org.w3c.dom.NodeList() { public int getLength() { return 1; } public org.w3c.dom.Node item(int index) { if (index == 0) return inNode; else return null; } }; return nodeList2Iterator(nodelist, translet, dom); }
/** * Utility function used to convert a w3c Node into an internal DOM iterator. */ public static DTMAxisIterator node2Iterator(org.w3c.dom.Node node, Translet translet, DOM dom) { final org.w3c.dom.Node inNode = node; // Create a dummy NodeList which only contains the given node to make // use of the nodeList2Iterator() interface. org.w3c.dom.NodeList nodelist = new org.w3c.dom.NodeList() { public int getLength() { return 1; } public org.w3c.dom.Node item(int index) { if (index == 0) return inNode; else return null; } }; return nodeList2Iterator(nodelist, translet, dom); }