Class NamespacePrefixMapperUtils

java.lang.Object
org.docx4j.jaxb.NamespacePrefixMapperUtils

public class NamespacePrefixMapperUtils extends Object
  • Constructor Details

    • NamespacePrefixMapperUtils

      public NamespacePrefixMapperUtils()
  • Method Details

    • getPrefixMapper

      public static Object getPrefixMapper() throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • getPrefixMapperRelationshipsPart

      public static Object getPrefixMapperRelationshipsPart() 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

      public static String[] getPreDeclaredNamespaceUris(String mcIgnorable)
    • getPreDeclaredNamespaceMap

      public static Map<String,String> getPreDeclaredNamespaceMap(String mcIgnorable)
    • declareNamespaces

      public static void declareNamespaces(String mcIgnorable, Document doc)
      Word requires all mcIgnorable prefixes to be declared at the document level.
      Parameters:
      mcIgnorable -
      doc -