cocoon-dev 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 Thu, 24 Mar 2005 08:56:28 GMT
[I posted this on the user list yesterday, but since no one replied I try it here too...]

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

Mime
View raw message