X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.app.servlet.publish%2Fsrc%2Forg%2Fargeo%2Fapp%2Fservlet%2Fpublish%2FFopServlet.java;h=b389883a23e6de2223cd17c9cc4cd88992502aa3;hb=c27369172d8f9724f73b0e6be692238931851211;hp=1ee19f0f58f23688c4b50d1d64dadb5ecf9a1a38;hpb=e615f8bcc753618520ee55506b7285b65bf264f4;p=gpl%2Fargeo-suite.git diff --git a/org.argeo.app.servlet.publish/src/org/argeo/app/servlet/publish/FopServlet.java b/org.argeo.app.servlet.publish/src/org/argeo/app/servlet/publish/FopServlet.java index 1ee19f0..b389883 100644 --- a/org.argeo.app.servlet.publish/src/org/argeo/app/servlet/publish/FopServlet.java +++ b/org.argeo.app.servlet.publish/src/org/argeo/app/servlet/publish/FopServlet.java @@ -35,7 +35,6 @@ import org.apache.fop.apps.FOPException; 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; @@ -51,6 +50,8 @@ import org.geotools.data.collection.ListFeatureCollection; 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. */ @@ -92,7 +93,7 @@ public class FopServlet extends HttpServlet { } Source xmlInput = content.adapt(Source.class); - XmlNormalizer.print(xmlInput,0); + XmlNormalizer.print(xmlInput, 0); } Source xmlInput = content.adapt(Source.class); @@ -131,6 +132,7 @@ public class FopServlet extends HttpServlet { } String p = href.startsWith("/") ? href : path + '/' + href; + p = URLDecoder.decode(p, StandardCharsets.UTF_8); Content subContent = session.get(p); return subContent.adapt(Source.class); }; @@ -191,9 +193,7 @@ public class FopServlet extends HttpServlet { 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);