W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2011

Strange behavior involving (p:)resolve-uri, variables, attributes, calabash, oxygen, saxon, ...

From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Date: Wed, 7 Dec 2011 20:06:50 +0100
Message-ID: <CAOCxfQeJx99jJU_GPPypYBfVQjDox9Jx=y2-3Fv9Vr2=_gbVfA@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
I'm getting the error "Internal Saxon error: local variable encountered
whose binding has been deleted" in my pipeline, and have reduced the
problem into this pipeline (which I run using oXygen):

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step version="1.0" xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="

    <p:variable name="src" select="'http://example.net/img.jpg'"/>

    <!-- This fails. -->
    <p:variable name="test1" select="//*[p:resolve-uri(@href,/*/@xml:base)
= $src]/@xml:base">
            <c:file xml:base="http://example.net/img.jpg" href="img.jpg"/>

    <!-- This is ok. -->
    <p:variable name="test2" select="//*[resolve-uri(@href,/*/@xml:base) =
            <c:file xml:base="http://example.net/img.jpg" href="img.jpg"/>

    <!-- This is ok. -->
    <p:variable name="test3" select="//*[p:resolve-uri(@href,'
http://example.net/img.jpg') = $src]/@xml:base">
            <c:file xml:base="http://example.net/img.jpg" href="img.jpg"/>

    <!-- This is ok. -->
    <p:variable name="test4" select="//*[p:resolve-uri(@href,/*/@xml:base)
= 'img.jpg']/@xml:base">
            <c:file xml:base="http://example.net/img.jpg" href="img.jpg"/>

        <p:input port="source">


I've updated to the newest version of oXygen (XML Editor 13.1, build
2011112512), and tried replacing the included 0.9.37 version of
calabash.jar with the new 0.9.41 version to no avail. There's no error when
running vanilla calabash from the command line though (unless it's
invisible or something).

I've had some strange behavior with resolve-uri vs p:resolve-uri before
(but haven't bothered debugging it), so I'm normally sticking to always
using p:resolve-uri. In this case however, using resolve-uri works (test2),
while p:resolve-uri doesn't (test1). Removing the variable reference
(test4) or the /*/@xml:base reference (test3) from the XPath expression
also works though.

Is this a bug or am I missing something? If it's a bug, can anyone
reproduce it with Calabash, or is it an oXygen bug?

Received on Wednesday, 7 December 2011 19:07:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:01 UTC