/** * 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() { if (nodeName == null) { return ""; } else { return nodeName.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() { if (nodeName == null) { return ""; } else { return nodeName.getPrefix(); } }
/** * Get the prefix part of the name of this node. This is the name before the ":" if any. * * @return the prefix part of the name. For an unnamed node, return an empty string. */ public String getPrefix() { NodeName qName = getNodeName(); return qName == null ? "" : qName.getPrefix(); }
/** * Get the prefix of the name of an attribute (by position). * * @param index The position of the attribute in the list. * @return The prefix of the attribute name as a string, or null if there * is no attribute at that position. Returns "" for an attribute that * has no prefix. */ public String getPrefix(int index) { return getNodeName(index).getPrefix(); }
/** * Get the prefix of the name of an attribute (by position). * * @param index The position of the attribute in the list. * @return The prefix of the attribute name as a string, or null if there * is no attribute at that position. Returns "" for an attribute that * has no prefix. */ public String getPrefix(int index) { return getNodeName(index).getPrefix(); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other the value to compare with * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && ((NodeName) other).getPrefix().isEmpty(); }
/** * Get the prefix part of the name of this node. This is the name before the ":" if any. * * @return the prefix part of the name. For an unnamed node, return an empty string. */ public String getPrefix() { NodeName qName = getNodeName(); return qName == null ? "" : qName.getPrefix(); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other the value to compare with * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && ((NodeName) other).getPrefix().isEmpty(); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other the other value * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
/** * Determine whether two IdentityComparable objects are identical. This is a stronger * test than equality (even schema-equality); for example two dateTime values are not identical unless * they are in the same timezone. * * @param other the other value * @return true if the two values are indentical, false otherwise */ public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
public boolean isIdentical(IdentityComparable other) { return other instanceof NodeName && this.equals(other) && this.getPrefix().equals(((NodeName) other).getPrefix()); }
public void attribute(/*@NotNull*/ NodeName attName, SimpleType type, CharSequence value, Location locationId, int properties) throws XPathException { // System.err.println("attribute " + nameCode + "=" + value); //if (counter++ % 1000 == 0) System.err.println("T.addAttribute# = " + counter); int fp = attName.obtainFingerprint(namePool); String prefix = attName.getPrefix(); int nameCode = prefix.isEmpty() ? fp : (tree.prefixPool.obtainPrefixCode(prefix) << 20) | fp; assert tree != null; assert currentRoot != null; tree.addAttribute(currentRoot, nodeNr, nameCode, type, value, properties); if (markDefaultedAttributes && ((properties & ReceiverOptions.DEFAULTED_ATTRIBUTE) != 0)) { tree.markDefaultedAttribute(tree.numberOfAttributes - 1); } }
public void attribute(/*@NotNull*/ NodeName attName, SimpleType type, CharSequence value, Location locationId, int properties) throws XPathException { // System.err.println("attribute " + nameCode + "=" + value); //if (counter++ % 1000 == 0) System.err.println("T.addAttribute# = " + counter); int fp = attName.obtainFingerprint(namePool); String prefix = attName.getPrefix(); int nameCode = prefix.isEmpty() ? fp : (tree.prefixPool.obtainPrefixCode(prefix) << 20) | fp; assert tree != null; assert currentRoot != null; tree.addAttribute(currentRoot, nodeNr, nameCode, type, value, properties); if (markDefaultedAttributes && ((properties & ReceiverOptions.DEFAULTED_ATTRIBUTE) != 0)) { tree.markDefaultedAttribute(tree.numberOfAttributes - 1); } }
/** * Handle an attribute */ public void attribute(NodeName name, SimpleType type, CharSequence value, Location location, int properties) throws XPathException { checkType(type); int fp = newPool.allocateFingerprint(name.getURI(), name.getLocalPart()); nextReceiver.attribute(new CodedName(fp, name.getPrefix(), newPool), type, value, location, properties); }
/** * Output element start tag */ public void startElement(NodeName name, SchemaType type, Location location, int properties) throws XPathException { checkType(type); int fp = newPool.allocateFingerprint(name.getURI(), name.getLocalPart()); nextReceiver.startElement(new CodedName(fp, name.getPrefix(), newPool), type, location, properties); }
/** * Output element start tag */ public void startElement(NodeName name, SchemaType type, Location location, int properties) throws XPathException { checkType(type); int fp = newPool.allocateFingerprint(name.getURI(), name.getLocalPart()); nextReceiver.startElement(new CodedName(fp, name.getPrefix(), newPool), type, location, properties); }
/** * Handle an attribute */ public void attribute(NodeName name, SimpleType type, CharSequence value, Location location, int properties) throws XPathException { checkType(type); int fp = newPool.allocateFingerprint(name.getURI(), name.getLocalPart()); nextReceiver.attribute(new CodedName(fp, name.getPrefix(), newPool), type, value, location, properties); }