/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(NodeName other) { return other.getURI().isEmpty(); }
/** * Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification * * @return true if the element is to be serialized as an HTML element */ @Override protected boolean isHTMLElement(NodeName name) { return name.getURI().equals(""); }
/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(NodeName other) { return other.getURI().isEmpty(); }
/** * Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification * * @return true if the element is to be serialized as an HTML element */ @Override protected boolean isHTMLElement(NodeName name) { return name.getURI().equals(""); }
/** * Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification * * @return true if the element is to be serialized as an HTML element */ @Override protected boolean isHTMLElement(NodeName name) { String uri = name.getURI(); return uri.equals("") || uri.equals(NamespaceConstant.XHTML); }
/** * Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification * * @return true if the element is to be serialized as an HTML element */ @Override protected boolean isHTMLElement(NodeName name) { String uri = name.getURI(); return uri.equals("") || uri.equals(NamespaceConstant.XHTML); }
/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(/*@NotNull*/ NodeName other) { return getURI().equals(other.getURI()); }
/** * Get the URI part of the name of this node. This is the URI corresponding to the * prefix, or the URI of the default namespace if appropriate. * * @return The URI of the namespace of this node. For the null namespace, return an * empty string. For an unnamed node, return the empty string. */ public String getURI() { NodeName qName = getNodeName(); return qName == null ? "" : qName.getURI(); }
/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(/*@NotNull*/ NodeName other) { return getURI().equals(other.getURI()); }
/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(/*@NotNull*/ NodeName other) { return node.getURI().equals(other.getURI()); }
/** * Get the URI part of the name of this node. This is the URI corresponding to the * prefix, or the URI of the default namespace if appropriate. * * @return The URI of the namespace of this node. For the null namespace, return an * empty string. For an unnamed node, return the empty string. */ public String getURI() { NodeName qName = getNodeName(); return qName == null ? "" : qName.getURI(); }
/** * Test whether this name is in the same namespace as another name * * @return true if the two names are in the same namespace */ public boolean isInSameNamespace(/*@NotNull*/ NodeName other) { return node.getURI().equals(other.getURI()); }
private int hash(NodeName n, int sequence) { //System.err.println("hash(" + n.getLocalPart() + ") " + hash(n.getLocalPart(), sequence) + "/" + hash(n.getURI(), sequence)); return hash(n.getLocalPart(), sequence) ^ hash(n.getURI(), sequence); } }
/** * Get an attribute value given the Clark name of the attribute (that is, * the name in {uri}local format). * * @param clarkName the name of the attribute in {uri}local format * @return the value of the attribute if it exists, or null otherwise */ public String getAttributeValue(String clarkName) { NodeName nn = FingerprintedQName.fromClarkName(clarkName); return getAttributeValue(nn.getURI(), nn.getLocalPart()); }
/** * Get an attribute value given the Clark name of the attribute (that is, * the name in {uri}local format). * * @param clarkName the name of the attribute in {uri}local format * @return the value of the attribute if it exists, or null otherwise */ public String getAttributeValue(String clarkName) { NodeName nn = FingerprintedQName.fromClarkName(clarkName); return getAttributeValue(nn.getURI(), nn.getLocalPart()); }
private int hash(NodeName n, int sequence) { //System.err.println("hash(" + n.getLocalPart() + ") " + hash(n.getLocalPart(), sequence) + "/" + hash(n.getURI(), sequence)); return hash(n.getLocalPart(), sequence) ^ hash(n.getURI(), sequence); } }
/** * 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); }