erating PDF file
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.Trans
formerException: org.xml.sax.SAXException : Missing or incorrect XSLT Namespace.
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
ormerFactoryImpl.java:807)
at com.kroger.accounting.ad.reports.PDFReport.generate(PDFReport.java :96
)
at com.kroger.accounting.ad.view.reports.PDFServlet.generateReport(PDFSe
rvlet.java:80)
at com.kroger.accounting.ad.view.reports.PDFServlet.doGet(PDFServlet.jav
a:70)
public OutputStream generate() throws Exception {
InputStream xslInputStream = null;
log.info("PDFReport.generate(): url ="" + xslUrl + ">");
if (xslUrl != null) {
xslInputStream = xslUrl.openStream();
} else {
xslInputStream = new FileInputStream(xslFile);
}
// transform xml + xsl => xslt
TransformerFactory tf = TransformerFactory.newInstance();
log.info("PDFReport source url for TransformerFactory: " + tf.getClass().getProtectionDomain().getCodeSource());
Templates xslTemplate = tf.newTemplates(new StreamSource(xslInputStream));
XSL Snippet (with Namespaces defined):
<?
xml version="1.0" encoding ="UTF-8"?><
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo ="http://www.w3.org/1999/XSL/Format"> <xsl:attribute-set name="table" ><xsl:attribute name= "font-size">8pt</xsl:attribute> </xsl:attribute-set><xsl:template match="/"><fo:root xmlns:fo=" http://www.w3.org/1999/XSL/Format">
The xsl doesn't use anything but the fo and xsl prefixes.
Can anyone tell me what the environment change is that could cause the creationn of a new template to fail with the above exception?
Thanks,
John
