Page 1 of 1

Issue with collection function on zip archives

Posted: Tue Nov 13, 2018 12:52 am
by oyvindlg
In <oXygen/> XML Editor 20.1, build 2018101517 I get the following error when running Xpath builder on

Code: Select all

(count(for $x in collection('/home/oyvind/repos/sef/xsl/test/dummy1.zip?select=*') return $x))
) , or transformation with inline stylesheet.

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
exclude-result-prefixes="xs math"
version="3.0">
<xsl:template name"collection">
<xsl:value-of select="count(for $x in collection('/home/oyvind/repos/sef/xsl/test/dummy1.zip?select=*') return $x)"/>
</xsl:template>
</xsl:stylesheet>

Code: Select all

ro.sync.xml.xpath.g: java.lang.VerifyError: (class: net/sf/saxon/resource/JarCollection$JarIterator, method: advance signature: ()V) Stack size too large
at ro.sync.xml.xpath.f.mb(Unknown Source)
at ro.sync.xml.xpath.f.hb(Unknown Source)
at ro.sync.xml.xpath.f.ob(Unknown Source)
at ro.sync.exml.editor.xmleditor.i.n.rcs(Unknown Source)
at ro.sync.exml.editor.xmleditor.i.n.ucs(Unknown Source)
at ro.sync.exml.editor.xmleditor.i.n.ads(Unknown Source)
at ro.sync.exml.editor.xmleditor.i.n.ics(Unknown Source)
at ro.sync.exml.editor.xmleditor.i.n$1.cud(Unknown Source)
at ro.sync.ui.application.nb.run(Unknown Source)
Caused by: java.lang.VerifyError: (class: net/sf/saxon/resource/JarCollection$JarIterator, method: advance signature: ()V) Stack size too large
at net.sf.saxon.resource.JarCollection.getResources(JarCollection.java:193)
at net.sf.saxon.functions.CollectionFn.getSequenceIterator(CollectionFn.java:147)
at net.sf.saxon.functions.CollectionFn.call(CollectionFn.java:239)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:547)
at net.sf.saxon.expr.parser.Evaluator$5.evaluate(Evaluator.java:101)
at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:448)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:545)
at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:177)
at net.sf.saxon.s9api.XPathSelector.iterator(XPathSelector.java:208)
at ro.sync.xml.xpath.f.nb(Unknown Source)
at ro.sync.xml.xpath.f.s(Unknown Source)
... 9 more
If I download the 9.9 addon, the stylesheet runs successfully. I also downloaded Saxon HE 9.8 12 from maven and it runs from command line where I'm not able to reproduce the issue. However I get the same error when I try running the bundled saxon9EE.jar from command line. Running Oxygen from Fedora.

Re: Issue with collection function on zip archives

Posted: Tue Nov 13, 2018 6:03 pm
by adrian
Hello,

This seems to be a Saxon 9.8 bug. I can reproduce it in the command line with 9.8.0.15, but not with 9.9.0.2.
I've also found it mentioned here:
https://www.biglist.com/lists/lists.mul ... 00059.html
I could not find a bug logged on the Saxon bug tracker, but it seems to have been fixed (maybe as a side effect) in 9.9.

Regards,
Adrian