cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: xsl question
Date Sun, 25 Feb 2001 22:44:38 GMT
On Sun, 25 Feb 2001, Klaus Drechsler wrote:

> I have an xsp page looking something like that:
>
> <mytag:content>
> 	<mytag:bool>myObject.isTrue()</mytag:bool>
> 	<mytag:bool>yourObject.isTrue()</mytag:bool>
> 	...
> 	<mytag:ok>myObject.someMethod()</mytag:ok>
> 	<mytag:error>yourObject.someMethod()</mytag:error>
> </mytag:content>
>
> Now I want a Logicsheet, that takes all <bool>īs and checks if they are all
> "true", eg:
>
> if(myObject.isTrue()&yourObject.isTrue() ... ){
> 	myObject.someMethod();
> }else{
> 	yourObject.someMethod();
> }

<xsl:template match="mytag:content">
  <xsp:logic>
    if (true
    <xsl:for-each select="mytag:bool">
      &amp;&amp; <xsl:apply-templates select="."/>
    </xsl:for-each>
    ) {
      <xsl:apply-templates select="mytag:ok"/>
    } else {
      <xsl:apply-templates select="mytag:error"/>
    }
  </xsp:logic>
</xsl:template>

<xsl:template match="mytag:bool | mytag:ok | mytag:error">
  <xsl:apply-templates/>
</xsl:template>

- donald


Mime
View raw message