I've found something similar to this in the mail archives, but couldn't
find a resolution.  I'm hoping someone knows what's going on and can
help me get on the right track.

Using Cocoon 2.0.2, I'm trying to nest an esql:group inside another
query, but it's causing very odd behavior -- specifically, it causes
the outer query to return the same row over and over again (on the
plus side, the inner query seems to do exactly the right thing).

Below is the XSP code and the sitemap entry.  If this is something
strange and buggy, I can provide the Java source that the XSP compiles
into.

----- the XSP ---------
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsp:page language="java" xmlns:xsp="http://apache.org/xsp";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";>
  
  <upcoming>
    <esql:connection>
      <esql:pool>mtg</esql:pool>
      <esql:execute-query>
        <esql:query>
          select id from shows order by year desc,season desc limit 4
        </esql:query> 
        <esql:results>
          <esql:row-results>
            <show>
              <id><esql:get-string column="id"/></id>
              <esql:execute-query>
                <esql:query>
                  select * from workers where
                  id='<xsp:expr><esql:get-string
                      column="id"/></xsp:expr>' order by staff
                </esql:query>
                <esql:results>
                  <esql:row-results>
                    <esql:group group-on="staff">
                      <xsp:element>
                        <xsp:param name="name"><esql:get-string
                            column="staff"/></xsp:param>
                        <esql:member>
                          <job/>
                        </esql:member>
                      </xsp:element>
                    </esql:group>
                  </esql:row-results>
                </esql:results>
              </esql:execute-query>
            </show>
          </esql:row-results>
        </esql:results>
      </esql:execute-query>
    </esql:connection>
  </upcoming>
</xsp:page>


-------- The Sitemap Entry ------
      <map:match pattern="db/test.xml">
        <map:generate type="serverpages" src="xsp/testing.xsp"/>
        <map:serialize type="xml"/>
      </map:match>





-- 
Stephen L. Peters                                  [EMAIL PROTECTED]
  PGP fingerprint: A1BF 5A81 03E7 47CE 71E0  3BD4 8DA6 9268 5BB6 4BBE
     "Poodle: The other white meat." -- Sherman, Sherman's Lagoon

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to