Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-30 Thread Torsten Curdt

> > 
> > 
> >  my_pool
> >  
> >   select name, number
> >from employee
> >   
> >   
> >
> > EmpName
> > EmpNumber
> >
> >
> > 
> >  
> > 
> >
> >
> > no Values available
> >
> >copyright
> >   
> >  
> > 
> >
> > 
> >
> > 
>
> Looks ok...

Ah.. missed it! Your no-results is under results that's wrong!

You probably want something like this:
> > 
> > 
> >  my_pool
> >  
> >   select name, number
> >from employee
> >   

   
EmpName
EmpNumber
   

> >   
> >
> > 
> >  
> > 
> >
  

> >
> > no Values available
> >

> >copyright

> >  
> > 
--
Torsten


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-30 Thread Torsten Curdt

> > Could you grab the current version from CVS and send me your
> > esql page and output. Up to know I cannot reproduce your problems...
>
>
> Hi Torsten,
> I got the snapshot from July 30th, 04:15 and run into the same problem.
> One more problem is that if no rows are selected I even don't get the
> header and footer in the output.
> Here is my esql.xsp:

Hm...

> 
>
>xmlns:xsp="http://apache.org/xsp";
>   xmlns:esql="http://apache.org/cocoon/SQL/v2";
> >
>
> 
> 
>  my_pool
>  
>   select name, number
>from employee
>   
>   
>
> EmpName
> EmpNumber
>
>
> 
>  
> 
>
>
> no Values available
>
>copyright
>   
>  
> 
>
> 
>
> 

Looks ok...

> I hope that you have any idea why this happens only to me.

Strange... could you send me the java code from your repository
off the list. I'll have a look.
--
Torsten


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-30 Thread Enke Michael

Torsten Curdt wrote:
> Have a closer look - it is not a resultset. it's the
> result of the resultset.execute().
Oh yes, my miss.

> Could you grab the current version from CVS and send me your
> esql page and output. Up to know I cannot reproduce your problems...


Hi Torsten,
I got the snapshot from July 30th, 04:15 and run into the same problem.
One more problem is that if no rows are selected I even don't get the
header and footer in the output.
Here is my esql.xsp:

==

 
http://apache.org/xsp";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>
 


 my_pool
 
  select name, number
   from employee
  
  
   
EmpName
EmpNumber
   
   

 

   
   
no Values available
   
   copyright
  
 

 

 

==

And here the xsl:
==

 
http://www.w3.org/1999/XSL/Transform";
  version="1.0"
>
 

 
  
   
   ,
   
   
   

,


   
   
   
  
 

 

==


The output from Cocoon-2.0b1 was this if rows are selected:
==

EmpName
   ,
   EmpNumberKing
,
1Scott
,
2Smith
,
3Tiger
,
4

copyright


==


and if NO rows are selected:
==

EmpName
   ,
   EmpNumber
no Values available
copyright


==


The output from Cocoon-2.0b2 and also for the actual snapshot
is this, if rows are selected:
==

EmpName
   ,
   EmpNumberKing
,
1Scott
,
2Smith
,
3Tiger
,
4
no Values available
copyright


==


and if NO rows are selected - header, noValues and footer is missing
==


   ,
   




==

I hope that you have any idea why this happens only to me.
I use tomcat 3.2.3 with lib/parser.jar copied from
xml-cocoon/lib/xerces_1_4_1.jar, Linux (SuSE 7.1) with
SDK2 version 1.3 and I removed regularly the work-directory

With best regards,
Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-29 Thread Torsten Curdt

> Actually I use the esql.xsl coming with the Cocoon-2.0b2,
> 1.4.2.5 2001/07/24 11:37:57
> but I inserted at line 532 the else brunch which you have posted.
> Maybe the lines 521-523 are the problem because
> "esql:no-resluts" will be called after each last row.

no, the if-else is done after each resultset. (usually there is only one)

> By the way is line 504 correct?
> if(_esql_query.results)
> Because this is a ResultSet and not a boolean, don't should it
> compare against null? Or is this not pure java?

Have a closer look - it is not a resultset. it's the
result of the resultset.execute().

Could you grab the current version from CVS and send me your
esql page and output. Up to know I cannot reproduce your problems...
--
Torsten

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-28 Thread Enke Michael

Actually I use the esql.xsl coming with the Cocoon-2.0b2,
1.4.2.5 2001/07/24 11:37:57
but I inserted at line 532 the else brunch which you have posted.
Maybe the lines 521-523 are the problem because
"esql:no-resluts" will be called after each last row.

>From line 504 it looks like this:
  if (_esql_query.results) {
do {
  _esql_query.resultset = _esql_query.statement.getResultSet();
  _esql_query.resultset_metadata =
_esql_query.resultset.getMetaData();
  _esql_query.position = 0;
  if (_esql_connection.use_limit_clause == 0 &&
_esql_query.skip_rows > 0) {
while (_esql_query.resultset.next()) {
  _esql_query.position++;
  if (_esql_query.position == _esql_query.skip_rows) {
break;
  }
}
  }
 
  if (_esql_query.resultset.next()) {

  }
  else {

  }
 
  _esql_query.resultset.close();
} while(_esql_query.statement.getMoreResults());
  } else {
_esql_query.position = _esql_query.statement.getUpdateCount();
if (_esql_query.position >= 0) {
  
}
else{
  
}
  }
  _esql_query.statement.close();

By the way is line 504 correct?
if(_esql_query.results)
Because this is a ResultSet and not a boolean, don't should it
compare against null? Or is this not pure java?

Regards,
Michael


Torsten Curdt wrote:
> 
> > Hi Thorsten,
> > I followed the discussion about esql:no-results
> > In the beta1 release it was ok, if no rows
> > the no-results content was in the tree, otherwise not.
> > But now it is inverted.
> > With beta2 also after applying your patch to esql.xsl
> > I get the content of no-results if the query returns results
> > and the no-results content is not in the tree in case of
> > really no results.
> >
> > There is one other point confusing me: in esql.xsd I find:
> > 
> >  
> >   This element's children are instantiated in the result
> > tree for each row in the resultset
> >  
> > 
> >
> > For each row?
> > Did I misunderstand the meaning of no-results?
> 
> No, you did not. (a bug in the docuentation ;)
> Maybe could tell me which revision of esql.xsl you
> have? Works everything fine here...
> 
> regards
> --
> Torsten

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-28 Thread Torsten Curdt

> Hi Thorsten,
> I followed the discussion about esql:no-results
> In the beta1 release it was ok, if no rows
> the no-results content was in the tree, otherwise not.
> But now it is inverted.
> With beta2 also after applying your patch to esql.xsl
> I get the content of no-results if the query returns results
> and the no-results content is not in the tree in case of
> really no results.
> 
> There is one other point confusing me: in esql.xsd I find:
> 
>  
>   This element's children are instantiated in the result
> tree for each row in the resultset
>  
> 
> 
> For each row?
> Did I misunderstand the meaning of no-results?

No, you did not. (a bug in the docuentation ;)
Maybe could tell me which revision of esql.xsl you
have? Works everything fine here...

regards
--
Torsten

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-27 Thread Enke Michael

Hi Thorsten,
I followed the discussion about esql:no-results
In the beta1 release it was ok, if no rows
the no-results content was in the tree, otherwise not.
But now it is inverted.
With beta2 also after applying your patch to esql.xsl
I get the content of no-results if the query returns results
and the no-results content is not in the tree in case of
really no results.

There is one other point confusing me: in esql.xsd I find:

 
  This element's children are instantiated in the result
tree for each row in the resultset
 


For each row?
Did I misunderstand the meaning of no-results?

Michael

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




[c2][patch] RE: ESQL : No, my problem isn't with mutual exclusivity

2001-07-23 Thread Torsten Curdt

> Hello again Torsten,
> 
> if my query didn't return any row, a call to the execute() method
> returns false, right?

No that's wrong. Is tells you if you got at least one ResultSet _object_
not if this ResultSet contains a row at all!

> Therefore, for a no-results situation, the code resulting from the
> application
> of the esql:no-results template is never reached -  this is what I
> understand from reading
> the java code below. Am I right?! I guess it's highly probable that I'm
> grossly wrong,
> but this is the only place in the esql.xsl file where the template is
> apllied.
> 
> I don't wan't to execute java code when I do an update or insert, but
> when my
> "SELECT title FROM test WHERE title = 'a title' " query returns no rows
> - for this 3
> situations, the execute() method's will return false and not a ResultSet
> Object.
> 
> What am I missing?!?!?
> Conclusion : I need mutual exclusivity between 'no-results' and
> 'update-results' (mutual
> exclusivity between 'no-results' and 'results' is assured by the
> true/false return values of the
> execute() method).

Ok... got you! Patch is attached :)
Thanks for the reporting...
--
Torsten


 esql.diff

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>