cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leona Slepetis <LSlepe...@alliancetech.com>
Subject storing result of <esql:get-xml>
Date Mon, 02 May 2005 18:18:00 GMT
Hi.

I am hoping that there is a way to retrieve HTML stored in a DB2 database
with <esql:get-xml>, and use the value in several places later in my xsp
page.

The documentation says that the value of the given column is interpreted as
an XML fragment, which is parsed by the xsp parser and the document element
is returned. Can I assign this to a variable of some type and get its value
by some accessor method to insert the HTML into my output?

The only way I have been able to get the results I want it to run the query
at each place I want the output, and that is very inefficient.

I have:
...
<TABLE>
  <TR>
    <esql:execute-query>
      <esql:query>
        select text
        from sur_response
      </esql:query>
      <esql:results>
        <esql:row-results>
          <TD><esql:get-xml column="text"/></TD>
        </esql:row-results>
      </esql:results>
    </esql:execute-query>
  </TR>
  <TR> ... some other queries go here ... </TR>
  <TR>
    <esql:execute-query>
      <esql:query>
        select text
        from sur_response
      </esql:query>
      <esql:results>
        <esql:row-results>
          <TD><esql:get-xml column="text"/></TD>
        </esql:row-results>
      </esql:results>
    </esql:execute-query>
  </TR>
</TABLE>
...

I would like: (what is the type of myVar?)
...
<esql:execute-query>
  <esql:query>
    select text
    from sur_response
  </esql:query>
  <esql:results>
    <esql:row-results>
      <xsp:logic>
        myVar = <esql:get-xml column="text"/>;
      </xsp:logic>
    </esql:row-results>
  </esql:results>
</esql:execute-query>
<TABLE>
  <TR>
    <TD><xsp:expr>myVar</xsp:expr></TD>
  </TR>
  <TR> ... some other queries go here ... </TR>
  <TR>
    <TD><xsp:expr>myVar</xsp:expr></TD>
  </TR>
</TABLE>
...

Thanks,
Leona


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


Mime
View raw message