cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: How to use Taglibs in taglibs
Date Tue, 09 Jan 2001 18:14:39 GMT
due to a mistake in my local mail conf, i don't think this ever got sent

---------- Forwarded message ----------
Date: Tue, 9 Jan 2001 00:45:12 -0500 (EST)
From: Donald Ball <balld@webslingerZ.com>
To: Cocoon-Users <cocoon-users@xml.apache.org>, cparpart@surakware.com
Subject: Re: How to use Taglibs in taglibs

On Mon, 8 Jan 2001, Christian Parpart wrote:

> Hi
>
> I've tried to create a taglib wich uses the esql taglib.
> But it doesnt work in my way. What do I need?

use get-nested-string:

<xsl:template name="get-nested-string">
  <xsl:param name="content"/>
  <xsl:choose>
    <xsl:when test="$content/*">
      ""
      <xsl:for-each select="$content/node()">
        <xsl:choose>
          <xsl:when test="name(.)">
            + <xsl:apply-templates select="."/>
          </xsl:when>
          <xsl:otherwise>
            + "<xsl:value-of select="translate(.,'&#9;&#10;&#13;','   ')"/>"
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
      "<xsl:value-of select="normalize-space($content)"/>"
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template match="your:tag">
  <xsl:variable name="parameter"><xsl:call-template name="get-nested-string"><xsl:with-param
name="content" select="your:parameter"/></xsl:call-template></xsl:variable>
  ...
</xsl:template>

- donald



Mime
View raw message