*/
private void appendSpecificTypes(Element root,
Entry<PackagePartName, String> entry) {
- Element specificType = root.getOwnerDocument().createElement(OVERRIDE_TAG_NAME);
+ Element specificType = root.getOwnerDocument().createElementNS(TYPES_NAMESPACE_URI, OVERRIDE_TAG_NAME);
specificType.setAttribute(PART_NAME_ATTRIBUTE_NAME, entry.getKey().getName());
specificType.setAttribute(CONTENT_TYPE_ATTRIBUTE_NAME, entry.getValue());
root.appendChild(specificType);
* @see #save(java.io.OutputStream)
*/
private void appendDefaultType(Element root, Entry<String, String> entry) {
- Element defaultType = root.getOwnerDocument().createElement(DEFAULT_TAG_NAME);
+ Element defaultType = root.getOwnerDocument().createElementNS(TYPES_NAMESPACE_URI, DEFAULT_TAG_NAME);
defaultType.setAttribute(EXTENSION_ATTRIBUTE_NAME, entry.getKey());
defaultType.setAttribute(CONTENT_TYPE_ATTRIBUTE_NAME, entry.getValue());
root.appendChild(defaultType);
import org.apache.poi.openxml4j.opc.internal.PartMarshaller;
import org.apache.poi.openxml4j.opc.internal.ZipHelper;
import org.apache.poi.util.DocumentHelper;
-import org.apache.poi.util.POILogger;
import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
for (PackageRelationship rel : rels) {
// the relationship element
- Element relElem = xmlOutDoc.createElement(PackageRelationship.RELATIONSHIP_TAG_NAME);
+ Element relElem = xmlOutDoc.createElementNS(PackageNamespaces.RELATIONSHIPS, PackageRelationship.RELATIONSHIP_TAG_NAME);
root.appendChild(relElem);
// the relationship ID