You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by André Schmidt <as...@medicare-online.de> on 2000/11/11 02:40:16 UTC

[C2] esql:get-xml broken

Maybe I'm blind here, but the esql:get-xml is broken in the actual cvs, so
maybe s/o can tell me how to modify the following to get it back working:

 <xsp:expr>this.xspParser.parse(new InputSource(new
StringReader(<xsl:copy-of
select="$content"/>))).getDocumentElement()</xsp:expr>

TIA

-André


Re: HELP C1.8 / esql.xsl v1.26

Posted by Donald Ball <ba...@webslingerZ.com>.
On Sat, 11 Nov 2000, Herbert Hotz wrote:

> Hi Donald, hi all,
> 
> I'm trying to use esql.xsl v1.26. What's wrong with the following lines?
> The Compiler complains with an ugly error message. See attachment.

simple xpath expression error. i checked in a fix. thanks for the tip.

- donald


HELP C1.8 / esql.xsl v1.26

Posted by Herbert Hotz <he...@symmetrix.ch>.
Hi Donald, hi all,

I'm trying to use esql.xsl v1.26. What's wrong with the following lines?
The Compiler complains with an ugly error message. See attachment.

Please help!


<?xml version="1.0" ?>

<!--
==========================================================================

 should work with esql.xsl v1.26
 xml-logicsheet href="/sr/esql.xsl"
 turbine-pool.jar v1.4

==========================================================================
-->

<?cocoon-process type="xsp"?>   <!-- the xsp processor parses this document
                                     and generates a java program, called a
                                     producer, which after compiling, produces
                                     the DOM document and passes this to the
                                     next processing unit -->

<?cocoon-process type="xslt"?>  <!-- set this line as comment to see the output
                                     of the xsp processor -->

<!--?xml-logicsheet href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?-->
<?xml-logicsheet href="/sr/esql.xsl.v1.26"?>

<?xml-stylesheet href="db_test.xsl" type="text/xsl"?>

<xsp:page
 language="java"
 xmlns:xsp="http://www.apache.org/1999/XSP/Core"
 xmlns:esql="http://apache.org/cocoon/SQL/v2"
>

 <page title="db test esql.xsl v1.26">
  <xsp:logic>
   String
    driver = "....",
    dburl  = "....",
    user   = "....",
    pw     = "....",
    sql    = "SELECT RatesId, Rifname FROM RatesInfo WHERE RatesId &lt; ?";
   int lim = 15;
  </xsp:logic>

 <esql:connection>

  <esql:driver><xsp:expr>driver</xsp:expr></esql:driver>
  <esql:dburl><xsp:expr>dburl</xsp:expr></esql:dburl>
  <esql:username><xsp:expr>user</xsp:expr></esql:username>
  <esql:password><xsp:expr>pw</xsp:expr></esql:password>

  <esql:execute-query>
   <esql:query><xsp:expr>sql</xsp:expr>
    <esql:parameter type="Int"><xsp:expr>lim</xsp:expr></esql:parameter>
   </esql:query>

   <esql:results>
    <RatesInfoTable>
     <esql:row-results>
      <RatesInfo>
       <RatesId><esql:get-string column="RatesId"/></RatesId>
       <Rifname><esql:get-string column="Rifname"/></Rifname>
      </RatesInfo>
     </esql:row-results>

     <esql:no-results>
      <error>no results were found</error>
     </esql:no-results>

    </RatesInfoTable>
   </esql:results>

   <esql:error-results>
    <error-results>
     <message><esql:get-message/></message>
     <stacktrace><esql:get-stacktrace/></stacktrace>
    </error-results>
   </esql:error-results>

  </esql:execute-query>

 </esql:connection>

 </page>

</xsp:page
--
+----------------------+-------------------------------------------+
| Herbert Hotz         | Voice:   +41 1 381 8880                   |
| Symmetrix AG         | Fax:     +41 1 381 2127                   |
| Muehle Tiefenbrunnen | GSM-SMS: +41 79 402 5704                  |
| Seefeldstrasse 231   | URL:     http://www.symmetrix.ch/         |
| CH-8008 Zurich       | E-Mail:  mailto:herbert.hotz@symmetrix.ch |
+----------------------+-------------------------------------------+


Re: [C2] esql:get-xml broken

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 10 Nov 2000, [iso-8859-1] Andr� Schmidt wrote:

> Maybe I'm blind here, but the esql:get-xml is broken in the actual cvs, so
> maybe s/o can tell me how to modify the following to get it back working:
> 
>  <xsp:expr>this.xspParser.parse(new InputSource(new
> StringReader(<xsl:copy-of
> select="$content"/>))).getDocumentElement()</xsp:expr>

it's not immediately obvious to me how to fix it. the xspParser object
does not exist in c2, nor does the xsp layer operate on dom objects. this
method needs to be rewritten to use the c2 parser and insert the new
document's sax events (or some subset thereof) into the xsp sax
stream. suggestions are highly welcome; i doubt it's something i'll have
time to investigate in the near future.

- donald