Exception during execution in Saxon-HE-9.5.1-6
A while ago I already reported a problem "Saxon Exception during execution in Saxon-HE-9.5.1-2". Now I got similar exception in Saxon-HE-9.5.1-6.
Please consider the code:
<!-- Joins adjacent string items. $items - item to join. -->
<xsl:variable name="indices" as="xs:integer*" select=" 0, index-of ( ( for $item in $items return $item instance of xs:string ), false() ), count($items) + 1"/> <xsl:sequence select=" for $i in 1 to count($indices) - 1 return ( $items[$indices[$i]], string-join ( subsequence ( $items, $indices[$i] + 1, $indices[$i + 1] - $indices[$i] - 1 ), '' ) )"/>
The output is:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at net.sf.saxon.om.Chain.itemAt(Chain.java:161) at net.sf.saxon.om.SequenceTool.itemAt(SequenceTool.java:130) at net.sf.saxon.expr.FilterExpression.iterate(FilterExpression.java:1143) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:365) at net.sf.saxon.expr.instruct.BlockIterator.next(BlockIterator.java:49) at net.sf.saxon.expr.MappingIterator.next(MappingIterator.java:70) at net.sf.saxon.expr.instruct.Message.processLeavingTail(Message.java:264) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057) at net.sf.saxon.Controller.transformDocument(Controller.java:2088) at net.sf.saxon.Controller.transform(Controller.java:1911) ...
Please register to reply
Thanks, Vladimir. Please track this one here:
RE: Exception during execution in Saxon-HE-9.5.1-6 - Added by Vladimir Nesterovsky about 5 years ago
Another question (it might be worth to open a separate thread).
In latest releases you build saxon9he.jar without any compression. E.g. in the latest download its size ~10MB. If I just recompress it, its size goes down to <4MB.
Is there a reason in such packaging?
Please note that compressed jar might load a little bit faster, as it takes less I/O to map it into a memory.
Initially Mike responded as follows in comment 1:
@"Thanks for reporting it. The decision not to compress the JAR file was a deliberate one made many years ago in response to advice that this would improve start-up/loading time, which for typical Saxon use cases is more important than the speed of downloading the software from the network. We will review the decision to see whether this trade-off is still correct, or whether the reasoning is now different. Perhaps the fact that many people now download repeatedly using Maven makes a difference."@
As discussed further down in the thread we later decide to issue a compressed version of the Saxon-HE jar file on maven (see: https://saxonica.plan.io/issues/1897#note-13). i.e. Saxon-HE-9.5.1-6-compressed.jar
Please register to reply