Hi,
I am getting the following error being logged to System.err when trying to transform an XML Document using XSLTC ("org.apache.xalan.xsltc.trax.TransformerFactoryImpl").
mmiVerifyTpAndGetWorkSize: stack_height=2 should be zero; exit
mmiVerifyTpAndGetWorkSize: stack_height=2 should be zero; exit
mmiVerifyTpAndGetWorkSize: stack_height=2 should be zero; exit
...
The error message is getting output repeatedly (50 - 100 times). It appears that the transformation does occurr correctly. The problem is occurring when the Template is being used repeatedly (at least 20 times). The following code snippet produces the problem.
//Code snippet to execute timing tests using XSLTC.
long count = 30;
Source xslSource = new StreamSource(new CharArrayReader(xslDocument));
TransformerFactory factory = TransformerFactory.newInstance();
Templates template = factory.newTemplates(xslSource);
Transformer transformer = null;
ByteArrayOutputStream transformedOutput = null;
Document document = XMLCompareUtility.parse(xmlFile);
for (int i=0; i < count; i++)
{
transformedOutput = new ByteArrayOutputStream(65536);
transformer = template.newTransformer();
transformer.transform(new DOMSource(document), new StreamResult(transformedOutput));
}
I am using version 2.5.1 of Xalan J. The input document is about 140KB. When I reduce the input document size, the number of errors reduces, but doesn't go away entirely. The problem doesn't occur if I use the following code to assign the transformer object being used:
transformer = factor.newTransformer();
I am wanting to use Template so that I can share the compiled XSL stylesheet between multiple threads in my application.
The same XML document and XSL stylesheet (with the code snippet above) work fine using Template when using the interpreted version of Xalan ("org.apache.xalan.processor.TransformerFactoryImpl").
I would appreciate any feedback that can be offered.
Chris
=============================================== This e-mail is intended only for its addressee and may contain information that is privileged, confidential, or otherwise protected from disclosure. If you have received this communication in error, please notify us immediately by e-mail: [EMAIL PROTECTED], and delete the original message.
===============================================
