You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeff Sallade <Je...@envworld.com> on 2003/03/31 01:16:41 UTC

SQLTransformer produces a blank page on complex query structure

(This relates to bug 17984)  I'm processing multiple queries in the same
transformation
step.  Everything works fine if the queries are all children of the same
parent or if all of
the queries are sequential.  In some cases, I need to process a different
structure such
as:

<root_query>
 <sub_query_1_level_1>
  <sub_query_1_level_2>
 <sub_query_2_level_1>
  <sub_query_2_level_2>

The cocoon 2.0.4 SQLTransformer produces a blank page for output on the
above
query structure.  I researched the problem enough to realize that the
SQLTransformer
does not even execute the queries because the current_query_index variable
never
gets back down to zero (which is the trigger for calling the executeQuery
method
from the end </execute_query> tag).

I have developed a solution that implements a current_query_level in
addition to
the current_query_index.  The index is used so that all of the queries can
be stored
in a vector.  The level is used to know when the root query end tag is
reached.  In
addition, the internal Query class has two new variables: nested_query_level
and 
parent_query_index.  These class variables are established when the query is
created and used to process ancestor values.

Since this is the first time I am contributing to Cocoon, I would like some
one more
familiar with the project to concur with the changes I am proposing.  My
change
involves 67 new lines and 8 changed lines, so it would be a patch.

Any volunteers for helping me with this?

Jeff Sallade