/** * Return an DOM node for the given node. * * @param nodeHandle The node ID. * * @return A node representation of the DTM node. */ public org.w3c.dom.Node getNode(int nodeHandle) { return new DTMNodeProxy(this, nodeHandle); }
return equals((Node) node); for(int i = 0; i < nl.getLength(); i++) traverseChildren(listVector, nl.item(i), namespaceURI, localname, isNamespaceURIWildCard, isLocalNameWildCard);
short type = this.getNodeType(); switch (type) { case Node.ELEMENT_NODE : { String namespace = this.getNamespaceURI(); String prefix = this.getPrefix(); if (namespace !=null) { if (this.hasAttributes()) { NamedNodeMap map = this.getAttributes(); int length = map.getLength(); for (int i=0;i<length;i++) { if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) { return getOwnerElement().lookupNamespaceURI(specifiedPrefix);
/** * <code>systemId</code> returns the system id of the node passed as * argument. If a node set is passed as argument, the system id of * the first node in the set is returned. * * @param nodeList a <code>NodeList</code> value * @return a <code>String</code> value */ public static String systemId(NodeList nodeList) { if (nodeList == null || nodeList.getLength() == 0) return null; Node node = nodeList.item(0); int nodeHandler = ((DTMNodeProxy)node).getDTMNodeNumber(); SourceLocator locator = ((DTMNodeProxy)node).getDTM() .getSourceLocatorFor(nodeHandler); if (locator != null) return locator.getSystemId(); else return null; }
if (arg.getNodeType() != getNodeType()) { return false; if (getNodeName() == null) { if (arg.getNodeName() != null) { return false; else if (!getNodeName().equals(arg.getNodeName())) { return false; if (getLocalName() == null) { if (arg.getLocalName() != null) { return false; else if (!getLocalName().equals(arg.getLocalName())) { return false; if (getNamespaceURI() == null) { if (arg.getNamespaceURI() != null) { return false; else if (!getNamespaceURI().equals(arg.getNamespaceURI())) { return false; if (getPrefix() == null) { if (arg.getPrefix() != null) { return false; else if (!getPrefix().equals(arg.getPrefix())) {
short type = this.getNodeType(); if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) { return getOwnerElement().lookupPrefix(namespaceURI);
/** * * * @see org.w3c.dom.Node */ public final Node getParentNode() { if (getNodeType() == Node.ATTRIBUTE_NODE) return null; int newnode = dtm.getParent(node); return (newnode == DTM.NULL) ? null : dtm.getNode(newnode); }
/** * Use DTMNodeProxy to determine whether two nodes are the same. * * @param node1 The first DOM node to compare. * @param node2 The second DOM node to compare. * @return true if the two nodes are the same. */ public static boolean isNodeTheSame(Node node1, Node node2) { if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy) return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2); else return (node1 == node2); }
/** * * @param offset * @param count * * * * @throws DOMException * @see org.w3c.dom.CharacterData */ public final String substringData(int offset, int count) throws DOMException { return getData().substring(offset,offset+count); }
return ((org.apache.xml.dtm.ref.DTMNodeProxy) node).getDTMNodeNumber();
return getNodeValue(); // overriden in some subclasses
if (arg.getNodeType() != getNodeType()) { return false; if (getNodeName() == null) { if (arg.getNodeName() != null) { return false; else if (!getNodeName().equals(arg.getNodeName())) { return false; if (getLocalName() == null) { if (arg.getLocalName() != null) { return false; else if (!getLocalName().equals(arg.getLocalName())) { return false; if (getNamespaceURI() == null) { if (arg.getNamespaceURI() != null) { return false; else if (!getNamespaceURI().equals(arg.getNamespaceURI())) { return false; if (getPrefix() == null) { if (arg.getPrefix() != null) { return false; else if (!getPrefix().equals(arg.getPrefix())) {
/** * <code>publicId</code> returns the public identifier of the node passed as * argument. If a node set is passed as argument, the public identifier of * the first node in the set is returned. * * Xalan does not currently record this value, and will return null. * * @param nodeList a <code>NodeList</code> value * @return a <code>String</code> value */ public static String publicId(NodeList nodeList) { if (nodeList == null || nodeList.getLength() == 0) return null; Node node = nodeList.item(0); int nodeHandler = ((DTMNodeProxy)node).getDTMNodeNumber(); SourceLocator locator = ((DTMNodeProxy)node).getDTM() .getSourceLocatorFor(nodeHandler); if (locator != null) return locator.getPublicId(); else return null; }
/** * * * @see org.w3c.dom.Node */ public final Node getParentNode() { if (getNodeType() == Node.ATTRIBUTE_NODE) return null; int newnode = dtm.getParent(node); return (newnode == DTM.NULL) ? null : dtm.getNode(newnode); }
/** * Use DTMNodeProxy to determine whether two nodes are the same. * * @param node1 The first DOM node to compare. * @param node2 The second DOM node to compare. * @return true if the two nodes are the same. */ public static boolean isNodeTheSame(Node node1, Node node2) { if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy) return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2); else return (node1 == node2); }
/** * * @param offset * @param count * * * * @throws DOMException * @see org.w3c.dom.CharacterData */ public final String substringData(int offset, int count) throws DOMException { return getData().substring(offset,offset+count); }
short type = this.getNodeType(); if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) { return getOwnerElement().lookupPrefix(namespaceURI);
return ((org.apache.xml.dtm.ref.DTMNodeProxy) node).getDTMNodeNumber();
return getNodeValue(); // overriden in some subclasses
if (arg.getNodeType() != getNodeType()) { return false; if (getNodeName() == null) { if (arg.getNodeName() != null) { return false; else if (!getNodeName().equals(arg.getNodeName())) { return false; if (getLocalName() == null) { if (arg.getLocalName() != null) { return false; else if (!getLocalName().equals(arg.getLocalName())) { return false; if (getNamespaceURI() == null) { if (arg.getNamespaceURI() != null) { return false; else if (!getNamespaceURI().equals(arg.getNamespaceURI())) { return false; if (getPrefix() == null) { if (arg.getPrefix() != null) { return false; else if (!getPrefix().equals(arg.getPrefix())) {