Hi,

  I am using xdmp:xslt-eval() to evaluate an XSLT stylesheet
dynamically constructed in a query.  I can pass a global parameter
to the stylesheet by using a map.  But only when the parameter
name is in no namespace.  When the parameter name is in a
namespace, regarless whatever I try, I get the following error:

    XSLT-DEFAULTESAS: (err:XTDE0610) <xsl:param name="{ ns:p }"
    as="{ item()+ }"/> -- Invalid empty-sequence() default value
    coercion for variable or parameter: empty-sequence() as
    item()+

  What I tried is:

    declare namespace ns = "http://example.org/";;

    let $params := map:map()
    let $dummy  := map:put($params, "ns:p", "world")
    return
      xdmp:xslt-eval(
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                        xmlns:ns="http://example.org/";
                        version="2.0">
          <xsl:param name="ns:p" as="item()+"/>
          <xsl:template name="ns:main">
            <hello>
              <xsl:value-of select="$ns:p"/>
            </hello>
          </xsl:template>
        </xsl:stylesheet>,
        (),
        $params,
        <options xmlns="xdmp:eval">
          <template>ns:main</template>
        </options>)

  This example is self-complete and run in QConsole.

  What did I miss?

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to