Here's the full xsl page (minus a little html to save space).  I've attached
the full report.xml file as well in case it is needed ... thanks again for
the help, this stuff was dumped in my lap and I'm obviously a newbie ;-)

-Matt

html.xsl
##############

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:xsp-request="http://apache.org/xsp/request/2.0";
        xmlns:xsp="http://www.apache.org/1999/XSP/Core";>

<xsl:import href="html-common.xsl"/>

        <!-- The default templates in "html-common.xsl" may be overridden
             by copying <template> elements from that file into this one,
                 and then modifying the HTML content of the copy. The page
                 element template is already pasted here as an example.
        -->


        <xsl:template match="page">

                <html>
                <head>
                <title><xsl:value-of select="/page/report/@name"/></title>
                <meta http-equiv="Content-Type" content="text/html; 
charset=iso-8859-1" />
                <link rel="stylesheet" type="text/css" href="/admin/css/global.css" />
                </head>

                <body bgcolor="#99CCCC" topmargin="0" leftmargin="10" rightmargin="10"
bottommargin="0" marginheight="0" marginwidth="0">
                <!-- body table -->
                <table width="730" bgcolor="669999" border="0" cellpadding="0"
cellspacing="0">
                <tr>
                <td class="black_copy"><b><i>Your search returned <xsl:value-of
select="/page/results/totals/@rowcount"/> results:</i></b></td>
                </tr>
                <xsl:apply-templates select="results"/>
                Prevresult: <xsl:value-of select="prevresult"/>
                Nextresult: <xsl:value-of select="nextresult"/>
                </body>
                </html>
        </xsl:template>


        <xsl:template match="results">
                <xsl:for-each select="table/row">
                        <xsl:variable name="row" select="."/>
                        <!-- spacer row -->
                        <tr><td><img src="/admin/images/spacer.gif" width="15" 
height="15"
/></td></tr>
                        <tr>
                        <td>
                        <!-- search result table -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                        <td valign="top" width="160">
                        <img
src="/servlets/FlexImage?f=/admin/uploads/{$row/col[@field='web_photo_xml']/
photo/@src}&amp;a=resize&amp;w=160&amp;h=113" width="160" height="113"/>
                        <br />
                        <div align="center" class="green_link"><b><a
href="/admin/webadmin/right.php?show_item[0]=view+item&amp;pagoda_id[0]={$ro
w/col[@field='pagoda_id']/text()}" class="green_link">details</a> |
                        <a href="results_wish_list.html" class="green_link">add to wish
list</a></b></div>
                        </td>
                        <!-- spacer -->
                        <td><img src="/admin/images/spacer.gif" alt="" width="8" 
height="8"
/></td>
                        <td valign="top">
                        <table border="0" width="100%" cellpadding="2" cellspacing="1">
                                <xsl:for-each 
select="/page/report/field-order/ordered-field">
                                        <xsl:variable name="ofid" select="@id"/>
                                        <xsl:variable name="field"
select="/page/report/fields/field[@id=$ofid]"/>
                                        <tr>
                                                <td width="100" bgcolor="#7EB1B1" 
class="black_copy"><xsl:value-of
select="$field/@title"/></td>
                                                <td bgcolor="#7EB1B1" 
class="white_copy"><xsl:apply-templates
select="$row/col[@field=$ofid]/node()"/></td>
                                        </tr>
                                </xsl:for-each>
                        </table>
                        <!-- end search result data table -->
                        </td>
                        <!-- spacer -->
                        <td><img src="/admin/images/spacer.gif" alt="" width="5" 
height="5"
/></td>
                        </tr>

                        </table>
                        <!-- end search result table -->

                </td>
                        </tr>
                </xsl:for-each>

</xsl:template>

</xsl:stylesheet>

-----Original Message-----
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 1:58 PM
To: [EMAIL PROTECTED]
Subject: Re: displaying values in a browser from <xsp:logic>


Matt MacDougall wrote:

>Vadim,
>
>Thanks for the help.  You're right, there is no <xsp:value-of>, I meant
><xsl:value-of>.
>

Where / how you are using XSL? All I see is XSP page. What's your sitemap?


>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>
>

How this XSL is coming into the picture?

Vadim



>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:a
t
>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]>
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="xsl/report.xsl" type="text/xsl"?>

<!--
  http://staging.pagodared.com/admin/reports/report.xml
  
  This document (report.xml) performs the following functions:
    * executes the report specified by the "id" CGI param.
-->

<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:xsp-request="http://apache.org/xsp/request/2.0";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";>

  <xsp:structure>
	  <xsp:include>org.apache.xerces.parsers.DOMParser</xsp:include>
	  <xsp:include>java.util.*</xsp:include>
  </xsp:structure>

  <xsp:logic><![CDATA[
    
    public String searchInput (HttpServletRequest request, Element field, String id) {
      String term = field.getAttribute("term");
      if ("fixed".equals(term)) return field.getAttribute(id);
      else return request.getParameter(field.getAttribute("id")+"-"+id);
    }
    
    public String fixedValue (HttpServletRequest request, Element field) {
      String type = field.getAttribute("type");
      if ("string".equals(type)||"boolean".equals(type)||"int".equals(type)||"float".equals(type)||"money".equals(type))
        return searchInput(request,field,type+"-value");
      else if ("date".equals(type)) {
        return searchInput(request,field,"date-month-value") + "-" + 
             searchInput(request,field,"date-day-value") + "-" + 
             searchInput(request,field,"date-year-value");
      }
      else if ("location".equals(type)) {
        String s = searchInput(request, field, "location-value");
        if ("en_route".equals(s)) return "En Route";
        else if ("warehouse".equals(s)) return "Warehouse";
        else if ("showroom".equals(s)) return "Showroom";
        else if ("gallery".equals(s)) return "Gallery";
        else if ("restoration".equals(s)) return "Restoration";
        else if ("storage".equals(s)) return "Storage";
      }
      else if ("status".equals(type)) {
        String s = searchInput(request, field, "status-value");
        if ("in_stock".equals(s)) return "In Stock";
        else if ("on_approval".equals(s)) return "On Approval";
        else if ("on_hold".equals(s)) return "On Hold";
        else if ("sold".equals(s)) return "Sold";
      }
      return "";
    }
    
    public String searchTerm(HttpServletRequest request, Element field) {
      String type = field.getAttribute("type");
      if ("string".equals(type)||"location".equals(type)||"status".equals(type)||"boolean".equals(type)) {
        String s = searchInput(request,field,type+"-value");
		if (isNull(s)) return null;
        return "LOCATE(UPPER('"+s+"'),UPPER(item."+field.getAttribute("id")+"))!=0";
      }
      else if ("int".equals(type)) {
        String id = field.getAttribute("id");
        String in1 = searchInput(request,field,"int-value1");
		if (isNull(in1)) return null;
        String in2 = searchInput(request,field,"int-value2");
		if (isNull(in2)) return null;
        return "(item."+ id + "<" + in2 + " AND item." + id + ">" + in1 + ")";
      }
      else if ("float".equals(type)) {
        String id = field.getAttribute("id");
        String in = searchInput(request,field,"float-value");
		if (isNull(in)) return null;
        String comparitor = searchInput(request,field,"float-comparitor");
        if ("eq".equals(comparitor)) {
          return "item."+ id + "=" + in;
        }
        else if ("lt".equals(comparitor)) {
          return "item."+ id + "<" + in;
        }
        else if ("gt".equals(comparitor)) {
          return "item."+ id + ">" + in;
        }
      }
      else if ("money".equals(type)) {
        String id = field.getAttribute("id");
        String in = searchInput(request,field,"money-value");
		if (isNull(in)) return null;
        String comparitor = searchInput(request,field,"money-comparitor");
        if ("eq".equals(comparitor)) {
          return "item."+ id + "=" + in;
        }
        else if ("lt".equals(comparitor)) {
          return "item."+ id + "<" + in;
        }
        else if ("gt".equals(comparitor)) {
          return "item."+ id + ">" + in;
        }
      }
      else if ("date".equals(type)) {
        String id = field.getAttribute("id");
		String dm = searchInput(request,field,"date-month-value");
		if (isNull(dm)) return null;
		String dd = searchInput(request,field,"date-day-value");
		if (isNull(dd)) return null;
		String dy = searchInput(request,field,"date-year-value");
		if (isNull(dy)) return null;
        String in = "'" + dm + "-" + dd + "-" + dy + "'";
        String comparitor = searchInput(request,field,"date-comparitor");
        if ("eq".equals(comparitor)) {
          return "item."+ id + "=" + in;
        }
        else if ("lt".equals(comparitor)) {
          return "item."+ id + "<" + in;
        }
        else if ("gt".equals(comparitor)) {
          return "item."+ id + ">" + in;
        }
      }
      return "ERROR: unknown type: " + type;
    }
    
    public void generateSearchForm(HttpServletRequest request, Document d, Element e, Element p) {
      NodeList l = e.getElementsByTagName("fields");
      for (int i=0; i<l.getLength(); i++) {
        NodeList l2 = ((Element)l.item(i)).getElementsByTagName("field");
        for (int j=0; j<l2.getLength(); j++) {
          Element field = (Element)l2.item(j);
          if ("yes".equals(field.getAttribute("search"))) {
            Element fcopy = (Element)XSPUtil.cloneNode(field, d);
            fcopy.setAttribute("fixed-value", fixedValue(request, fcopy));
            p.appendChild(fcopy);
          }
        }
      }
    }
    
    public boolean allSearchTermsAreFixed(Element e) {
      NodeList l = e.getElementsByTagName("fields");
      for (int i=0; i<l.getLength(); i++) {
        NodeList l2 = ((Element)l.item(i)).getElementsByTagName("field");
        for (int j=0; j<l2.getLength(); j++) {
          Element field = (Element)l2.item(j);
          if ("yes".equals(field.getAttribute("search"))) {
            if (!"fixed".equals(field.getAttribute("term"))) return false;
          }
        }
      }
      return true;
    }
    
	private void _scanReport(Element report, Hashtable h) {
      NodeList l = report.getElementsByTagName("fields");
      for (int i=0; i<l.getLength(); i++) {
        NodeList l2 = ((Element)l.item(i)).getElementsByTagName("field");
        for (int j=0; j<l2.getLength(); j++) {
          Element field = (Element)l2.item(j);
          h.put(field.getAttribute("id"), field);
        }
      }
	}
	
    public String fieldTitle(Hashtable h, String s) {
		try {
			Element f = (Element)h.get(s);
			return f.getAttribute("title");
		}
		catch (Exception e) {
			//throw new IllegalArgumentException("Field not found: " + s);
			return "";
		}
    }
    
    public boolean fieldVisible(Hashtable h, String s) {
		try {
			Element f = (Element)h.get(s);
			if ((s.equals(f.getAttribute("id")))&&
				("yes".equals(f.getAttribute("report"))))
				return true;
			else
				return false;
		}
		catch (Exception e) {
			//throw new IllegalArgumentException("Field not found: " + s);
			return false;
		}
    }
    
    public boolean totalVisible(Hashtable h, String s) {
		try {
			Element f = (Element)h.get(s);
        	if ((s.equals(f.getAttribute("id")))&&
            	("yes".equals(f.getAttribute("produce-total"))))
            	return true;
			else return false;
		}
		catch (Exception e) {
			//throw new IllegalArgumentException("Field not found: " + s);
			return false;
		}
    }
    
    public boolean isNull(String s) {
      return ((s==null)||(s.length()==0)||("NULL".equals(s.toUpperCase())));
    }
    
    public String getTextSize(Element report) {
      String ret = report.getAttribute("text-size");
      if ((ret == null) || ("".equals(ret))) ret = "11";
      try { Integer.parseInt(ret); } catch (NumberFormatException e) { ret = "11"; }
      return ret;
    }
    
	static String decode(String s) {
		if (s==null) return "";
		if ("".equals(s)) return s;
		try {
			return XSPUtil.formDecode(s);
		}
		catch (Exception e) { return ""; }
	}

	static DOMParser parser = new DOMParser();
	static Element decodeElement(String s) {
		if (s==null) return null;
		if ("".equals(s)) return null;
		try {
			s = XSPUtil.formDecode(s);
			parser.reset();
			parser.parse(new InputSource(new StringReader(s)));
			return parser.getDocument().getDocumentElement();
		}
		catch (Exception e) { return null; }
	}

  ]]></xsp:logic>


  <page>
    <esql:connection>
<!-- esql:pool>pagodaconnect</esql:pool -->
      <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
      <esql:dburl>jdbc:mysql://localhost/pagoda?user=goodfood=down178</esql:dburl>
      <esql:username>goodfood</esql:username>
      <esql:password>down178</esql:password>
      
      <xsp:logic>
        Element re = null;
        float height_total = 0;
        float width_total = 0;
        float depth_total = 0;
        float diameter_total = 0;
        float cost_total = 0;
        float price_total = 0;
        float reduced_price_total = 0;
        float shipping_cost_total = 0;
        float shipping_price_total = 0;
		Hashtable h = new Hashtable();
        <esql:execute-query>
          <esql:query>SELECT xml FROM reports WHERE id=<xsp:expr>request.getParameter("id")</xsp:expr></esql:query>
    <esql:use-limit-clause>auto</esql:use-limit-clause>
<!-- <esql:skip-rows>20</esql:skip-rows -->
    <esql:max-rows>10</esql:max-rows>
          <esql:results>
            <esql:row-results>
        <esql:previous-results>previous</esql:previous-results>
        <esql:more-results>next</esql:more-results>
              re = (Element)XSPUtil.cloneNode(<esql:get-xml column="xml"/>, document);
            </esql:row-results>
          </esql:results>
          <esql:error-results>
            <error><esql:to-string/></error>
          </esql:error-results>
        </esql:execute-query>

        re.setAttribute("id", request.getParameter("id"));
		
		_scanReport(re, h);
		
        xspCurrentNode.appendChild(re);
		
        // the following line needs work... it needs to use the report xml attribute if no cgi param is found.
        String searchtype = request.getParameter("searchtype");
		if ("all".equals(searchtype)) searchtype = "AND";
		else if ("any".equals(searchtype)) searchtype = "OR";
		else {
			searchtype=re.getAttribute("searchtype");
			if ("all".equals(searchtype)) searchtype = "AND";
			else if ("any".equals(searchtype)) searchtype = "OR";
			else searchtype = "OR";
		}
		
        String action = request.getParameter("action");
        
        if ("search".equals(action)||"preview".equals(action)||allSearchTermsAreFixed(re)) {
          String query = null;
          String limit = null;
	  String doquery = null;
          if ("preview".equals(action)) {
		  	<preview/>
            query = "SELECT * FROM item WHERE 1 LIMIT 0,2";
          }
          else {
				String page_string = request.getParameter("page");
				String move_string = request.getParameter("move");
				if (page_string == null)
				{ page_string = "0"; }
				if (move_string == null)
				{ move_string = "0"; }
				int page_int = Integer.parseInt(page_string);
				int move_int = Integer.parseInt(move_string);

				String page_size = "25";

				if (move_int > 0)
				{ page_int += 1; }
				else if (0 > move_int)
				{ page_int -= 1; }
				else
				{ page_int = 0; }

				int base_index_int = page_int * Integer.parseInt(page_size);

				String base_index_string = String.valueOf(base_index_int);

            query = "SELECT * FROM item WHERE ";
				limit = " LIMIT " + base_index_string + "," + page_size;
            NodeList l = re.getElementsByTagName("fields");
            for (int i=0; i&lt;l.getLength(); i++) {
              NodeList l2 = ((Element)l.item(i)).getElementsByTagName("field");
              boolean first = true;
              for (int j=0; j&lt;l2.getLength(); j++) {
                Element field = (Element)l2.item(j);
                if ("yes".equals(field.getAttribute("search"))) {
				  String term = searchTerm(request, field);
				  if (term != null) {
                	if (first) {
                     query = query + term;
			doquery = query + limit;  
            //   query = query + term;
		       first = false;
                	}
                	else {
                      query = query + " " + searchtype  + " " + term;
			doquery = query + limit;
            //    	query = query + " " + searchtype  + " " + term;
			}
				  }
                }
              }
            }
          }
          
          int rowcount = 0;
		  		  
          <results>
            
            <xsp:attribute name="preview"><xsp:expr>"preview".equals(action)</xsp:expr></xsp:attribute>
            <xsp:attribute name="text-size"><xsp:expr>getTextSize(re)</xsp:expr></xsp:attribute>
			
            <esql:execute-query>
              <esql:query><xsp:expr>doquery</xsp:expr></esql:query>
              <esql:results>
			  				  
                <table>
                <esql:row-results>
				  <xsp:logic>rowcount++;</xsp:logic>
                  <row>

                    <col field="name"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"name")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"name")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="name"/>)</xsp:expr></col>
                    <col field="description"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"description")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"description")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="description"/>)</xsp:expr></col>
                    <col field="pagoda_id"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"pagoda_id")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"pagoda_id")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="pagoda_id"/>)</xsp:expr></col>
                    <col field="alternate_id"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"alternate_id")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"alternate_id")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="alternate_id"/>)</xsp:expr></col>
                    <col field="age"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"age")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"age")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="age"/>)</xsp:expr></col>
                    <col field="origin"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"origin")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"origin")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="origin"/>)</xsp:expr></col>
                    <col field="height"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"height")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"height")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"height")</xsp:expr></xsp:attribute><esql:get-string column="height"/></col>
                    <col field="width"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"width")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"width")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"width")</xsp:expr></xsp:attribute><esql:get-string column="width"/></col>
                    <col field="depth"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"depth")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"depth")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"depth")</xsp:expr></xsp:attribute><esql:get-string column="depth"/></col>
                    <col field="diameter"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"diameter")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"diameter")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"diameter")</xsp:expr></xsp:attribute><esql:get-string column="diameter"/></col>
                    <col field="appear_on_web"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"appear_on_web")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"appear_on_web")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"appear_on_web")</xsp:expr></xsp:attribute><esql:get-string column="appear_on_web"/></col>
                    <col field="get_more_in_china"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"get_more_in_china")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"get_more_in_china")</xsp:expr></xsp:attribute><esql:get-string column="get_more_in_china"/></col>
                    <col field="attention_betsy"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"attention_betsy")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"attention_betsy")</xsp:expr></xsp:attribute><esql:get-string column="attention_betsy"/></col>
                    <col field="warehouse_special_care"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"warehouse_special_care")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"warehouse_special_care")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="warehouse_special_care"/>)</xsp:expr></col>

                    <xsp:logic>
                      if (isNull(<esql:get-string column="category_xml"/>)) {
                        <xsp:content><col field="category_xml"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"category_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"category_xml")</xsp:expr></xsp:attribute></col></xsp:content>
                      }
                      else {
                        <xsp:content><col field="category_xml"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"category_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"category_xml")</xsp:expr></xsp:attribute><xsp:expr>decodeElement(<esql:get-string column="category_xml"/>)</xsp:expr></col></xsp:content>
                      }
                    </xsp:logic>
					
                    <xsp:logic>
                      if (isNull(<esql:get-string column="materials_xml"/>)) {
                        <xsp:content><col field="materials"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"materials_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"materials_xml")</xsp:expr></xsp:attribute></col></xsp:content>
                      }
                      else {
                        <xsp:content><col field="materials"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"materials_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"materials_xml")</xsp:expr></xsp:attribute><xsp:expr>decodeElement(<esql:get-string column="materials_xml"/>)</xsp:expr></col></xsp:content>
                      }
                    </xsp:logic>

                    <col field="item_price"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"item_price")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"item_price")</xsp:expr></xsp:attribute><xsp:attribute name="total-visible"><xsp:expr>totalVisible(h,"item_price")</xsp:expr></xsp:attribute><esql:get-string column="item_price"/></col>

                    <xsp:logic>
                      if (isNull(<esql:get-string column="web_photo_xml"/>)) {
                        <xsp:content><col field="web_photo_xml" visible="true"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"web_photo_xml")</xsp:expr></xsp:attribute><photo src="no_photo.gif"/></col></xsp:content>
                      }
                      else {
                        <xsp:content><col field="web_photo_xml" visible="true"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"web_photo_xml")</xsp:expr></xsp:attribute><xsp:expr>decodeElement(<esql:get-string column="web_photo_xml"/>)</xsp:expr></col></xsp:content>
                      }
                    </xsp:logic>

                    <col field="current_item_location"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"current_item_location")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"current_item_location")</xsp:expr></xsp:attribute><esql:get-string column="current_item_location"/></col>
                    <col field="expected_arrival"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"expected_arrival")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"expected_arrival")</xsp:expr></xsp:attribute><esql:get-string column="expected_arrival"/></col>
                    <col field="actual_arrival"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"actual_arrival")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"actual_arrival")</xsp:expr></xsp:attribute><esql:get-string column="actual_arrival"/></col>
                    <col field="warehouse_priority"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"warehouse_priority")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"warehouse_priority")</xsp:expr></xsp:attribute><esql:get-string column="warehouse_priority"/></col>
                    <col field="warehouse_priority_note"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"warehouse_priority_note")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"warehouse_priority_note")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="warehouse_priority_note"/>)</xsp:expr></col>
                    <col field="damaged"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"damaged")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"damaged")</xsp:expr></xsp:attribute><esql:get-string column="damaged"/></col>
                    <col field="restoration_room_date"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"restoration_room_date")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"restoration_room_date")</xsp:expr></xsp:attribute><esql:get-string column="restoration_room_date"/></col>
                    <col field="restoration_room_note"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"restoration_room_note")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"restoration_room_note")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="restoration_room_note"/>)</xsp:expr></col>
                    <col field="storage_location"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"storage_location")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"storage_location")</xsp:expr></xsp:attribute><xsp:expr>decode(<esql:get-string column="storage_location"/>)</xsp:expr></col>
                    <col field="date_in_storage"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"date_in_storage")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"date_in_storage")</xsp:expr></xsp:attribute><esql:get-string column="date_in_storage"/></col>
                    <col field="approx_date_out_storage"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"approx_date_out_storage")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"approx_date_out_storage")</xsp:expr></xsp:attribute><esql:get-string column="approx_date_out_storage"/></col>
                    <col field="storage_paid"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"storage_paid")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"storage_paid")</xsp:expr></xsp:attribute><esql:get-string column="storage_paid"/></col>
                    <col field="current_item_status"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"current_item_status")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"current_item_status")</xsp:expr></xsp:attribute><esql:get-string column="current_item_status"/></col>
                    <col field="approval_through"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"approval_through")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"approval_through")</xsp:expr></xsp:attribute><esql:get-string column="approval_through"/></col>
                    <col field="approval_comments"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"approval_comments")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"approval_comments")</xsp:expr></xsp:attribute><esql:get-string column="approval_comments"/></col>
                    <col field="hold_through"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"hold_through")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"hold_through")</xsp:expr></xsp:attribute><esql:get-string column="hold_through"/></col>

                    <xsp:logic>
                      if (isNull(<esql:get-string column="comments_xml"/>)) {
                        <xsp:content><col field="comments_xml"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"comments_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"comments_xml")</xsp:expr></xsp:attribute></col></xsp:content>
                      }
                      else {
                        <xsp:content><col field="comments_xml"><xsp:attribute name="title"><xsp:expr>fieldTitle(h,"comments_xml")</xsp:expr></xsp:attribute><xsp:attribute name="visible"><xsp:expr>fieldVisible(h,"comments_xml")</xsp:expr></xsp:attribute><xsp:expr>decodeElement(<esql:get-string column="comments_xml"/>)</xsp:expr></col></xsp:content>
                      }
                    </xsp:logic>

                    <xsp:logic>
                      height_total += <esql:get-float column="height"/>;
                      width_total += <esql:get-float column="width"/>;
                      depth_total += <esql:get-float column="depth"/>;
                      diameter_total += <esql:get-float column="diameter"/>;
                      cost_total += <esql:get-float column="item_cost"/>;
                      price_total += <esql:get-float column="item_price"/>;
                      reduced_price_total += <esql:get-float column="reduced_price"/>;
                      shipping_cost_total += <esql:get-float column="shipping_cost"/>;
                      shipping_price_total += <esql:get-float column="shipping_price"/>;
                    </xsp:logic>
                  </row>
                </esql:row-results>
                </table>
              </esql:results>
              <esql:error-results>
                <error><esql:to-string/></error>
              </esql:error-results>
            </esql:execute-query>
            <totals>
			  <xsp:attribute name="rowcount"><xsp:expr>rowcount</xsp:expr></xsp:attribute>
              <total field="height"><xsp:expr>height_total</xsp:expr></total>
              <total field="width"><xsp:expr>width_total</xsp:expr></total>
              <total field="depth"><xsp:expr>depth_total</xsp:expr></total>
              <total field="diameter"><xsp:expr>diameter_total</xsp:expr></total>
              <total field="item_price"><xsp:expr>price_total</xsp:expr></total>
            </totals>
          </results>
		  
          <!--error><xsp:expr>query</xsp:expr></error-->
        }
        else {
          <search-form>
            <xsp:attribute name="searchtype"><xsp:expr>re.getAttribute("searchtype")</xsp:expr></xsp:attribute>
            <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>

---------------------------------------------------------------------
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]>

Reply via email to