cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fo...@neonics.com
Subject Re: Variable xtp-taglib attributes
Date Mon, 08 Jan 2001 00:14:57 GMT


On Sun, 7 Jan 2001, Robin Green wrote:

> Forge <forge@neonics.com> wrote:
> >I want to do the following:
> >
> ><nsp:list-albums artist_id="x"/>
> >
> >where nsp is my taglib, and x is a variable number, passed as a parameter.
> 
> What does your taglib code look like?

Parts of it:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
   xmlns:nsp="http://www.neonics.com/2000/NSP/Core"
>
  
  <xsl:template match="xsp:page">

    <xsp:page>
      <xsl:copy>
        <xsl:apply-templates select="@*"/>
      </xsl:copy>
  
      <xsp:structure>

         <!-- some xsp:include tags -->

      </xsp:structure>

      <xsp:logic>
         <-- some java code, which works when put in a simple xsp page..-->

      </xsp:logic>

      <xsl:apply-templates/>

    </xsp:page>
  </xsl:template>


  <xsl:template match="nsp:list-albums">

<!-- this part has been just about anything ;)) -->
      <xsl:copy>
        <xsl:apply-templates select="@*|*"/>
      </xsl:copy>

   <xsp:expr>listAlbums("<xsl:value-of select="@artist_id"/>")</xsp:expr>

   <!-- the attribute is always empty -->

  </xsl:template>

  <xsl:template match="@*|*|text()|processing-instruction()">
    <xsl:copy>
      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>


Hope this is all you need ;)











> 
> 
> 
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 


Mime
View raw message