Package org.docx4j.jaxb
Class NamespacePrefixMapperUtils
java.lang.Object
org.docx4j.jaxb.NamespacePrefixMapperUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeclareNamespaces(String mcIgnorable, Document doc) Word requires all mcIgnorable prefixes to be declared at the document level.getPreDeclaredNamespaceMap(String mcIgnorable) static String[]getPreDeclaredNamespaceUris(String mcIgnorable) static StringgetPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) static Objectstatic Objectstatic voidsetProperty(jakarta.xml.bind.Marshaller marshaller, Object namespacePrefixMapper) setProperty on 'com.sun.xml.bind.namespacePrefixMapper' or 'com.sun.xml.internal.bind.namespacePrefixMapper', as appropriate, depending on whether JAXB reference implementation, or Java 6 implementation is being used.private static ObjecttryRIforRelationshipsPart(jakarta.xml.bind.Marshaller m) private static ObjecttryUsingRI(jakarta.xml.bind.Marshaller m)
-
Field Details
-
log
private static org.slf4j.Logger log -
testContext
private static jakarta.xml.bind.JAXBContext testContext -
prefixMapper
-
prefixMapperRels
-
haveTried
private static boolean haveTried -
EMPTY_STRING
-
-
Constructor Details
-
NamespacePrefixMapperUtils
public NamespacePrefixMapperUtils()
-
-
Method Details
-
getPrefixMapper
- Throws:
jakarta.xml.bind.JAXBException
-
tryUsingRI
private static Object tryUsingRI(jakarta.xml.bind.Marshaller m) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
getPrefixMapperRelationshipsPart
- Throws:
jakarta.xml.bind.JAXBException
-
tryRIforRelationshipsPart
private static Object tryRIforRelationshipsPart(jakarta.xml.bind.Marshaller m) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
setProperty
public static void setProperty(jakarta.xml.bind.Marshaller marshaller, Object namespacePrefixMapper) throws jakarta.xml.bind.JAXBException setProperty on 'com.sun.xml.bind.namespacePrefixMapper' or 'com.sun.xml.internal.bind.namespacePrefixMapper', as appropriate, depending on whether JAXB reference implementation, or Java 6 implementation is being used.- Parameters:
marshaller-namespacePrefixMapper-- Throws:
jakarta.xml.bind.JAXBException
-
getPreferredPrefix
public static String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
getPreDeclaredNamespaceUris
-
getPreDeclaredNamespaceMap
-
declareNamespaces
Word requires all mcIgnorable prefixes to be declared at the document level.- Parameters:
mcIgnorable-doc-
-