cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels van Kampenhout" <n.vankampenh...@hippo.nl>
Subject Multiple ancestor queries on the same level not supported by SQLTransformer?
Date Tue, 22 Mar 2005 16:12:50 GMT
Is it possible to have more than one ancestor query in the input XML for the SQLTransformer?
I don't see any reason why it shouldn't be, but I cannot get it to work.

Example:

The query

<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <sql:execute-query>
    <sql:query name="person"> 
      select id, name, email, frequency from person; 
    </sql:query>
    <sql:execute-query>
      <sql:query name="themes"> 
        select theme
        from person_theme 
        where personid = <sql:ancestor-value sql:level="1" sql:name="person.id"/>;
      </sql:query>
    </sql:execute-query>
    <sql:execute-query>
      <sql:query name="types"> 
        select type 
        from person_type 
        where personid = <sql:ancestor-value sql:level="1" sql:name="person.id"/>;
      </sql:query>
    </sql:execute-query>
  </sql:execute-query>
</page>

returns

<page xmlns:sql="http://apache.org/cocoon/SQL/2.0"></page>

while

<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <sql:execute-query>
    <sql:query name="person"> 
      select id, name, email, frequency from person; 
    </sql:query>
    <sql:execute-query>
      <sql:query name="themes"> 
        select theme
        from person_theme 
        where personid = <sql:ancestor-value sql:level="1" sql:name="person.id"/>;
      </sql:query>
    </sql:execute-query>
  </sql:execute-query>
</page>

returns the result of the SQL queries as it should.

Is this functionality simply not supported by the SQLTransformer, or is my input XML incorrect?
Maybe I misinterpreted the meaning of the level attribute?

Niels

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message