You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marco Spinetti <m....@pisa.iol.it> on 2000/10/17 11:43:24 UTC
XSP reserch problem:help me
I am an Italian student and have the following problem with my XSP.Nella Xsl page, I take some parameters sent by a WML page, I memorize them in two variables I use to do some researches in the Xml file.
The problem is that Xsl does not do the right research with these two variables, while if instead I use 2 values you fix in the variables ( instead of the taken values with " Request.getParameter()" ) the research works.
Please help me.
m.spinetti@pisa.iol.it
The XSL (+XSP) file is the following:
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<OROSCOPO>
<xsp:logic>
String scelta = request.getParameter("sceltau");
String segno = request.getParameter("segnou");
</xsp:logic>
<xsl:variable name="miascelta"><xsp:expr>scelta</xsp:expr></xsl:variable>
<xsl:variable name="miosegno"><xsp:expr>segno</xsp:expr></xsl:variable>
<SEGNO>
<xsp:expr>segno</xsp:expr>
</SEGNO>
<xsl:for-each select="child::Segno[Zodiaco/text()=$miosegno]">
<PRESO>
Siamo entrati:cerco
</PRESO>
<GENERALE>
<xsl:choose>
<xsl:when test="$miascelta='generale'">
<xsl:value-of select="./Generale/Descrizione"/>
</xsl:when>
<xsl:when test="$miascelta='amore'">
<xsl:value-of select="Aspetto[@code='Amore']/Descrizioneaspetto"/>
</xsl:when>
<xsl:when test="$miascelta='denaro'">
<xsl:value-of select="Aspetto[@code='Lavoro e Denaro']/Descrizioneaspetto"/>
</xsl:when>
<xsl:when test="$miascelta='fortuna'">
<xsl:value-of select="Aspetto[@code='Fortuna']/Descrizioneaspetto"/>
</xsl:when>
</xsl:choose>
</GENERALE>
</xsl:for-each>
</OROSCOPO>
</xsp:page>
</xsl:template>
</xsl:stylesheet>