You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Rob Parker <ro...@webcybernetics.com> on 2000/06/21 05:12:24 UTC

Re: SQLFilter: Not expecting an end value element SOLVED!

OK here's what's going wrong...

C2 won't work with xerces1_0_3 for me, but I got it to run with xerces1_1_1.
xerces1_1_1 seems to be the cause of the problem. In the SQLFilter, the code
uses
the namespace attribute to determine whether the Sax event should be handled
by itself
or passed to the super class. Thus in the example below, when SQLFilter
receives the end
element event, the uri is still set to the SQL namespace and hence the
SQLFilter trys to handle
the event whilst in an invalid state.

Now if I use xerces1_0_4, both C2 work and the SQLFilter now works as I
expect again. One
small outstanding issue, the actual sql query string is still returned
before the serialized result set...

 <?xml version="1.0" encoding="iso-8859-1"?>
 <page >
   <title>Hello</title>
   <content>
     <para>This is my first Cocoon2 page filled with sql data!</para>
     <execute-query xmlns="http://xml.apache.org/cocoon/SQL">
       <query>
         select NAME, NICK_NAME from WINERY
       </query>
     </execute-query>
   </content>
 </page>