Exception during execution in Saxon-HE-9.5.1-6

Added by Vladimir Nesterovsky over 5 years ago

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:

<xsl:message select="t:string-join($items)"/>


<!-- Joins adjacent string items. $items - item to join. -->

<xsl:variable name="indices" as="xs:integer*" select="
      for $item in $items return
        $item instance of xs:string
  count($items) + 1"/>

<xsl:sequence select="
  for $i in 1 to count($indices) - 1 return
        $indices[$i] + 1,
        $indices[$i + 1] - $indices[$i] - 1



The output is:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at at at net.sf.saxon.expr.FilterExpression.iterate( at net.sf.saxon.expr.LetExpression.iterate( at at at net.sf.saxon.expr.instruct.Message.processLeavingTail( at net.sf.saxon.expr.instruct.Block.processLeavingTail( at net.sf.saxon.expr.instruct.Template.applyLeavingTail( at net.sf.saxon.trans.Mode.applyTemplates( at net.sf.saxon.Controller.transformDocument( at net.sf.saxon.Controller.transform( ...

Replies (3)

Please register to reply

RE: Exception during execution in Saxon-HE-9.5.1-6 - Added by Vladimir Nesterovsky over 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.

RE: Exception during execution in Saxon-HE-9.5.1-6 - Added by O'Neil Delpratt over 5 years ago

Hi Vldaimir, I think it best for you to look at a similar thread where a user asked about compressed version of the Saxon-HE jar file: #1897 (

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: i.e. Saxon-HE-9.5.1-6-compressed.jar


    Please register to reply