- Timestamp:
- 2010-07-09T15:00:11+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XMLTransformer.java
r18452 r22370 74 74 */ 75 75 public XMLTransformer() { 76 77 76 // make sure we are using the xalan transformer 78 System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl"); 77 78 // http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/index.html?javax/xml/transform/TransformerFactory.html states that 79 // TransformerFactory.newInstance() looks in jar files for a Factory specified in META-INF/services/javax.xml.transform.TransformerFactory, 80 // else it will use the "platform default" 81 // In this case: xalan.jar's META-INF/services/javax.xml.transform.TransformerFactory contains org.apache.xalan.processor.TransformerFactoryImpl 82 // as required. 83 84 // This means we no longer have to do a System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl"); 85 // followed by a this.t_factory = org.apache.xalan.processor.TransformerFactoryImpl.newInstance(); 86 // The System.setProperty step to force the TransformerFactory implementation that gets used conflicts with 87 // Fedora (visiting the Greenstone server pages breaks the Greenstone-tomcat hosted Fedora pages) as Fedora 88 // does not include the xalan.jar and therefore can't then find the xalan TransformerFactory explicitly set. 89 79 90 try { 80 this.t_factory = org.apache.xalan.processor.TransformerFactoryImpl.newInstance(); 81 91 this.t_factory = TransformerFactory.newInstance(); 82 92 } catch (Exception e) { 83 93 logger.error("exception "+e.getMessage());
Note:
See TracChangeset
for help on using the changeset viewer.