cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bartlomiej Pater" <nos...@budweiser.com>
Subject Re: Using output from XSP in XSL condition instructions
Date Wed, 01 Nov 2000 16:51:55 GMT
On Wed, 01 Nov 2000 12:22:25 GMT Robin Green >It's very simple.
>
>It all depends on the order you specify your processing instructions in. So 
>any XSL which needs to process the results of XSP, must go in a 
>logic/stylesheet that is applied AFTER XSP.
>
Thanks for your reply, but the problem is more complicated... I forgot to mention that I'd
like to use output of XSP function in the same logicsheet. Is it possible at all?

For better understanding of the situation, here is template of the logicsheet I am using:


<xsl:template match="xsp:page">
  <xsp:page>
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
    </xsl:copy>
    <xsp:structure>
       //some includes here
    </xsp:structure>
    <xsp:logic>
       String some_nice_function() {
         return "aaaa";
       }
    </xsp:logic>
    <xsl:apply-templates/>
  </xsp:page>
</xsl:template>

<xsl:template match="cooltag">
  <xsp:expr>some_nice_function<xsp:expr>
</xsl:template>

<xsl:template match="anothercooltag">
  <xsl:choose>
     <xsl:when test="@importantparameter">
        //do something
     </xsl:when>
     <xsl:when test=[value of the 'some_nice_function' == "string"]>
        //do sth else
     </xsl:when>
     <xsl:otherwise>
        //do sth completly different
     </xsl:otherwise>
  </xsl:choose>
</xsl:template>


>Alternatively you could use a Java if statement instead of xsl:choose, for 
>example.
>
Everytime I try to output something in the body of <xsp:logic> tag i got a lot of errors
in type of "xsp node not found" or similiar. I guess I must be doing something wrong, but
I don't know what ;)


_________________________________________________________________
Get your FREE Budweiser E-mail account at http://budweiser.com
Budweiser E-Mail must be used responsibly and only is for consumers 21 years of age and older!
 
 

Disclaimer: Neither Anheuser-Busch, Inc. (the makers of BUDWEISER beer) nor the operator of
this E-Mail service or their respective affiliates have seen, endorsed or approved any of
the content in this e-mail and expressly disclaim all liability for the content in whole and
in part.

Mime
View raw message