xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Logicsheet and condition
Date Mon, 04 Nov 2002 16:43:21 GMT
Hi Jaroslav,

You will have better luck with your question on cocoon-users list. See
http://xml.apache.org/cocoon/mail-lists.html

Read also mail archives, somebody may be already answered your question:
http://xml.apache.org/cocoon/mail-archives.html

PS I personally would recommend you to study sources of one of the 
built-in logicsheets, for example request.xsl


Vadim


Kazmír, Jaroslav wrote:

>Hello all users,
>
>
>I have one easy example, which doesn't work. I look at it for a long time
>and I don't know if I made some
>Important mistake in codewriting or why id didn't work L
>
>I made a own logicsheet xsp-formfun like this:
><?xml version="1.0" encoding="ISO-8859-1"?>
>
> 
>
><xsl:stylesheet
>  version="1.0"
>  xmlns:xsp="http://apache.org/xsp"
>  xmlns:xsp-formfun="http://apache.org/xsp/form-function"
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  
>
> 
>  <xsl:variable name="prefix">xsp-formfun</xsl:variable>
> 
>  <xsl:template match="xsp:page">
>    <xsl:copy>
>      <xsl:apply-templates select="@*"/>
>      <xsl:apply-templates/>
>    </xsl:copy>
>  </xsl:template>
> 
>  <xsl:template match="xsp-formfun:check">
>   <xsl:variable name="tempname">
>     <xsl:copy-of select="name"/>
>   </xsl:variable>
> 
>   <xsl:choose>
>     <xsl:when test="normalize-space($tempname)='true'">
>         ONEtrue
>     </xsl:when>
>     <xsl:otherwise>
>         ONEfalse
>     </xsl:otherwise>
>   </xsl:choose>
> 
>  TEMPNAME:<xsl:copy-of select="$tempname"/>
>  </xsl:template>
> 
>  <!-- This template simply copies stuff that doesn't match other -->
>  <!-- templates and applies templates to any children.           -->
>
>  <xsl:template match="@*|node()" priority="-1">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|node()"/>
>    </xsl:copy>
>  </xsl:template>
> 
></xsl:stylesheet>
> 
> 
>In .XSP I have these lines:
>
>         <xsp-formfun:check>
>                <name><xsp-request:get-parameter name="visited"/></name>
>         </xsp-formfun:check>
> 
>And I know, that variable visibled has a true value, but by the calling
>xsp-formfun:check the both variables
>
>Name and also $tempname has also true value (I see it in the output window),
>but the contition is never passed - only the <xsl:otherwise> part.
>
>
>Do you know why and which type of mistake I did?
>
>Thanx a lot.
>
>Jaroslav Kazmir
>
> 
>
> 
>
>----------------------------------------------------------------------------
>-----------------
>
>  Jaroslav Kazmir
>  Institute of Information Systems & Information Management
>  JOANNEUM RESEARCH Forschungsgesellschaft mbH
>  Steyrergasse 17, A-8010 Graz, AUSTRIA
>
> 
>
>  phone:  +43-316-876-1140                 fax: +43-316-876-1191
>  web:    http://iis.joanneum.at
>  e-mail: mailto:jaroslav.kazmir@joanneum.at
>----------------------------------------------------------------------------
>-----------------
>  
>



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message