<xsl:for-each select="//detailoption | //systemnotes">
<xsl:if test="normalize-space(@id)!=''">~</xsl:if>
</xsl:for-each>
This loops runs for short iterations. But when the iteration increases the entire XSL fails to transform and throw an error.
SystemId Unknown; Line #0; Column #0; java.lang.ArrayIndexOutOfBounds开发者_如何学PythonException
Is there any range limitations for variable data in XSL? Is there any solution to overcome this problem?
Xalan 2.7.0 . Is there any way to find the more details of it.
Our current coding is:TransformerFactory factory = TransformerFactory.newInstance();
factory.setURIResolver(createURIResolver());
Templates template = factory.newTemplates(xslIn);
Transformer xformer = template.newTransformer();
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
OutputStream hndWrite = byteStream;
Result result = new javax.xml.transform.stream.StreamResult(hndWrite);
xformer.transform(xmlIn, result)
I suggest you upgrade your Xalan to 2.7.1, and then try again. There had been several performance improvements and bugfixes. See the release notes on JIRA here:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10584&version=10863
See also some benchmarks I recently did. An average benchmark was 2x faster with Xalan 2.7.1, rather than with 2.7.0:
Java XPath (Apache JAXP implementation) performance
精彩评论