RE: Using xpath "some $var in (...) satisfies (...)" bug with Calabash ?

Hi Matthieu,

Not quite sure Saxon 9.4 supports the 'some' syntax. But you don't really
need it. I'd write:

<xsl:template match="h:p[@h:class = ('intro-txt', 'txt-courant', 'normal',
'x08-00-texte-courant')]" mode="#all">
         <p><xsl:apply-templates select="@* except @h:class"/>
             <xsl:apply-templates/>
         </p>
</xsl:template>

By the way, are you sure the class attributes need the prefix? That is not
usual..

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: Matthieu Ricaud-Dussarget [mailto:matthieu.ricaud@igs-cp.fr]
Verzonden: maandag 27 augustus 2012 16:15
Aan: XProc Dev
Onderwerp: Using xpath "some $var in (...) satisfies (...)" bug with
Calabash ?

Hi all,

I'm trying to use such an Xpath expression in a XSLT transformation with
Calabash :

<xsl:template match="h:p[some $class in ('intro-txt', 'txt-courant',
'normal',  'x08-00-texte-courant') satisfies @h:class=$class]" mode="#all">
         <p><xsl:apply-templates select="@*[name()!='h:class']"/>
             <xsl:apply-templates/>
         </p>
</xsl:template>

I get this error :
Exception in thread "main" java.lang.AssertionError: Internal error:
invalid slot number for local variable (0)
         at
net.sf.saxon.expr.XPathContextMinor.setLocalVariable(XPathContextMinor.java:281)
         at
net.sf.saxon.expr.LetExpression.effectiveBooleanValue(LetExpression.java:409)
         at
net.sf.saxon.pattern.LocationPathPattern.internalMatches(LocationPathPattern.java:595)
         at
net.sf.saxon.pattern.LocationPathPattern.matchesBeneathAnchor(LocationPathPattern.java:487)
         at
net.sf.saxon.pattern.LocationPathPattern.matches(LocationPathPattern.java:458)
         at net.sf.saxon.trans.Mode.searchRuleChain(Mode.java:545)
         at net.sf.saxon.trans.Mode.getRule(Mode.java:451)
         at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1016)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:237)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:195)
         at
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:301)
         at
net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:455)
         at
net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:212)
         at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1032)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:237)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:195)
         at
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:301)
         at
net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:455)
         at
net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:212)
         at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1032)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:237)
         at
net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:199)
         at
net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:615)
         at
net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:131)
         at
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:301)
         at
net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:254)
         at
net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:212)
         at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1032)
         at
net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:58)
         at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1020)
         at net.sf.saxon.Controller.transformDocument(Controller.java:1957)
         at net.sf.saxon.Controller.transform(Controller.java:1803)
         at
net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:430)
         at com.xmlcalabash.library.XSLT.run(Unknown Source)
         at com.xmlcalabash.runtime.XAtomicStep.run(Unknown Source)
         at com.xmlcalabash.runtime.XPipeline.doRun(Unknown Source)
         at com.xmlcalabash.runtime.XPipeline.run(Unknown Source)
         at com.xmlcalabash.drivers.Main.run(Unknown Source)
         at com.xmlcalabash.drivers.Main.main(Unknown Source)

I'm using calabash_1.0.3-94.jar with saxon9he_9.4.0.2J.jar

Does someone already experiment this problem ?

Regards,
Matthieu.

--
Matthieu Ricaud
05 45 37 08 90
IGS-CP, service livres numériques

Received on Monday, 27 August 2012 15:34:59 UTC