import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.FopFactoryBuilder;
-import org.apache.xalan.processor.TransformerFactoryImpl;
import org.apache.xmlgraphics.io.Resource;
import org.apache.xmlgraphics.io.ResourceResolver;
import org.argeo.api.acr.Content;
import org.geotools.data.simple.SimpleFeatureCollection;
import org.opengis.feature.simple.SimpleFeature;
+import net.sf.saxon.BasicTransformerFactory;
+
/**
* A servlet transforming an XML view of the data to either FOP or PDF.
*/
Content content = session.get(path);
// dev only
- final boolean DEV = false;
+ final boolean DEV = true;
if (DEV) {
try (InputStream in = xslUrl.openStream()) {
Source xslSource = new StreamSource(in);
}
Source xmlInput = content.adapt(Source.class);
- XmlNormalizer.print(xmlInput,0);
+ XmlNormalizer.print(xmlInput, 0);
}
Source xmlInput = content.adapt(Source.class);
}
String p = href.startsWith("/") ? href : path + '/' + href;
+ p = URLDecoder.decode(p, StandardCharsets.UTF_8);
Content subContent = session.get(p);
return subContent.adapt(Source.class);
};
documentBuilderFactory.setXIncludeAware(true);
documentBuilderFactory.setNamespaceAware(true);
- // We must explicitly use the non-XSLTC transformer, as XSLTC is not working
- // with DocBook stylesheets
- transformerFactory = new TransformerFactoryImpl();
+ transformerFactory = new BasicTransformerFactory();
// transformerFactory = TransformerFactory.newDefaultInstance();
try {
String xslStr = LangUtils.get(properties, PROP_ARGEO_FO_XSL);