Skip to content

Commit

Permalink
Merge branch 'includeDefaultNSinXSL' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrow committed Apr 11, 2016
2 parents 2348f77 + c8babb4 commit e475526
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
17 changes: 10 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<check>
<haltOnFailure>false</haltOnFailure>
Expand Down Expand Up @@ -95,6 +96,7 @@
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.10.b1</version>
<configuration>
<header>src/main/resources/header.txt</header>
</configuration>
Expand Down Expand Up @@ -198,13 +200,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/xmlcml/norma/util/TransformerWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

import net.sf.saxon.TransformerFactoryImpl;
import net.sf.saxon.Configuration;
import net.sf.saxon.lib.FeatureKeys;
import nu.xom.Document;
import nu.xom.Element;

Expand Down Expand Up @@ -61,9 +64,9 @@ public Transformer createTransformer(File stylesheet) throws Exception {
}

public Transformer createTransformer(org.w3c.dom.Document xslStylesheet) throws Exception {
System.setProperty(JAVAX_XML_TRANSFORM_TRANSFORMER_FACTORY,
NET_SF_SAXON_TRANSFORMER_FACTORY_IMPL);
TransformerFactory tfactory = TransformerFactory.newInstance();
Configuration config = new Configuration();
config.setConfigurationProperty(FeatureKeys.SUPPRESS_XSLT_NAMESPACE_CHECK, "true");
TransformerFactory tfactory = new TransformerFactoryImpl(config);
DOMSource domSource = new DOMSource(xslStylesheet);
javaxTransformer = tfactory.newTransformer(domSource);
return javaxTransformer;
Expand Down

0 comments on commit e475526

Please sign in to comment.