cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Glaser <>
Subject Re: 2 SQL queries
Date Tue, 14 Mar 2000 20:56:42 GMT
Simon Dueckert wrote:
> I have a problem processing 2 SQL queries in a row. My problem is that I 
> need to do a query and than take the result from this first query and 
> form another query out of it to perform a second query. 

> Any solutions? 

Yes, and I hope the cocoon community will not kill me.

Keep it simple and stupid, write the logic-sheet in XSL! The rmdms project
( tries to translate this concept into action.

Your logic-style-sheet may include something like:

<xsl:template name="fetch-list">
  <pl:variable name="list" document="$document">
    select name, id from from articles
  <xsl:apply-templates select="$list" mode="fetch-details"/>

<xsl:template match="articles/item" mode="fetch-details">
    <xsl:when test="@name='foo'">
      <xsl:call-templates name="emit-foo"/>
      <pl:variable name="parts" document="$document">
        select name from from parts where id = <xsl:value-of select="@id"/>
      <xsl:apply-templates select="$parts" mode="emit-part"/>

Rmdms is not usable yet. Database mapping is very rudimentary,
Xalan bindings are not finished and the demos don't separate
application logic and rendering. But it started just one month ago.

Regards, edwin

Edwin Glaser --

View raw message