cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject [C2] Cocoon Error with LogicSheets!
Date Thu, 15 Mar 2001 16:44:01 GMT
Please help me with this issue, as I would really like to have
my logicsheet working.  The issue is this:

When I set up my logicsheet with the esql page directly, My XSP
works without a hitch:

<xsp:page
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xsp-request="http://apache.org/xsp/request"
  xmlns:session="http://apache.org/xsp/session"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
  <document>
	<esql:connection>
	  <esql:pool>ad-approval</esql:pool>
	  <esql:autocommit>false</esql:autocommit>
	  <esql:execute-query>
	    <esql:query>
	      SELECT * FROM TransactionView WHERE TransactionId =
	      <esql:parameter><session:get-attribute name="id"/></esql:parameter>
	    </esql:query>
	    <esql:results>
	      <esql:row-results>
	        <xsp:logic>
	          int statusId = <esql:get-int column="statusId"/>;
		  int transactionId = <esql:get-int column="transactionId"/>;
	        </xsp:logic>
                <transaction>
                  <xsp:attribute name="disposition"><xsp:expr>statusId</xsp:expr></xsp:attribute>
                  <name><esql:get-string column="name"/></name>
                  <image>transaction/<xsp:expr>transactionId</xsp:expr>.gif</image>
		  <description><esql:get-ascii column="description"/></description>
	        </transaction>
	      </esql:row-results>
	    </esql:results>
	  </esql:execute-query>
	</esql:connection>
  </document>
</xsp:page>

Please note, that I altered the query and column names so as not to violate
Disclosure agreements.

The problem is that when I move the complex <esql:connection> code into a
logic sheet, the ESQL logicsheet is not applied:


<xsp:page
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xsp-request="http://apache.org/xsp/request"
  xmlns:session="http://apache.org/xsp/session"
  xmlns:transaction="http://www.infoplanning.com/xsp/transaction"
>
  <document>
     <transaction:get-transaction dbpool="ap-pool">
       <xsp:attribute name="transaction-id"><session:get-attribute name="id"/></xsp:attribute>
     </transaction:get-transaction>
  </document>
</xsp:page>

This code properly detects my logicsheet, and applies the tags for XSP and TRANSACTION
namespaces properly, but completely misses out on the ESQL logicsheet producing code
like:

    int statusId = this.contentHandler.startPrefixMapping("xsp", "http://apache.org/xsp");
    this.contentHandler.startPrefixMapping("xsp-request", "http://apache.org/xsp/request");
    this.contentHandler.startPrefixMapping("session", "http://apache.org/xsp/session");
    this.contentHandler.startPrefixMapping("ad", "http://www.infoplanning.com/xsp/ad");
    this.contentHandler.startPrefixMapping("esql", "http://apache.org/cocoon/SQL/v2");
    xspAttr.addAttribute("", "column", "column", "CDATA", "statusId");

    this.contentHandler.startElement("http://apache.org/cocoon/SQL/v2",
                                     "get-int", "esql:get-int", xspAttr);
    xspAttr.clear();

    this.contentHandler.endElement("http://apache.org/cocoon/SQL/v2",
                                   "get-int", "esql:get-int");

    this.contentHandler.endPrefixMapping("xsp");
    this.contentHandler.endPrefixMapping("xsp-request");
    this.contentHandler.endPrefixMapping("session");
    this.contentHandler.endPrefixMapping("ad");
    this.contentHandler.endPrefixMapping("esql");
    ;

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


Mime
View raw message