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

p:xslt parameters and default namespaces

From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Date: Wed, 17 Aug 2011 12:36:19 +0200
Message-ID: <CAOCxfQc1U28Osh1wTradX1EH3e_2dHdJnR7rHofwrmEryH=8YQ@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Hi.

I've come across a curious behavior in p:xslt. Try this pipeline:

<?xml version="1.0" encoding="UTF-8"?>
<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" version="1.0" name="main"
xmlns="http://example.net/">
    <p:xslt>
        <p:input port="source">
            <p:inline>
                <doc/>
            </p:inline>
        </p:input>
        <p:with-param name="param-name" select="'param-value'"/>
        <p:input port="stylesheet">
            <p:inline>
                <xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" version="2.0">
                    <xsl:param name="param-name" required="yes"/>
                    <xsl:template match="/*">
                        <doc value="{$param-name}"/>
                    </xsl:template>
                </xsl:stylesheet>
            </p:inline>
        </p:input>
    </p:xslt>
</p:pipeline>

It gives out "Underlying exception: net.sf.saxon.trans.XPathException: No
value supplied for required parameter param-name".

However, if I remove the xmlns="http://example.net/", it gives out the
expected <doc value="param-value"/>.

I'm using Calabash 0.9.32, but I suspect that Saxon is the culprit...

Regards
Jostein
Received on Wednesday, 17 August 2011 10:37:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 August 2011 10:37:10 GMT