Latest version of MS word is adding the namespace - http://schemas.microsoft.com/office/wor ... l/word16du - and it is creating a problem when an edit happens to the file using docx4j. Saved file can only be opened after repairing the file. I hope we need to handle this namespace in NamespacePrefixMappings.java file. Will there be a fix to this issue soon? I had to add the following lines to NamespacePrefixMappings.java to make it work.
public static String getPreferredPrefixStatic(String namespaceUri, String suggestion, boolean requirePrefix)
} else if (namespaceUri.equals("http://schemas.microsoft.com/office/word/2023/wordml/word16du")) {
return "w16du";
}
protected static String getNamespaceURIStatic(String prefix)
} else if (prefix.equals("w16du")) {
return "http://schemas.microsoft.com/office/word/2023/wordml/word16du";
}
Please suggest if there is any other better way of fixing this issue.