Ignore:
Timestamp:
09/28/09 18:14:41 (3 years ago)
Author:
jharrop
Message:

Iff you are using Java 5, you need a stax implementation jar in order for Differencer to work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/diff/Differencer.java

    r871 r904  
    127127 
    128128    static Templates xsltDiffx2Wml; 
     129     
     130        /** 
     131         * org/docx4j/diff/diffx2wml.xslt will be used by default 
     132         * to transform the diff output into a Word docx with tracked 
     133         * changes. This method allows you to use your own xslt  
     134         * instead. 
     135         * @param xsltDiffx2Wml 
     136         */ 
     137        public static void setXsltDiffx2Wml(Templates xsltDiffx2Wml) { 
     138                Differencer.xsltDiffx2Wml = xsltDiffx2Wml; 
     139        } 
     140     
     141     
     142     
    129143    static Templates xsltMarkupInsert; 
    130144    static Templates xsltMarkupDelete; 
     
    317331                         
    318332                        XMLInputFactory inputFactory = XMLInputFactory.newInstance(); 
     333                        /* 
     334                         * With JDK 1.5, you need to supply a stax jar, or you 
     335                         * will get: 
     336                         *  
     337                         * javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found 
     338                                at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72) 
     339                                at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176) 
     340                                at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92) 
     341                                at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)  
     342                                 
     343                         * This is not necessary if you use Java 6.  
     344                         *  
     345                         * From http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP4.html 
     346                         *  
     347                         * The XMLInputFactory class lets you configure implementation instances of XML  
     348                         * stream reader processors created by the factory. New instances of the abstract  
     349                         * class XMLInputFactory are created by calling the newInstance() method on the  
     350                         * class. The static method XMLInputFactory.newInstance() is then used to create  
     351                         * a new factory instance. 
     352 
     353                                Deriving from JAXP, the XMLInputFactory.newInstance() method determines the  
     354                                specific XMLInputFactory implementation class to load by using the following  
     355                                lookup procedure: 
     356                                 
     357                                   1. Use the javax.xml.stream.XMLInputFactory system property. 
     358                                    
     359                                   2. Use the lib/xml.stream.properties file in the JRE directory. 
     360                                    
     361                                   3. Use the Services API, if available, to determine the classname  
     362                                   by looking in the META-INF/services/javax.xml.stream.XMLInputFactory  
     363                                   files in jars available to the JRE. 
     364                                    
     365                                   4. Use the platform default XMLInputFactory instance. 
     366                         *  
     367                         */ 
     368                         
     369                         
    319370                        //java.io.InputStream is = new java.io.ByteArrayInputStream(naive.getBytes("UTF-8")); 
    320371                        Reader reader; 
     
    13001351                } 
    13011352        } 
     1353 
    13021354     
    13031355 
Note: See TracChangeset for help on using the changeset viewer.