/** * Collect all prefixes in namespace declarations up the path to the document root from the * specified node * * @param prefixes Set of prefixes to be collected */ void collectNamespacePrefixesOnPath(Set<String> prefixes) { Map<String, String> nsDeclarations = getNamespaceDeclarations(); if (nsDeclarations != null) { for (String prefix : nsDeclarations.keySet()) { prefixes.add(prefix); } } if (parent != null) { parent.collectNamespacePrefixesOnPath(prefixes); } }
/** * Collect all prefixes in namespace declarations up the path to the document root from the * specified node * * @param prefixes Set of prefixes to be collected */ void collectNamespacePrefixesOnPath(Set<String> prefixes) { Map<String, String> nsDeclarations = getNamespaceDeclarations(); if (nsDeclarations != null) { for (String prefix : nsDeclarations.keySet()) { prefixes.add(prefix); } } if (parent != null) { parent.collectNamespacePrefixesOnPath(prefixes); } }
private void defineNamespaceDeclarations(TagNode node, Element element) { Map<String, String> nsDeclarations = node.getNamespaceDeclarations(); if (nsDeclarations != null) { for (Map.Entry<String, String> nsEntry : nsDeclarations.entrySet()) { String nsPrefix = nsEntry.getKey(); String nsURI = nsEntry.getValue(); Namespace ns = nsPrefix == null || "".equals(nsPrefix) ? Namespace.getNamespace(nsURI) : Namespace .getNamespace(nsPrefix, nsURI); element.addNamespaceDeclaration(ns); } } }
private void defineNamespaceDeclarations(TagNode node, Element element) { Map<String, String> nsDeclarations = node.getNamespaceDeclarations(); if (nsDeclarations != null) { for (Map.Entry<String, String> nsEntry : nsDeclarations.entrySet()) { String nsPrefix = nsEntry.getKey(); String nsURI = nsEntry.getValue(); Namespace ns = nsPrefix == null || "".equals(nsPrefix) ? Namespace.getNamespace(nsURI) : Namespace .getNamespace(nsPrefix, nsURI); element.addNamespaceDeclaration(ns); } } }
Map<String, String> nsDeclarations = tagNode.getNamespaceDeclarations(); if (nsDeclarations != null) { for (Map.Entry<String, String> entry : nsDeclarations.entrySet()) {
Map<String, String> nsDeclarations = tagNode.getNamespaceDeclarations(); if (nsDeclarations != null) { for (Map.Entry<String, String> entry: nsDeclarations.entrySet()) {
private HeadlessTagNode(TagNode wrappedNode) { super(""); getAttributes().putAll(wrappedNode.getAttributes()); addChildren(wrappedNode.getAllChildren()); setDocType(wrappedNode.getDocType()); Map<String, String> nsDecls = getNamespaceDeclarations(); if (nsDecls != null) { Map<String, String> wrappedNSDecls = wrappedNode.getNamespaceDeclarations(); if (wrappedNSDecls != null) { nsDecls.putAll(wrappedNSDecls); } } } }
private HeadlessTagNode(TagNode wrappedNode) { super(""); getAttributes().putAll(wrappedNode.getAttributes()); addChildren(wrappedNode.getAllChildren()); setDocType(wrappedNode.getDocType()); Map<String, String> nsDecls = getNamespaceDeclarations(); if (nsDecls != null) { Map<String, String> wrappedNSDecls = wrappedNode.getNamespaceDeclarations(); if (wrappedNSDecls != null) { nsDecls.putAll(wrappedNSDecls); } } } }
boolean nsAware = props.isNamespacesAware(); String prefix = Utils.getXmlNSPrefix(name); Map<String, String> nsDeclarations = node.getNamespaceDeclarations(); String nsURI = null; if (prefix != null) {
boolean nsAware = props.isNamespacesAware(); String prefix = Utils.getXmlNSPrefix(name); Map<String, String> nsDeclarations = node.getNamespaceDeclarations(); String nsURI = null; if (prefix != null) {