Actions
Bug #3631
closedsaxon:next-in-chain does not work with Saxon 9.8.0.7 if I try to get an output property before I run the transformation
Start date:
2018-01-18
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:
Description
If I run the transformation with Saxon 9.8.0.7 using the code below, I get an exception:
The problem seems to be generated because I want to obtain the encoding from the transformer before I run the transformation. If I remove the line that gets the encoding "transformer.getOutputProperty("encoding");", the transformation works
<pre><code class="java">
String sourceID = "test.xml";
String xslID = "main.xsl";
// Create a transform factory instance.
TransformerFactoryImpl tfactory = new ProfessionalTransformerFactory();
// Create a transformer for the stylesheet.
Transformer transformer = tfactory.newTransformer(new StreamSource(xslID));
// Obtain the encoding
*String transformerEncoding = transformer.getOutputProperty("encoding");*
// Transform the source XML to System.out.
transformer.transform(new StreamSource(sourceID), new StreamResult(System.out));
Files
Please register to edit this issue
Actions