cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Stimmel <>
Subject Re: question about XSP namespace ordering
Date Mon, 10 Jul 2000 21:06:39 GMT
On Mon, Jul 10, 2000 at 04:43:09PM -0400, Donald Ball wrote:

> <foo:article>
>  <foo:id><request:get-parameter name="id"/></foo:id>
> </foo:article>
> where the foo namespace is processed by the logicsheet PI and the request
> namespace is processed automatically by the request namespace
> declaration. however, this doesn't work as expected since the foo
> namespace is processed before the request namespace.

It shouldn't matter what order they're processed in; the foo logicsheet
needs to copy the request tag to the output document, so that it
will still be available for the request logicsheet to handle. The
built-in logicsheets use a template called "get-nested-content" to
handle this:

    <xsl:call-template name="get-nested-content">
      <xsl:with-param name="content" select="foo:id"/>

  <xsl:template name="get-nested-content">
    <xsl:param name="content"/>
      <xsl:when test="$content/*">
        <xsl:apply-templates select="$content/*"/>
      <xsl:otherwise><xsl:value-of select="$content"/></xsl:otherwise>

View raw message