/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return original.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the QName. * * @return the prefix. Returns the empty string if the name is unprefixed. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the QName. * * @return the prefix. Returns the empty string if the name is unprefixed. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return original.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return original.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return original.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return node.getPrefix(); }
/** * Get the prefix of the name of the node. This is defined only for elements and attributes. * If the node has no prefix, or for other kinds of node, return a zero-length string. * * @return The prefix of the name of the node. */ public String getPrefix() { return node.getPrefix(); }
public String getAttributePrefix(int i) { if (currentStaxEvent != START_ELEMENT) { throw new IllegalStateException(""+currentStaxEvent); } return startElementEvent.getAttribute(i).getPrefix(); }
public QName getAttributeName(int i) { if (currentStaxEvent != START_ELEMENT) { throw new IllegalStateException(""+currentStaxEvent); } NodeInfo att = startElementEvent.getAttribute(i); return new QName(att.getURI(), att.getLocalPart(), att.getPrefix()); }
public static QNameValue nodeName(NodeInfo node) { if (node.getLocalPart().isEmpty()) { return null; } return new QNameValue(node.getPrefix(), node.getURI(), node.getLocalPart(), BuiltInAtomicType.QNAME); }
public static QNameValue nodeName(NodeInfo node) { if (node.getLocalPart().isEmpty()) { return null; } return new QNameValue(node.getPrefix(), node.getURI(), node.getLocalPart(), BuiltInAtomicType.QNAME); }
/** * Helper method to get the name of a node as a structuredQName. Used from bytecode * @param node the node * @return the name of the node if it has a name, or null otherwise */ public static StructuredQName getNodeName(NodeInfo node) { if (node.getLocalPart() != null) { return new StructuredQName(node.getPrefix(), node.getURI(), node.getLocalPart()); } else { return null; } }
/** * Helper method to get the name of a node as a structuredQName. Used from bytecode * @param node the node * @return the name of the node if it has a name, or null otherwise */ public static StructuredQName getNodeName(NodeInfo node) { if (node.getLocalPart() != null) { return new StructuredQName(node.getPrefix(), node.getURI(), node.getLocalPart()); } else { return null; } }
/** * Graft an element node from an external tree */ public void graft(NodeInfo externalNode, int nodeNr, int depth, boolean copyNamespaces) { assert externalNode.getNodeKind() == Type.ELEMENT; if (externalNodes == null) { externalNodes = new ArrayList<>(); } int externalNodeNr = externalNodes.size(); int fp = getNamePool().allocateFingerprint(externalNode.getURI(), externalNode.getLocalPart()); int prefixCode = prefixPool.obtainPrefixCode(externalNode.getPrefix()); int nameCode = (prefixCode << 20) | fp; addNode(Type.EXTERNAL_NODE_REFERENCE, depth, externalNodeNr, -1, nameCode); externalNodes.add(new GraftedElement(this, nodeNr, externalNode, copyNamespaces)); }
/** * Make a NodeName object based on the name of a supplied node. * @param node the supplied node * @return a NameOfNode object unless the node is mutable, in which case an immutable name is returned. */ public static NodeName makeName(NodeInfo node) { if (node instanceof MutableNodeInfo) { return new FingerprintedQName(node.getPrefix(), node.getURI(), node.getLocalPart()); } else if (node instanceof AbstractVirtualNode) { return new NameOfNode(((AbstractVirtualNode)node).getUnderlyingNode()); } else { return new NameOfNode(node); } }
/** * Make a NodeName object based on the name of a supplied node. * @param node the supplied node * @return a NameOfNode object unless the node is mutable, in which case an immutable name is returned. */ public static NodeName makeName(NodeInfo node) { if (node instanceof MutableNodeInfo) { return new FingerprintedQName(node.getPrefix(), node.getURI(), node.getLocalPart()); } else if (node instanceof AbstractVirtualNode) { return new NameOfNode(((AbstractVirtualNode)node).getUnderlyingNode()); } else { return new NameOfNode(node); } }