public void appendQNameChild(String elementName, Node parent, String namespaceUri, String localPart, String prefix) { if( prefix == null ) { // @@@ make configurable?? prefix = elementName + "_ns__"; } String elementValue = composeQNameValue(prefix, localPart); Element element = (Element) appendTextChild (parent, elementName, elementValue); // Always set prefix mapping on leaf node. If the DOL was // populated from an existing deployment descriptor it does // not preserve the original node structure of the XML document, // so we can't reliably know what level to place mapping. // Alternatively, if we're writing out a descriptor that was created // by the deploytool, there is no prefix->namespace information in // the first place. setAttributeNS(element, prefix, namespaceUri); } }
public void appendQNameChild(String elementName, Node parent, String namespaceUri, String localPart, String prefix) { if( prefix == null ) { // @@@ make configurable?? prefix = elementName + "_ns__"; } String elementValue = composeQNameValue(prefix, localPart); Element element = (Element) appendTextChild (parent, elementName, elementValue); // Always set prefix mapping on leaf node. If the DOL was // populated from an existing deployment descriptor it does // not preserve the original node structure of the XML document, // so we can't reliably know what level to place mapping. // Alternatively, if we're writing out a descriptor that was created // by the deploytool, there is no prefix->namespace information in // the first place. setAttributeNS(element, prefix, namespaceUri); } }