public boolean hasNamespace(String namespaceUri) { if (this.namespaces!=null && this.namespaces.hasNamespace(namespaceUri)) { return true; } if (parent!=null) { return parent.hasNamespace(namespaceUri); } return false; }
public boolean hasNamespace(String namespaceUri) { if (this.namespaces!=null && this.namespaces.hasNamespace(namespaceUri)) { return true; } if (parent!=null) { return parent.hasNamespace(namespaceUri); } return false; }
protected String getNamespacePrefix(String namespaceUri) { if (this.namespaces != null && this.namespaces.hasNamespace(namespaceUri)) { String prefix = this.namespaces.getPrefix(namespaceUri); return prefix == null || prefix.isEmpty() ? "" : prefix + ":"; } if (parent!=null) { return parent.getNamespacePrefix(namespaceUri); } return ""; }
protected String getNamespacePrefix(String namespaceUri) { if (this.namespaces != null && this.namespaces.hasNamespace(namespaceUri)) { String prefix = this.namespaces.getPrefix(namespaceUri); return prefix == null || prefix.isEmpty() ? "" : prefix + ":"; } if (parent!=null) { return parent.getNamespacePrefix(namespaceUri); } return ""; }