Vadim,
Thanks for the help. You're right, there is no <xsp:value-of>, I meant
<xsl:value-of>.
Right now I have report.xml which is called through the url like
domain.com/report.xml?id=100. This file includes report.xsl which chooses a
stylesheet based in the value of /page/report/@output. For now I'm just
working with <xsl:when
test="/page/report/@output='html'">xsl/html.xsl</xsl:when>
html.xsl contains:
Prevresult: <xsl:value-of select="prevresult"/>
Nextresult: <xsl:value-of select="nextresult"/>
According to all the documentation I have, this xsl:value-of tag should grab
the value of the <prevresult> and <nextresult> tags I have defined in
report.xml like:
###############################
<search-form>
<xsp:attribute
name="searchtype"><xsp:expr>re.getAttribute("searchtype")</xsp:expr></xsp:at
tribute>
<xsp:logic>
generateSearchForm(request, document, re,
(Element)xspCurrentNode);
</xsp:logic>
</search-form>
}
</xsp:logic>
</esql:connection>
<xsp:logic>
String next_move_string = "1";
String prev_move_string = "-1";
String uri = request.getRequestURI();
<xsp-request:set-paramter
name="move">next_move_string</xsp-request:set-paramter>;
String nextquery = request.getQueryString();
<xsp-request:set-paramter
name="move">prev_move_string</xsp-request:set-paramter>;
String prevquery = request.getQueryString();
// String nexturl = uri + nextquery;
// String prevurl = uri + prevquery;
String nexturl = "Next";
// just for testing
String prevurl = "Prev";
// just for testing
</xsp:logic>
<prevresult>
<xsp:expr>prevurl</xsp:expr>
</prevresult>
<nextresult>
<xsp:expr>nexturl</xsp:expr>
</nextresult>
</page>
</xsp:page>
###############################
In this report.xml file I have one <xsp:page> block, one <page> block,
several <xsp:logic> blocks and one <esql:connection> block. As you can see
from the above snippet, I have placed this particular <xsp:logic> block
outside of the <esql:connection> but inside both page blocks. Since
report.xml does not directly include html.xsl but rather has report.xsl call
it as a stylesheet, could this be the problem? Do I need to place this
somewhere else is the pipeline?
Again, thanks for the help. Please let me know if I can explain this
further.
-Matt MacDougall
-----Original Message-----
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 8:24 AM
To: [EMAIL PROTECTED]
Subject: Re: displaying values in a browser from <xsp:logic>
Matt MacDougall wrote:
>Hello,
>
>I'm having a problem getting the results of a Java function wrapped in
><xsp:logic> tags to display on my page. All I would like to do is display
>the value of the variables prevurl and nexturl on the page. This code
below
>is in an xsl file outside of the main template. I'm calling this template
>within my main one with <xsl:apply-templates select="prevnext"/>
>
>I have the following in an xsl file:
>
><xsl:template match="prevnext">
>
Matt,
Is this a logicsheet? How does relevant portions of your XSP file look
like? How does pipeline look like?
> <xsp:logic>
> String next_move_string = "1";
> String prev_move_string = "-1";
>
> String uri = request.getRequestURI();
>
> <xsp-request:set-paramter
>name="move">next_move_string</xsp-request:set-paramter>;
> String nextquery = request.getQueryString();
>
> <xsp-request:set-paramter
>name="move">prev_move_string</xsp-request:set-paramter>;
> String prevquery = request.getQueryString();
>
> String nexturl = uri + nextquery;
> String prevurl = uri + prevquery;
> nexturl = "Next";
>// just for testing
> prevurl = "Prev";
>// just for testing
> </xsp:logic>
> <xsp:expr>prevurl</xsp:expr>
> <xsp:expr>nexturl</xsp:expr>
></xsl:template>
>
>
>###################
>
>Shouldn't I be seeing the values between those <xsp:expr> tags? This is
>compiling fine but I only receive an empty output for the <prevresult> and
><nextresult> tags. I've tried several things including <xsp:value-of ...>
>
IIRC, there is no <xsp:value-of> tag exist.
Vadim
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>