Bug #4563
closedReuse of Xslt30Transformer causes wrong results (namespace)
100%
Description
Saxon EE 9.8.0.15
If Xslt30Transformer is reused it seems the result of the XSL output changes.
Let me go into more detail: We see this issue with different XSLs but picked one for the reproducible. The XSL removes the namespace from all but the root node.
We have two different input XMLs. The second with namespaces XML1. One without any namespace XML2.
If the Transformer processes the XML2 first and then XML1. The result will be without ANY namespace. It should keep the namespace on root node.
If the Transformer processes the XML1 first and then XML2 and then XML1 again. The result of the first and last transformation will be WITH a namespace on the root node.
Customer uses Java 7 but I reproduced it with Java 8.
This is blocking the customer upgrade project.
Attached is a reproducible. Simply run test01632275.java. The result on stdout is the XML output of the XSL. Line 57 is where you can change which XML to run first.
// will cause all output be without any namespace --> WRONG
// if(i==0) {
// will cause all output 1 and 3 to be with namespace on root node --> CORRECT
// if(i==1) {
if (i == 0) {
xml = xml2;
} else {
xml = xml1;
}
Files
Please register to edit this issue