SQL Transformer/Resin broken?

2003-06-23 Thread Ed Yavno
Hi All,

I'm having problems trying to use something under Caucho Resin that works perfectly 
fine under Tomcat:
SQL Transformer in Cocoon 2.0.4 deployed under Resin 2.1.8/10(same result) trying to 
query Oracle 8i.

Both Tomcat 4.0.6 and Resin 2.1.8 use the exact same settings (see below: web.xml, 
cocoon.xconf, sitemap.xmap, generator source), yet Tomcat is able to connect and query 
the database, but Resin generates the error with the following stack trace:

java.lang.IllegalStateException: can't clear response after writing headers
at com.caucho.server.http.ResponseStream.clear(ResponseStream.java:209)
at com.caucho.server.http.Response.reset(Response.java:1272)
at com.caucho.server.http.Response.reset(Response.java:1254)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1079)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at 
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:536)


What interesting is that the SQL transformer sample that comes with Cocoon 
distribution and uses HSQL database is working fine with Resin, but not with Oracle.

I would appreciate any ideas/suggestions on how this can be resolved. 
I've started looking through SQLTransformer source code, but don't see anything that 
can cause the above error.

Thanks,
- Ed Y. 


Configs:


web.xml,
in
init-param
  param-nameload-class/param-name
  param-value:

!-- For oracle: --
oracle.jdbc.driver.OracleDriver

cocoon.xconf,
in datasources:

jdbc name=MyNewtConnection
pool-controller min=5 max=10 oradb=true /
dburljdbc:oracle:thin:@rosie.feedroom.com:1521:newt/dburl
useruser/user
passwordpassword/password
/jdbc


sitemap.xmap :

map:match pattern=dbtests/dbtest1
map:generate src=docs/custom/dbtest.xml/
map:transform type=sql
map:parameter name=use-connection 
value=MyNewtConnection/
/map:transform
map:transform src=stylesheets/simple-sql2html.xsl/
map:serialize type=html /
/map:match


dbstest.xml:
page xmlns:sql=http://apache.org/cocoon/SQL/2.0;
execute-query xmlns=http://apache.org/cocoon/SQL/2.0; 
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
query
select * from models
/query
/execute-query
/page




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



SQL Transformer, part of xml doc in a database field.

2003-06-16 Thread Chris

SQL Transformer, part of xml doc in a database field.

What if one of the fields from a select statement
in an sql:query has a text field that contains
a valid xml document.

All the '' and '' characters get escaped, I would like
the xml in this field to be part of the rowset
as valid xml,

any ideas, is there a way to say don't escape for
a specific field?

-chris

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



Mysql and sql transformer

2003-04-09 Thread Luca Marchetti
Hi all,
 I've got a problem with mysql (on win or linux) and sql transformer.
I've followed the instruction on the cocoon wiki about how to set-up 
mysql jdbc drivers, I've set up a simple pipeline with a really simple 
query, but the result is always the same:

Failed to obtain connection. Made 5 attempts with 5000ms interval

I'm pretty sure about my pipeline, and I know pretty well the sql 
transformer (massively used with as400).

So... have anyone experienced the same problem?

what about?

Thanks in advice.

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


Re: SQL Transformer or ESQL Stylesheet?

2003-03-18 Thread Scherler
Konlin wrote:

Hello Cocoon!

Can you write me any clues when to use sql transformer and when esql
stylesheet? What is more flexible, easier, more professional etc? I'm
going to write simple news portal with Xindice or MySQL as DBMS and
I'm wondering what solution is better.
Greetz,
Konrad Inglot
 

I have ask that question before but with no answer!
My personal opinion is that you should use the SQL-transform [a] for 
simple Queries where you do not need much logic in it.
The esql  way would be for something more complex. The advantage of 
using ESQL [b] is the xsp where you can add java code. So this documents 
are more intelligent.
The last way and the you should do way is with actions [c]. That way 
everything is in Java.

...but again I think it depends on the situation.
a. is a transformer
b. a generator
c. is an action.
King regards
Thorsten
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: SQL Transformer or ESQL Stylesheet?

2003-03-18 Thread Andrew Savory

Hi,

On Tue, 18 Mar 2003, Scherler wrote:

 Konlin wrote:

 Can you write me any clues when to use sql transformer and when esql
 stylesheet?

 I have ask that question before but with no answer!
 My personal opinion is that you should use the SQL-transform [a] for
 simple Queries where you do not need much logic in it.

I tend to use ESQL when I want the output XML in a very specific format
(saves an extra transform step). I've also found ESQL to be slightly
faster than the SQL Transformer in some cases, so it may be worth you
trying both to get a speed comparison. At the end of the day, it really
comes down to personal preference.

Thanks,

Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

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



RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Delis, Christopher E.
actually, now that i return back to my problem... i am not so embarassed (at
least not yet!)...

this solution doesn't appear to solve my problem because my stylesheet is in
the middle of a pipeline and the substitute values are not easily attainable
from within the sitemap.  also, i do not wish to have to declare each
variable more times than i have to (another reason i don't want it in the
sitemap).  has anyone else run into a similar situation?  of course, i could
write (i'd rather find one already developed ;-) another transform to
strip offending characters (such as single-quotes) for each variable but i'd
rather not.  any ideas?  do i need to re-design my approach?

here is the update command i wish to perform.  it receives the variables
from previous generator/transforms:

?xml version=1.0?

sql:execute-query xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   sql:use-connectionidal/sql:use-connection
   sql:query
update contact
set last_name = 'xsl:value-of
select=/library/contact/last_name/',
first_name = 'xsl:value-of
select=/library/contact/first_name/',
email = 'xsl:value-of select=/library/contact/email/',
phone = 'xsl:value-of select=/library/contact/phone/',
address = 'xsl:value-of select=/library/contact/address/',
city = 'xsl:value-of select=/library/contact/city/',
zip = 'xsl:value-of select=/library/contact/zip/'
where library_id = xsl:value-of select=/library/id/
   /sql:query
/sql:execute-query




 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 4:08 AM
 To: 'Luca Morandini '; '[EMAIL PROTECTED] '
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
  thanks!  i am so embarassed. ;-)  i gazed right past that little
 paragraph...  sheesh!
 
 -Original Message-
 From: Luca Morandini
 To: [EMAIL PROTECTED]
 Sent: 3/18/03 1:15 AM
 Subject: RE: sql transformer question; *not* esql... (was RE: 
 ???ESQL update
 table???)
 
 Christopher,
 
 IIUC, you need substitution: go to
 http://xml.apache.org/cocoon/userdocs/transformers/sql-transfo
 rmer.html
 and look for the
 Substitution topic
 
 Regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
  -Original Message-
  From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 18, 2003 1:53 AM
  To: Delis, Christopher E.; ''[EMAIL PROTECTED]' '
  Subject: sql transformer question; *not* esql... (was RE: ???ESQL
 update
  table???)
 
 
  i replied to the wrong topic.  sorry...  what i meant to 
 ask was:  is
 there
  a place-holder mechanism available using the sql transformer?
 --chris
 
  -Original Message-
  From: Delis, Christopher E.
  To: '[EMAIL PROTECTED]'
  Sent: 3/17/03 9:48 AM
  Subject: RE: ???ESQL update table???
 
  on a slightly different note, is there place-holder 
 functionality in
  esql
  stylesheet language?  e.g.,
 
  insert into atable (field1, field2) values (?, ?)
  select * from atable where field1 = ? limit ?
  ...
 
  TIA,
  chris
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
   Sent: Friday, March 14, 2003 9:20 AM
   To: [EMAIL PROTECTED]
   Subject: ???ESQL update table???
  
  
   Hi,
   This is a part of a query. My problem is that when I make a
   SELECT right
   after an INSERT I don't get the last updated query :
  
   ---
   esql:execute-query
esql:query
 INSERT INTO Actions  (at_name, at_order)
 VALUES ('esql:get-string column=at_name ancestor=1/',
   xsp:exprnouvOrder/xsp:expr)
/esql:query
esql:update-results/
   /esql:execute-query
  
   esql:execute-query
esql:query
 SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
 WHERE at_order = xsp:exprmyOrderID/xsp:expr
 ORDER BY at_id DESC
/esql:query
esql:results
esql:row-results
 xsp:logic
   nouvActionName = esql:get-string column=at_name/;
 /xsp:logic
/esql:row-results
/esql:results
   /esql:execute-query
  
   esql:execute-query
esql:query
 SELECT TOP 1 * FROM Actions
 WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
 ORDER BY at_id DESC
/esql:query
esql:results
esql:row-results
  xsp:logic
   nouvAction = esql:get-int column=at_order/;
  /xsp:logic
 /esql:row-results
/esql:results
   /esql:execute-query
   ---
   What I mean is that in the last execute-query the value
   esql:get-int
   column=at_order/ returns a value, but in my SQL 
 Profiler I get a
   query witch returns another value (the right)
   I think that it is due to the refreshing from the insert

RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Luca Morandini
 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 5:18 PM
 To: '[EMAIL PROTECTED]'; 'Luca Morandini '
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)

 sitemap).  has anyone else run into a similar situation?  of course, i could
 write (i'd rather find one already developed ;-) another transform to
 strip offending characters (such as single-quotes) for each variable but i'd
 rather not.  any ideas?  do i need to re-design my approach?

I convert ìnput data using an XSL template: slow but portable.

An XSL extension function would do the trick faster, I presume hmmm

Regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-




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



RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Delis, Christopher E.
do you mind sharing the template? =-)  --chris

 -Original Message-
 From: Luca Morandini [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 11:18 AM
 To: [EMAIL PROTECTED]
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
  -Original Message-
  From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 18, 2003 5:18 PM
  To: '[EMAIL PROTECTED]'; 'Luca Morandini '
  Subject: RE: sql transformer question; *not* esql... (was 
 RE: ???ESQL
  upda te table???)
 
  sitemap).  has anyone else run into a similar situation?  
 of course, i could
  write (i'd rather find one already developed ;-) another 
 transform to
  strip offending characters (such as single-quotes) for each 
 variable but i'd
  rather not.  any ideas?  do i need to re-design my approach?
 
 I convert ìnput data using an XSL template: slow but portable.
 
 An XSL extension function would do the trick faster, I 
 presume hmmm
 
 Regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Luca Morandini
 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 6:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
 do you mind sharing the template? =-)  --chris

not at all (mind, it just converts single quotes in double-single quotes).

xsl:template name=escape-apos
xsl:param name=string /

xsl:choose

xsl:when test='contains($string, apos;)'

xsl:value-of select='substring-before($string, apos;)' /
xsl:text''/xsl:text

xsl:call-template name=escape-apos
xsl:with-param name=string select='substring-after($string, 
apos;)' /
/xsl:call-template

/xsl:when

xsl:otherwise
xsl:value-of select=$string /
/xsl:otherwise

/xsl:choose

/xsl:template

Regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 


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



SQL Transformer or ESQL Stylesheet?

2003-03-17 Thread Konlin
Hello Cocoon!

Can you write me any clues when to use sql transformer and when esql
stylesheet? What is more flexible, easier, more professional etc? I'm
going to write simple news portal with Xindice or MySQL as DBMS and
I'm wondering what solution is better.

Greetz,
Konrad Inglot

-- 
[EMAIL PROTECTED]


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



SQL Transformer or ESQL Stylesheet?

2003-03-17 Thread Konlin
Hello Cocoon!

Can you write me any clues when to use sql transformer and when esql
stylesheet? What is more flexible, easier, more professional etc? I'm
going to write simple news portal with Xindice or MySQL as DBMS and
I'm wondering what solution is better.

Greetz,
Konrad Inglot

-- 
[EMAIL PROTECTED]




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



sql transformer question; *not* esql... (was RE: ???ESQL update table???)

2003-03-17 Thread Delis, Christopher E.
i replied to the wrong topic.  sorry...  what i meant to ask was:  is there
a place-holder mechanism available using the sql transformer?   --chris 

-Original Message-
From: Delis, Christopher E.
To: '[EMAIL PROTECTED]'
Sent: 3/17/03 9:48 AM
Subject: RE: ???ESQL update table???

on a slightly different note, is there place-holder functionality in
esql
stylesheet language?  e.g.,

insert into atable (field1, field2) values (?, ?)
select * from atable where field1 = ? limit ?
...

TIA, 
chris


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 14, 2003 9:20 AM
 To: [EMAIL PROTECTED]
 Subject: ???ESQL update table???
 
 
 Hi,
 This is a part of a query. My problem is that when I make a 
 SELECT right
 after an INSERT I don't get the last updated query :
 
 ---
 esql:execute-query
  esql:query
   INSERT INTO Actions  (at_name, at_order)
   VALUES ('esql:get-string column=at_name ancestor=1/',
 xsp:exprnouvOrder/xsp:expr)
  /esql:query
  esql:update-results/
 /esql:execute-query  
 
 esql:execute-query
  esql:query
   SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
   WHERE at_order = xsp:exprmyOrderID/xsp:expr
   ORDER BY at_id DESC 
  /esql:query
  esql:results
  esql:row-results   
   xsp:logic
 nouvActionName = esql:get-string column=at_name/;
   /xsp:logic  
  /esql:row-results
  /esql:results   
 /esql:execute-query  
 
 esql:execute-query
  esql:query
   SELECT TOP 1 * FROM Actions
   WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
   ORDER BY at_id DESC  
  /esql:query 
  esql:results
  esql:row-results
xsp:logic
 nouvAction = esql:get-int column=at_order/;
/xsp:logic 
   /esql:row-results
  /esql:results
 /esql:execute-query   
 ---
 What I mean is that in the last execute-query the value 
 esql:get-int
 column=at_order/ returns a value, but in my SQL Profiler I get a
 query witch returns another value (the right)
 I think that it is due to the refreshing from the insert, because the
 insert value is queried!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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

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



RE: sql transformer question; *not* esql... (was RE: ???ESQL update table???)

2003-03-17 Thread Luca Morandini
Christopher,

IIUC, you need substitution: go to 
http://xml.apache.org/cocoon/userdocs/transformers/sql-transformer.html and look for 
the
Substitution topic

Regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 1:53 AM
 To: Delis, Christopher E.; ''[EMAIL PROTECTED]' '
 Subject: sql transformer question; *not* esql... (was RE: ???ESQL update
 table???)


 i replied to the wrong topic.  sorry...  what i meant to ask was:  is there
 a place-holder mechanism available using the sql transformer?   --chris

 -Original Message-
 From: Delis, Christopher E.
 To: '[EMAIL PROTECTED]'
 Sent: 3/17/03 9:48 AM
 Subject: RE: ???ESQL update table???

 on a slightly different note, is there place-holder functionality in
 esql
 stylesheet language?  e.g.,

 insert into atable (field1, field2) values (?, ?)
 select * from atable where field1 = ? limit ?
 ...

 TIA,
 chris


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 14, 2003 9:20 AM
  To: [EMAIL PROTECTED]
  Subject: ???ESQL update table???
 
 
  Hi,
  This is a part of a query. My problem is that when I make a
  SELECT right
  after an INSERT I don't get the last updated query :
 
  ---
  esql:execute-query
   esql:query
INSERT INTO Actions  (at_name, at_order)
VALUES ('esql:get-string column=at_name ancestor=1/',
  xsp:exprnouvOrder/xsp:expr)
   /esql:query
   esql:update-results/
  /esql:execute-query
 
  esql:execute-query
   esql:query
SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
WHERE at_order = xsp:exprmyOrderID/xsp:expr
ORDER BY at_id DESC
   /esql:query
   esql:results
   esql:row-results
xsp:logic
  nouvActionName = esql:get-string column=at_name/;
/xsp:logic
   /esql:row-results
   /esql:results
  /esql:execute-query
 
  esql:execute-query
   esql:query
SELECT TOP 1 * FROM Actions
WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
ORDER BY at_id DESC
   /esql:query
   esql:results
   esql:row-results
 xsp:logic
  nouvAction = esql:get-int column=at_order/;
 /xsp:logic
/esql:row-results
   /esql:results
  /esql:execute-query
  ---
  What I mean is that in the last execute-query the value
  esql:get-int
  column=at_order/ returns a value, but in my SQL Profiler I get a
  query witch returns another value (the right)
  I think that it is due to the refreshing from the insert, because the
  insert value is queried!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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

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



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



SOLUTION: double namespace attribute in SQL Transformer

2003-03-16 Thread Robert Douglass
Here is the solution that I believe Charles was suggesting (for those who
are as XML inept as I, it is nice to have this in black and white)

?xml version=1.0?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;


xsl:template match=/

  root

  sql:execute-query
   sql:query
SELECT * FROM foo
   /sql:query
  /sql:execute-query

  /root


/xsl:template

/xsl:stylesheet

--
   Don't know why, exactly, but this has been discussed here before and
the work around is to use namespace prefixes on all elements, ie don't
use a default namespace in the document with the query.  Something along
those lines anyway.  This works for me.

Charles

Robert Douglass wrote:

Does anyone know why my sql transformation returns an element with two
xmlns
attributes?

rowset xmlns=http://apache.org/cocoon/SQL/2.0;
xmlns=http://apache.org/cocoon/SQL/2.0;

Using cocoon-2.0.4-bm14

map:pipeline
map:match pattern=browse
map:generate src=Rob/browse/browse.xml/
map:transform src=Rob/browse/browse.xslt
map:parameter name=use-request-parameters value=true/
/map:transform
map:transform src= type=sql
map:parameter name=use-connection value=sites/
/map:transform
map:serialize/
/map:match
/map:pipeline

The xml going into the sql transformation looks like this:
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
queryselect type from all_documents where id='4711'/query
/execute-query

Thanks,

Robert Douglass



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



Accessing nrofrows from SQL Transformer within Stylesheet

2003-03-11 Thread Samuel Bruce
Hello,

I can't seem to access the nrofrows value returned
from the SQL Transformer.

The resulting XML after the SQL Transformer executes
in my pipeline is as follows:

records
  rowset xmlns=http://apache.org/cocoon/SQL/2.0;
nrofrows=4
row
   ...
/row
row
   ...
/row
row
   ...
/row
row
   ...
/row
  /rowset
/records

My stylesheet snippet is:
xsl:template match=records
  NumberOfRows
xsl:value-of select=sql:rowset/@nrofrows/
  /NumberOfRows
/xsl:template

I have no problem accessing the sql rows, but I cannot
access the nrofrows attribute. What am I doing wrong?

I'm using a cocoon2 dev. snapshot from October, 2002
and TC 4.1.12.





__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



RE: Accessing nrofrows from SQL Transformer within Stylesheet

2003-03-11 Thread Luca Morandini
 -Original Message-
 From: Samuel Bruce [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 7:23 PM
 To: cocoon
 Subject: Accessing nrofrows from SQL Transformer within Stylesheet
 
 

 
 My stylesheet snippet is:
 xsl:template match=records
   NumberOfRows
 xsl:value-of select=sql:rowset/@nrofrows/
   /NumberOfRows
 /xsl:template
 
 I have no problem accessing the sql rows, but I cannot
 access the nrofrows attribute. What am I doing wrong?
 

try using the sql namespace as prefix to attributes as well as element names), like 
in:
xsl:value-of select=sql:rowset/@sql:nrofrows/

Regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

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



RE: Accessing nrofrows from SQL Transformer within Stylesheet

2003-03-11 Thread Samuel Bruce
Thanks very much. That worked.

I tried the sql namespace prefix before but I put it
in the wrong place. Previously I used sql:@nrofrows.

Thanks again.

--- Luca Morandini [EMAIL PROTECTED] wrote:
  -Original Message-
  From: Samuel Bruce [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 11, 2003 7:23 PM
  To: cocoon
  Subject: Accessing nrofrows from SQL Transformer
 within Stylesheet
  
  
 
  
  My stylesheet snippet is:
  xsl:template match=records
NumberOfRows
  xsl:value-of select=sql:rowset/@nrofrows/
/NumberOfRows
  /xsl:template
  
  I have no problem accessing the sql rows, but I
 cannot
  access the nrofrows attribute. What am I doing
 wrong?
  
 
 try using the sql namespace as prefix to
 attributes as well as element names), like in:
 xsl:value-of select=sql:rowset/@sql:nrofrows/
 
 Regards,
 
 - 
Luca Morandini 
GIS Consultant 
   [EMAIL PROTECTED] 
 http://utenti.tripod.it/lmorandini/index.html 
 -
  
 

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


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Re: Problem with SQL Transformer[Sol]

2003-02-07 Thread Cedric Claus
Martin Holz wrote:


Cedric Claus [EMAIL PROTECTED] writes:
 

This pipeline doesn't work : After SQL transformation the sort and
replace.xsl does wrong. But if I copy the xml result of the SQL
transform and then apply the same xsl , no problem (with xalan and
MSXML)



My configuration : cocoon 2.0  - tomcat 4.0.5 - JDK 1.4.03 et xalan 2.3.1

What 's wrong??? Is it in configuration??
   


Your configuration looks okay.

If something goes wrong in pipeline, but works when copying
the intermediate result, this is almost always a namespace
problem. Namespace handling in SAX is sometimes strange
(its even stranger in DOM). 
The information in the namespace argument and 
the localname argument of the method org.sax.ContentHandler.startElement
should be redundant to the qname argument and calls to ContentHandler.startPrefixMapping.
But if there is a bug somewhere in the pipeline, this might not be the case. The bug 
might be undetected for a long time, because many components including the Serializer
use only a part of the information. The XMLSerialzer has the tendency to silently
correct a mismatch between the qname and the namespace.

Carsten Ziegler fixed a bug in namespace handling of SQLTransformer at 2002/11/14
cocoon 2.0 is older. Maybe you should try a  newer version of cocoon.


Martin


 

It was really a problem with the namespace, I had changed my XSL depends 
on the Namespace and it does well

Thanks vm for your help

this is the modified file :


xsl:for-each select=text
   xsl:value-of select=./
   xsl:if test=following-sibling::sql:rowset
   xsl:apply-templates 
select=following::sql:rowset/sql:row/sql:data/
   /xsl:if




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Problem with SQL Transformer

2003-02-06 Thread Cedric Claus
Hi,

I have a problem with a pipeline :

map:match pattern=AOS/page1.html
	map:generate src=xml/page1.xml/
	map:transform type=sql/
	map:transform type=xslt src=xsl/SortAndReplace.xsl/
	map:transform type=xslt src=xsl/HAbstract.xsl/
	map:serialize/
/map:match

This pipeline doesn't work : After SQL transformation the sort and 
replace.xsl does wrong. But if I copy the xml result of the SQL 
transform and then apply the same xsl , no problem (with xalan and 
MSXML)


My configuration : cocoon 2.0  - tomcat 4.0.5 - JDK 1.4.03 et xalan 2.3.1

What 's wrong??? Is it in configuration??

thx for response

Ced

page1.xml:

document
	elements
		element position=1 type=title
			textMon titre 1/text
		/element
		element position=2 type=paragraphe
			textc'est beau /text
			sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;
sql:use-connectiondatabase_connection/sql:use-connection
sql:queryselect data from DataRessources where ( ID_fk_dataDesc=1 
and ID_fk_dataLangue=1 )/sql:query
			/sql:execute-query
		/element
	/elements
/document
___

SortAndReplace.xsl:

xsl:template match=/
	document
		elements
			xsl:apply-templates select=document/elements/
		/elements
	/document
	
/xsl:template


xsl:template match=document/elements
	
	xsl:for-each select=element
	xsl:sort  select=@position/
		element
			xsl:attribute name=type
xsl:value-of select=@type/
			/xsl:attribute
			xsl:attribute name=position
xsl:value-of select=@position/
			/xsl:attribute
			xsl:for-each select=text
	xsl:value-of select=./
	xsl:if test=following-sibling::rowset
		xsl:apply-templates select=following::rowset/row/data/
	/xsl:if

			/xsl:for-each
		/element
	
	/xsl:for-each
/xsl:template

xsl:template match=rowset/row/data
	xsl:value-of select=./
/xsl:template
/xsl:stylesheet




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Re: Problem with SQL Transformer

2003-02-06 Thread Martin Holz
Cedric Claus [EMAIL PROTECTED] writes:
 This pipeline doesn't work : After SQL transformation the sort and
 replace.xsl does wrong. But if I copy the xml result of the SQL
 transform and then apply the same xsl , no problem (with xalan and
 MSXML)
 
 
 
 My configuration : cocoon 2.0  - tomcat 4.0.5 - JDK 1.4.03 et xalan 2.3.1
 
 What 's wrong??? Is it in configuration??

Your configuration looks okay.

If something goes wrong in pipeline, but works when copying
the intermediate result, this is almost always a namespace
problem. Namespace handling in SAX is sometimes strange
(its even stranger in DOM). 
The information in the namespace argument and 
the localname argument of the method org.sax.ContentHandler.startElement
should be redundant to the qname argument and calls to 
ContentHandler.startPrefixMapping.
But if there is a bug somewhere in the pipeline, this might not be the case. The bug 
might be undetected for a long time, because many components including the Serializer
use only a part of the information. The XMLSerialzer has the tendency to silently
correct a mismatch between the qname and the namespace.

Carsten Ziegler fixed a bug in namespace handling of SQLTransformer at 2002/11/14
cocoon 2.0 is older. Maybe you should try a  newer version of cocoon.


Martin

 



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Strange results: SQL Transformer - Other Transformer - XML-Serializer

2003-02-04 Thread Stefan Riegel
Hi,

for sure I do somthing wrong, because nobody seems to report similar 
problems. But I just can't find the error.

I would like to transform SQL Transformer output to another XML using 
the Identity Transformation (I guess this is the right word).

Problem: the attributes in the rowset-element are substituted by their 
value. Very strange:

Sitemap:

map:match pattern=docbase/catalogue/topseller/**
  map:generate src=docbase/catalogue/topseller/{1}.xml /
  map:transform type=sql
map:parameter name=use-connection value=ProductConnection/
map:parameter name=show-nr-of-rows value=true/
  /map:transform
!-- This is the problematic transformation --
  map:transform src=docbase/catalogue/topseller/{1}.xsl /
  map:serialize type=xml /
/map:match

Output without the problematic transformation:

?xml version=1.0 encoding=ISO-8859-1 ?
root test=abcabcabc
  xmlns:topseller=http://software-express.de/catalogue/topseller/1.0;
  title mehr=Katalog - Topseller/title
  paragraphTopseller-Liste/paragraph
- topseller:catalogue-page nochwas=hallöö
!-- The rowset-element and attributes looks fine --
- rowset nrofrows=2 name=abc
- row
  abcA/abc
  /row
- row
  abcC/abc
  /row
  /rowset
- rowset nrofrows=2 name=manufacturer
- row
  manufacturerMaxon/manufacturer
  /row
- row
  manufacturerMcAfee/manufacturer
  /row
  /rowset
  /topseller:catalogue-page
  /root


Wrong output _with_ the problematic transformation:

?xml version=1.0 encoding=ISO-8859-1?
root 
xmlns:topseller=http://software-express.de/catalogue/topseller/1.0; 
test=abcabcabc
  title mehr=Katalog - Topseller/title
  paragraphTopseller-Liste/paragraph
  topseller:catalogue-page nochwas=hallöö
!-- All test attributes above have been copied correctly --

!-- But what is that below? the rowset-attribute names have been 
substituted by the values??? That is no XML anymore. --
  rowset xmlns=http://apache.org/cocoon/SQL/2.0; 2=2 
abc=abcrowabcA/abc/rowrowabcC/abc/row/rowset


 rowset xmlns=http://apache.org/cocoon/SQL/2.0; 2=2 
manufacturer=manufacturerrowmanufacturerMaxon/manufacturer/rowrowmanufacturerMcAfee/manufacturer/row/rowset
/topseller:catalogue-page
/root

The problematic transformer xsl looks like this:

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xmlns:topseller=http://software-express.de/catalogue/topseller/1.0;

xsl:template match=/
xsl:apply-templates /
/xsl:template

!-- Copy all unknown tags --
xsl:template match=@*|node()
xsl:copy
xsl:apply-templates select=@*|node() /
/xsl:copy
/xsl:template

/xsl:stylesheet


Any idea what I'am doing wrong?

Regards
Stefan


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Re: SQL Transformer substitute-value woes with 2.0.4

2003-01-17 Thread Jeremy Quinn

On Thursday, Jan 16, 2003, at 12:21 Europe/London, Andrew Savory wrote:



Hi,

As far as I can tell, using substitute-value with SQL Transformer does 
not
work in 2.0.4 (and there aren't any examples of it in the samples,
something I'll rectify if I ever get the darn thing working!).

Here's what I've got:


snip/


  SELECT DISTINCT contributor_id, name FROM foo WHERE 
contributor_id='substitute-value sql:name=contributor_id/'
/sql:query

snip/



... as far as I can tell, the substitute value just doesn't work. I've
tried swapping {1} for 1 in the sitemap, and that doesn't help.

Any ideas?


I use this in 2.1 successfully, did you try leaving the quotes out?

ie.

	SELECT DISTINCT contributor_id, name FROM foo WHERE contributor_id = 
substitute-value sql:name=contributor_id/

this is how mine look ...

regards Jeremy


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



RE: SQL Transformer substitute-value woes with 2.0.4

2003-01-17 Thread Carsten Ziegeler

Jeremy Quinn wrote:
 
   SELECT DISTINCT contributor_id, name FROM foo WHERE 
 contributor_id = 
 substitute-value sql:name=contributor_id/
 
 this is how mine look ...
 
And you do not use the sql namespace on the substitue-value element
(sql:substitue-value sql:name=.../) or have the default namespace
set to sql?

Carsten

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: SQL Transformer substitute-value woes with 2.0.4

2003-01-17 Thread Jeremy Quinn

On Friday, Jan 17, 2003, at 10:04 Europe/London, Carsten Ziegeler wrote:



Jeremy Quinn wrote:


	SELECT DISTINCT contributor_id, name FROM foo WHERE
contributor_id =
substitute-value sql:name=contributor_id/

this is how mine look ...


And you do not use the sql namespace on the substitue-value element
(sql:substitue-value sql:name=.../) or have the default namespace
set to sql?


yeah, I missed that ;) Whoops!

you need to declare the prefixed namespace if you want to use either:

	substitue-value sql:name=id/
or
	ancestor-value sql:name=id sql:level=1/

execute-query
	xmlns=http://apache.org/cocoon/SQL/2.0;
	xmlns:sql=http://apache.org/cocoon/SQL/2.0;
	

	query
		select *
		from blah
		where id = substitue-value sql:name=id/
	/query

/execute-query


Sorry!!

regards Jeremy


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




SQL Transformer substitute-value woes with 2.0.4

2003-01-16 Thread Andrew Savory

Hi,

As far as I can tell, using substitute-value with SQL Transformer does not
work in 2.0.4 (and there aren't any examples of it in the samples,
something I'll rectify if I ever get the darn thing working!).

Here's what I've got:

test.xml:

?xml version=1.0 encoding=iso-8859-1?

page xmlns:sql=http://apache.org/cocoon/SQL/2.0;

  sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;
sql:query
  SELECT DISTINCT contributor_id, name FROM foo WHERE 
contributor_id='substitute-value sql:name=contributor_id/'
/sql:query
  /sql:execute-query
/page

sitemap.xmap:

map:match pattern=contributor/*/list
  map:generate src=test.xml/
  map:transform type=sql
map:parameter name=use-connection value=bar/
map:parameter name=contributor_id value={1}/
  /map:transform
  map:transform src=stylesheets/simple-xml2html.xsl/
  map:serialize/
/map:match

... but in my sitemap.log, I get:

DEBUG   (2003-01-16) 12:11.46:611   [sitemap.transformer.sql]
(/contributor/1/list) Thread-33/AbstractSAXTransformer: END endRecording 
fragment=?xml version=1.0 encoding=ISO-8859-1?

SELECT DISTINCT id, contributor_id, name FROM contributor 
WHERE contributor_id='substitute-value sql:name=contributor_id/'
DEBUG   (2003-01-16) 12:11.46:617   [sitemap.transformer.sql] (/contributor/1/list) 
Thread-33/AbstractSAXTransformer: END endSerializedXMLRecording xml=
SELECT DISTINCT id, contributor_id, name FROM contributor 
WHERE contributor_id=''

DEBUG   (2003-01-16) 12:11.46:618   [sitemap.transformer.sql] (/contributor/1/list) 
Thread-33/SQLTransformer: QUERY IS 
SELECT DISTINCT id, contributor_id, name FROM contributor 
WHERE contributor_id=''


... as far as I can tell, the substitute value just doesn't work. I've
tried swapping {1} for 1 in the sitemap, and that doesn't help.

Any ideas?


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: SQL Transformer substitute-value woes with 2.0.4

2003-01-16 Thread Carsten Ziegeler
Hi Andrew,

I'm not sure, but I guess you have to use the sql namespace
for the substitute-value element as well:
sql:substitute-value sql:name=contributor_id/

HTH
Carsten

 -Original Message-
 From: Andrew Savory [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
 Savory
 Sent: Thursday, January 16, 2003 1:22 PM
 To: [EMAIL PROTECTED]
 Subject: SQL Transformer substitute-value woes with 2.0.4



 Hi,

 As far as I can tell, using substitute-value with SQL Transformer does not
 work in 2.0.4 (and there aren't any examples of it in the samples,
 something I'll rectify if I ever get the darn thing working!).

 Here's what I've got:

 test.xml:

 ?xml version=1.0 encoding=iso-8859-1?

 page xmlns:sql=http://apache.org/cocoon/SQL/2.0;

   sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 sql:query
   SELECT DISTINCT contributor_id, name FROM foo WHERE
 contributor_id='substitute-value sql:name=contributor_id/'
 /sql:query
   /sql:execute-query
 /page

 sitemap.xmap:

 map:match pattern=contributor/*/list
   map:generate src=test.xml/
   map:transform type=sql
 map:parameter name=use-connection value=bar/
 map:parameter name=contributor_id value={1}/
   /map:transform
   map:transform src=stylesheets/simple-xml2html.xsl/
   map:serialize/
 /map:match

 ... but in my sitemap.log, I get:

 DEBUG   (2003-01-16) 12:11.46:611   [sitemap.transformer.sql]
 (/contributor/1/list) Thread-33/AbstractSAXTransformer: END
 endRecording fragment=?xml version=1.0 encoding=ISO-8859-1?

 SELECT DISTINCT id, contributor_id, name
 FROM contributor WHERE contributor_id='substitute-value
 sql:name=contributor_id/'
 DEBUG   (2003-01-16) 12:11.46:617   [sitemap.transformer.sql]
 (/contributor/1/list) Thread-33/AbstractSAXTransformer: END
 endSerializedXMLRecording xml=
 SELECT DISTINCT id, contributor_id, name
 FROM contributor WHERE contributor_id=''

 DEBUG   (2003-01-16) 12:11.46:618   [sitemap.transformer.sql]
 (/contributor/1/list) Thread-33/SQLTransformer: QUERY IS 
 SELECT DISTINCT id, contributor_id, name
 FROM contributor WHERE contributor_id=''
 

 ... as far as I can tell, the substitute value just doesn't work. I've
 tried swapping {1} for 1 in the sitemap, and that doesn't help.

 Any ideas?


 Andrew.

 --
 Andrew SavoryEmail: [EMAIL PROTECTED]
 Managing Director  Tel:  +44 (0)870 741 6658
 Luminas Internet Applications  Fax:  +44 (0)700 598 1135
 This is not an official statement or order.Web:www.luminas.co.uk

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: SQL Transformer substitute-value woes with 2.0.4

2003-01-16 Thread Andrew Savory
On Thu, 16 Jan 2003, Carsten Ziegeler wrote:

 I'm not sure, but I guess you have to use the sql namespace
 for the substitute-value element as well:
 sql:substitute-value sql:name=contributor_id/

Oh man, it's ALWAYS a simple solution. Thanks! Patch for docs sent to
bugzilla and cocoon-dev, and I've added create an SQL transformer sample
to my to-do for the weekend ;-)


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: SQL Transformer substitute-value woes with 2.0.4

2003-01-16 Thread Carsten Ziegeler


 -Original Message-
 From: Andrew Savory [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
 Savory
 Sent: Thursday, January 16, 2003 1:51 PM
 To: [EMAIL PROTECTED]
 Subject: RE: SQL Transformer substitute-value woes with 2.0.4


 On Thu, 16 Jan 2003, Carsten Ziegeler wrote:

  I'm not sure, but I guess you have to use the sql namespace
  for the substitute-value element as well:
  sql:substitute-value sql:name=contributor_id/

 Oh man, it's ALWAYS a simple solution. Thanks! Patch for docs sent to
 bugzilla and cocoon-dev, and I've added create an SQL transformer sample
 to my to-do for the weekend ;-)


And applied - thanks! (I'm looking forward to the sample :) )

Carsten


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




SQL-Transformer

2002-12-13 Thread Boris Althaus



Hallo Cocoon Users,

does the SQL-Transformer has a map-parameter like 
map:parameter name="show-nr-of-cols"/ or is there a way to retrieve the 
number of cols in the resultset?

Regards
Boris



RE: SQL-Transformer

2002-12-13 Thread Geoff Howard



There 
is a tag defined but it's not fully implemented, although it may be in the very 
latest cvs. (it only worked for one particular database) What database are 
you using?

Geoff 
Howard

  -Original Message-From: Boris Althaus 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, December 13, 2002 
  9:45 AMTo: [EMAIL PROTECTED]Subject: 
  SQL-Transformer
  Hallo Cocoon Users,
  
  does the SQL-Transformer has a map-parameter like 
  map:parameter name="show-nr-of-cols"/ or is there a way to retrieve 
  the number of cols in the resultset?
  
  Regards
  Boris
  


Re: SQL-Transformer

2002-12-13 Thread Boris Althaus



mysql

  - Original Message - 
  From: 
  Geoff 
  Howard 
  To: [EMAIL PROTECTED] 
  
  Sent: Friday, December 13, 2002 4:19 
  PM
  Subject: RE: SQL-Transformer
  
  There is a tag defined but it's not fully 
  implemented, although it may be in the very latest cvs. (it only worked for 
  one particular database) What database are you 
using?
  
  Geoff Howard
  
-Original Message-From: Boris Althaus 
[mailto:[EMAIL PROTECTED]]Sent: Friday, December 13, 
2002 9:45 AMTo: [EMAIL PROTECTED]Subject: 
SQL-Transformer
Hallo Cocoon Users,

does the SQL-Transformer has a map-parameter 
like map:parameter name="show-nr-of-cols"/ or is there a way to 
retrieve the number of cols in the resultset?

Regards
Boris



RE: SQL-Transformer

2002-12-13 Thread Geoff Howard
sorry, just noticed you were talking about sql transformer - i had assumed
esql logicsheet in xsp.  i need more coffee.

try
  map:transform type=sql
...
map:parameter name=show-nr-of-rows value=true/
  /map:transform

then, your results should start off with an attribute nrofrows on rowset,
ie:
rowset nrofrows=2 xmlns=http://apache.org/cocoon/SQL/2.0;

Geoff

-Original Message-
From: Boris Althaus [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: SQL-Transformer


mysql
- Original Message -
From: Geoff Howard
To: [EMAIL PROTECTED]
Sent: Friday, December 13, 2002 4:19 PM
Subject: RE: SQL-Transformer


There is a tag defined but it's not fully implemented, although it may be in
the very latest cvs. (it only worked for one particular database)  What
database are you using?

Geoff Howard
-Original Message-
From: Boris Althaus [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: SQL-Transformer


Hallo Cocoon Users,

does the SQL-Transformer has a map-parameter like map:parameter
name=show-nr-of-cols/ or is there a way to retrieve the number of cols in
the resultset?

Regards
Boris


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Cocoon-2.0.4 possible bug in Sql transformer

2002-12-11 Thread Gabriele Domenichini
Cocoon-2.0.4 seems to repeat namespace declaration in the sql:rowset
element resulting from a sql transformation launching a stored procedure.

I have cocoon 2.0.3 and cocoon 2.0.4 side by side on the same machine.

I call an Oracle stored procedure with SQL transformer
With this code:
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
query lang=1 isstoredprocedure=true
  begin dbchem.scheda_xml('1',?,'30060','1',''); end;
/query
out-parameter sql:nr=1 sql:name=resultset2
sql:type=java.sql.Types.CHAR/
/execute-query
And I obtain this
?xml version=1.0 encoding=UTF-8?
content
sql:rowset xmlns:sql=http://apache.org/cocoon/SQL/2.0;
sql:resultset2: 
content of the out parameter
/sql:resultset2
/sql:rowset
/content

If I use the same invocation on cocoon 2.0.4
I get this error from the same browser (MSIE):

Duplicate attribute. Line 10, Position 52 
 

  rowset xmlns=http://apache.org/cocoon/SQL/2.0;
  xmlns=http://apache.org/cocoon/SQL/2.0;resultset2: 
---^
My system
- jre 
version 1.4.1 
java-vendor Sun Microsystems Inc. 

- operating-system 
name Windows 2000 
architecture x86 
version 5.0 
 
If you confirm I could compile a bug even if It would be my first.
-- 
  Gabriele Domenichini
  [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




xInclude and SQL Transformer NullPointerException

2002-10-16 Thread Martin Schimak

I experience the following problem: I am including fragments of another xml file using 
xinclude and 
the xpointer() syntax. Works fine. If I then want to use the SQLTransformer within the 
same 
pipeline, I get a

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
java.lang.NullPointerException
Original exception : java.lang.Original exception : java.lang.NullPointerException
at org.apache.xml.utils.AttList.getValue(AttList.java:247)
at 
org.apache.cocoon.transformation.SQLTransformer.startQueryElement(SQLTransformer.java:403)
at 
org.apache.cocoon.transformation.SQLTransformer.startTransformingElement(SQLTransformer.java:742)
...

If I take the result of the xinclude step, save it as a file and just process it using 
the same 
SQLTransformer step, everything works fine...

Using 2.03 / Tomcat 4.04, but a recent CVS shows the same behaviour.

I personally didn't find anything in bugzilla, but is it a known bug, or could I have 
done something 
wrong? Any ideas?

Martin.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: xInclude and SQL Transformer NullPointerException

2002-10-16 Thread Timothy Larson

I had a similar problem.  When I used the XInclude transformer, I got
a NullPointerException when I tried to refer to the results with the
cocoon:/ protocol. Here was my solution (bad hack, but it worked):

I made a stylesheet copy-of.xsl that simply copied what it was passed
without changing it.  Then I used this stylesheet after the XInclude
transformer to get rid of the errors:

map:match pattern=somefile.xml
  map:generate src=somefile.xml/
  map:transform type=xinclude/
  map:transform src=copy-of.xsl/
  !-- maybe SLQTransformer will work here now :) --
  map:serialize/
/map:match

map:match pattern=otherfile.xml
  map:generate src=cocoon:/somefile/
  map:serialize/
/map:match

Hope this helps,
Tim

 [EMAIL PROTECTED] 10/16/02 09:27AM 
I experience the following problem: I am including fragments of another xml file using 
xinclude and 
the xpointer() syntax. Works fine. If I then want to use the SQLTransformer within the 
same 
pipeline, I get a

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
java.lang.NullPointerException
Original exception : java.lang.Original exception : java.lang.NullPointerException
at org.apache.xml.utils.AttList.getValue(AttList.java:247)
at 
org.apache.cocoon.transformation.SQLTransformer.startQueryElement(SQLTransformer.java:403)
at 
org.apache.cocoon.transformation.SQLTransformer.startTransformingElement(SQLTransformer.java:742)
...

If I take the result of the xinclude step, save it as a file and just process it using 
the same 
SQLTransformer step, everything works fine...

Using 2.03 / Tomcat 4.04, but a recent CVS shows the same behaviour.

I personally didn't find anything in bugzilla, but is it a known bug, or could I have 
done something 
wrong? Any ideas?

Martin.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Action + Sql Transformer

2002-10-15 Thread aps olute

I've been out of luck trying to get samples to work for Actions and SQL
Transformer. For the sample Action I am receiving a: 
org.apache.cocoon.ProcessingException: The prefix xsp-request for element
xsp-request:get-attribute is not bound.: org.xml.sax.SAXParseException: The
prefix xsp-request for element xsp-request:get-attribute is not bound.

I used  http://localhost:8080/cocoon/fileWhat do I need to do to correct
this?  Btw, this is from the 
http://xml.apache.org/cocoon/userdocs/concepts/actions.html

And for the SQL Transformer sample - no results from database query. I ran the 
http://localhost:8080/cocoon/docs/samples/sql/sqlpage  and just gets the Hello
This is my first Cocoon2 page filled with sql data! I have searched this
newsgroup and found some other who had similar issues but were not able to get
it working either. Someone had mentioned about viewing intermediate results
between a source to sql transformer, or between transformers but I dont know
how
to configure mine to setup a view and see the intermediate xml files. 
Thanks in advance for any assistance.







-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: pipeline or sql transformer problem

2002-09-25 Thread JohnsBrn

I had a similar namespace problem with SQLTransformer. I switched from Xalan to Saxon 
6.5.2 (because of multi-thread issues with database XA transactions) for xslt 
transformations and the problem seems to be gone.

Michael Maluck [EMAIL PROTECTED] wrote:

Now I tried it with esql and a logicsheet. Same problem.
If I use the logicsheet I get an xmlns:xmlns:sql namespace.
Any ideas?

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RES: SQL Transformer with nested query + Filter Transformer = ArrayIndexOutOfBoundsException exception

2002-09-02 Thread Igor Abade V. Leite

Any ideas?

Thanks,
Igor

 -Original message-
 From: Igor Abade V. Leite [mailto:[EMAIL PROTECTED]]
 Data: sexta-feira, 30 de agosto de 2002 11:59
 To: [EMAIL PROTECTED]
 Subject: SQL Transformer with nested query + Filter Transformer =
 ArrayIndexOutOfBoundsException exception
 
 Hi again!
 
   When I use the SQL Transformer with a single table, everything
 goes fine. I can apply the Filter Transformer and I'll achieve the
 desired results.
   But when I use a nested query, I get the following error:
 
 log
 java.lang.ArrayIndexOutOfBoundsException
   at org.apache.xml.utils.IntStack.pop(IntStack.java:127)
   at
 org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.endElement(SAX2DTM.java:1785)
   at

org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.endElement(Incrementa
 lSAXSource_Filter.java:279)
   at

org.apache.xalan.transformer.TransformerHandlerImpl.endElement(Transform
 erHandlerImpl.java:549)
   at

org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:14
 7)
   at

org.apache.cocoon.transformation.FilterTransformer.endElement(FilterTran
 sformer.java:186)
   ...
   ...
 /log
 
 Any ideas?
 
   Thanks in advance,
   Igor
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: SQL Transformer with nested query + Filter Transformer = ArrayIndexOutOfBoundsException exception

2002-09-02 Thread Luca Morandini

Igor,

may you show us your query, the relevant portion of the sitemap and a fragment of the 
SQLTransformer output ?

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

 -Original Message-
 From: Igor Abade V. Leite [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 02, 2002 2:04 PM
 To: [EMAIL PROTECTED]
 Subject: RES: SQL Transformer with nested query + Filter Transformer =
 ArrayIndexOutOfBoundsException exception
 
 
 Any ideas?
 
   Thanks,
   Igor
 
  -Original message-
  From: Igor Abade V. Leite [mailto:[EMAIL PROTECTED]]
  Data: sexta-feira, 30 de agosto de 2002 11:59
  To: [EMAIL PROTECTED]
  Subject: SQL Transformer with nested query + Filter Transformer =
  ArrayIndexOutOfBoundsException exception
  
  Hi again!
  
  When I use the SQL Transformer with a single table, everything
  goes fine. I can apply the Filter Transformer and I'll achieve the
  desired results.
  But when I use a nested query, I get the following error:
  
  log
  java.lang.ArrayIndexOutOfBoundsException
  at org.apache.xml.utils.IntStack.pop(IntStack.java:127)
  at
  org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.endElement(SAX2DTM.java:1785)
  at
 
 org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.endElement(Incrementa
  lSAXSource_Filter.java:279)
  at
 
 org.apache.xalan.transformer.TransformerHandlerImpl.endElement(Transform
  erHandlerImpl.java:549)
  at
 
 org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:14
  7)
  at
 
 org.apache.cocoon.transformation.FilterTransformer.endElement(FilterTran
  sformer.java:186)
  ...
  ...
  /log
  
  Any ideas?
  
  Thanks in advance,
  Igor
  
  
  
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
  
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]
  
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




[SUMMARY] problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-31 Thread Simon Price

Adding this line to the stylesheet fixes the bug.

   xsl:output method=text/

In fact the problem turned out to have absolutely nothing to do with the 
  sql transformer; the problem was earlier in the pipeline but was 
masked because the xml piped into the transformer appeared okay when 
inspected using a view. However, although it serializes and displays in 
the browser, any attempt to transform the subsequent xml that comes out 
of the stylesheet creates an error.

I only discovered this when I started shortening the pipeline and also 
found that if I cut+pasted the xml from the stylesheet transformation 
into a text file, it worked fine if loaded by a file generator and 
immediately piped into the sql transformer!

I assume its a bug in one of cocoon's components.

Go figure :-(

Simon

Simon Price wrote:

 Ah! That's good to know. I can't use Java 1.4.1 because of the old 
 Oracle 8i JDBC driver I'm using but I will try running it under cocoon 
 2.0.3 to see if its a 2.1 bug.
 
 Thanks again.
 
 Simon
 
 Koen Pellegrims wrote:
 
 oops, I just ran your example on my machine, and it ran like a charm :-s

 I must say I'm running tomcat 4.0.4, cocoon 2.0.3 on java 1.4.0...

 Koen


 -Oorspronkelijk bericht-
 Van: Simon Price [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 30 augustus 2002 14:53
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: problems generating input to sql transformer with
 stylesheet (a la Langham  Ziegeler book)


 Koen, thanks but I already tried this. The resultant xml using your
 stylesheet is...

 ?xml version=1.0 encoding=UTF-8?
 user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   xmlns=http://apache.org/cocoon/SQL/2.0;
 
   ecsnp/
   Price/
   Simon/
 /
   /
 /user

 It sort of works but, for some reason, the rowset, row and column name
 tags get omitted by the sql transformer!!!

 In case it helps anyone say why this is, here's the intermediate xml
 from the stylesheet, before it goes into the sql transformer...

 ?xml version=1.0 encoding=UTF-8?
 user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   sql:execute-query
 sql:use-connectionpool-TAL/sql:use-connection
 sql:query
   select
 USERNAME,
 SURNAME,
 INITIALS
   from
 STAFF
   where
 STAFFID = '24'
  /sql:query
   /sql:execute-query
 /user

 Koen Pellegrims wrote:


 try your stylesheet as follows:

 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
sql:execute-query
  sql:use-connectionpool-TAL/sql:use-connection
  sql:query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /sql:query
/sql:execute-query
  /user
/xsl:template
 /xsl:stylesheet

 this is exactly the same approach you would take to generate fo, for
 example.

 Koen.



 -Oorspronkelijk bericht-
 Van: Simon Price [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 30 augustus 2002 13:03
 Aan: [EMAIL PROTECTED]
 Onderwerp: problems generating input to sql transformer with 
 stylesheet
 (a la Langham  Ziegeler book)


 I'm having real problems doing a trivial tranformation (in the style
 of Matthew and Carsten's excellent book).

 I generate xml which then gets transformed by the sql transformer.
 Unfortunately, it only works if I have no containing elements in the
 input to the transformer. I'm guessing its related to the 
 namespace? Or
 is it a bug in the sql transformer? Any suggestions welcomed!

 Here's the full details (stripped down to simplest repro so please 
 don't
 worry about the stylesheet now being pointless)...


 version info:

 tomcat 4.0.1
 java 1.3.1
 cocoon 2.1 head


 sitemap fragment:

  map:match pattern=test3.xml
map:generate src=model/bootstrap.xml/
map:transform src=model/staff_model.xsl/
map:transform type=sql/
map:serialize type=xml/
  /map:match


 model/bootstrap.xml:

 ?xml version=1.0?
 bootstrap/


 model/staff_model.xsl

 ?xml version=1.0?
 xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  xsl:template match=bootstrap
user
  execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
query
  select
USERNAME,
SURNAME,
INITIALS
  from
STAFF
  where
STAFFID = '24'
/query
  /execute-query
/user
  /xsl:template
 /xsl:stylesheet


 error in browser (reformatted by hand to make more readable):

 Multiple colons are not allowed in a name. Error processing resource
 'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, 
 Position 18

 user xmlns:xmlns:sql

problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Simon Price

I'm having real problems doing a trivial tranformation (in the style 
of Matthew and Carsten's excellent book).

I generate xml which then gets transformed by the sql transformer. 
Unfortunately, it only works if I have no containing elements in the 
input to the transformer. I'm guessing its related to the namespace? Or 
is it a bug in the sql transformer? Any suggestions welcomed!

Here's the full details (stripped down to simplest repro so please don't 
worry about the stylesheet now being pointless)...


version info:

tomcat 4.0.1
java 1.3.1
cocoon 2.1 head


sitemap fragment:

   map:match pattern=test3.xml
 map:generate src=model/bootstrap.xml/
 map:transform src=model/staff_model.xsl/
 map:transform type=sql/
 map:serialize type=xml/
   /map:match


model/bootstrap.xml:

?xml version=1.0?
bootstrap/


model/staff_model.xsl

?xml version=1.0?
xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   xsl:template match=bootstrap
 user
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
 use-connectionpool-TAL/use-connection
 query
   select
 USERNAME,
 SURNAME,
 INITIALS
   from
 STAFF
   where
 STAFFID = '24'
 /query
   /execute-query
 /user
   /xsl:template
/xsl:stylesheet


error in browser (reformatted by hand to make more readable):

Multiple colons are not allowed in a name. Error processing resource 
'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18

user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  -^
   rowset xmlns=http://apache.org/cocoon/SQL/2.0; 
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 row
   usernameecsnp/username
   surnamePrice/surname
   initialsS/initials
 /row
   /rowset
/user

To help diagnose, the intermediate XML that comes out of the stylesheet 
transformation, before going into the sql transformer is:

   ?xml version=1.0 encoding=UTF-8 ?
   user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
   use-connectionpool-TAL/use-connection
   queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID = 
'24'/query
   /execute-query
   /user

Contrast this with the XML at the same point if the root user element 
is removed from the stylesheet (THIS ONE WORKS):

   ?xml version=1.0 encoding=UTF-8 ?
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0; 
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   use-connectionpool-TAL/use-connection
   queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID = 
'24'/query
   /execute-query


Thanks in advance

Simon

---
Simon Price
Institute for Learning and Research Technology
University of Bristol
8-10 Berkeley Square
Bristol BS8 1HH
United Kingdom

Direct: +44 (0)7071 226 720
Office: +44 (0)117 928 7193
Fax: +44 (0)117 928 7112
[EMAIL PROTECTED]
http://www.ilrt.bristol.ac.uk



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Koen Pellegrims

try your stylesheet as follows:

 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
sql:execute-query
  sql:use-connectionpool-TAL/sql:use-connection
  sql:query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /sql:query
/sql:execute-query
  /user
/xsl:template
 /xsl:stylesheet

this is exactly the same approach you would take to generate fo, for
example.

Koen.

 -Oorspronkelijk bericht-
 Van: Simon Price [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 30 augustus 2002 13:03
 Aan: [EMAIL PROTECTED]
 Onderwerp: problems generating input to sql transformer with stylesheet
 (a la Langham  Ziegeler book)


 I'm having real problems doing a trivial tranformation (in the style
 of Matthew and Carsten's excellent book).

 I generate xml which then gets transformed by the sql transformer.
 Unfortunately, it only works if I have no containing elements in the
 input to the transformer. I'm guessing its related to the namespace? Or
 is it a bug in the sql transformer? Any suggestions welcomed!

 Here's the full details (stripped down to simplest repro so please don't
 worry about the stylesheet now being pointless)...


 version info:

 tomcat 4.0.1
 java 1.3.1
 cocoon 2.1 head


 sitemap fragment:

map:match pattern=test3.xml
  map:generate src=model/bootstrap.xml/
  map:transform src=model/staff_model.xsl/
  map:transform type=sql/
  map:serialize type=xml/
/map:match


 model/bootstrap.xml:

 ?xml version=1.0?
 bootstrap/


 model/staff_model.xsl

 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
  use-connectionpool-TAL/use-connection
  query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /query
/execute-query
  /user
/xsl:template
 /xsl:stylesheet


 error in browser (reformatted by hand to make more readable):

 Multiple colons are not allowed in a name. Error processing resource
 'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18

 user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   -^
rowset xmlns=http://apache.org/cocoon/SQL/2.0;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  row
usernameecsnp/username
surnamePrice/surname
initialsS/initials
  /row
/rowset
 /user

 To help diagnose, the intermediate XML that comes out of the stylesheet
 transformation, before going into the sql transformer is:

?xml version=1.0 encoding=UTF-8 ?
user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
 '24'/query
/execute-query
/user

 Contrast this with the XML at the same point if the root user element
 is removed from the stylesheet (THIS ONE WORKS):

?xml version=1.0 encoding=UTF-8 ?
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
 '24'/query
/execute-query


 Thanks in advance

 Simon

 ---
 Simon Price
 Institute for Learning and Research Technology
 University of Bristol
 8-10 Berkeley Square
 Bristol BS8 1HH
 United Kingdom

 Direct: +44 (0)7071 226 720
 Office: +44 (0)117 928 7193
 Fax: +44 (0)117 928 7112
 [EMAIL PROTECTED]
 http://www.ilrt.bristol.ac.uk



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Antonio Gallardo Rivera

What Database are you using?

PostgreSQL has an error if you are using the type INT2 or SMALLINT for the 
key. More info in datatypes in postgreSQL.

Antonio Gallardo

El Viernes, 30 de Agosto de 2002 05:02, Simon Price escribió:
 I'm having real problems doing a trivial tranformation (in the style
 of Matthew and Carsten's excellent book).

 I generate xml which then gets transformed by the sql transformer.
 Unfortunately, it only works if I have no containing elements in the
 input to the transformer. I'm guessing its related to the namespace? Or
 is it a bug in the sql transformer? Any suggestions welcomed!

 Here's the full details (stripped down to simplest repro so please don't
 worry about the stylesheet now being pointless)...


 version info:

 tomcat 4.0.1
 java 1.3.1
 cocoon 2.1 head


 sitemap fragment:

map:match pattern=test3.xml
  map:generate src=model/bootstrap.xml/
  map:transform src=model/staff_model.xsl/
  map:transform type=sql/
  map:serialize type=xml/
/map:match


 model/bootstrap.xml:

 ?xml version=1.0?
 bootstrap/


 model/staff_model.xsl

 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
  use-connectionpool-TAL/use-connection
  query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /query
/execute-query
  /user
/xsl:template
 /xsl:stylesheet


 error in browser (reformatted by hand to make more readable):

 Multiple colons are not allowed in a name. Error processing resource
 'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18

 user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   -^
rowset xmlns=http://apache.org/cocoon/SQL/2.0;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  row
usernameecsnp/username
surnamePrice/surname
initialsS/initials
  /row
/rowset
 /user

 To help diagnose, the intermediate XML that comes out of the stylesheet
 transformation, before going into the sql transformer is:

?xml version=1.0 encoding=UTF-8 ?
user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
 '24'/query
/execute-query
/user

 Contrast this with the XML at the same point if the root user element
 is removed from the stylesheet (THIS ONE WORKS):

?xml version=1.0 encoding=UTF-8 ?
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
 '24'/query
/execute-query


 Thanks in advance

 Simon

 ---
 Simon Price
 Institute for Learning and Research Technology
 University of Bristol
 8-10 Berkeley Square
 Bristol BS8 1HH
 United Kingdom

 Direct: +44 (0)7071 226 720
 Office: +44 (0)117 928 7193
 Fax: +44 (0)117 928 7112
 [EMAIL PROTECTED]
 http://www.ilrt.bristol.ac.uk



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Simon Price

Koen, thanks but I already tried this. The resultant xml using your 
stylesheet is...

?xml version=1.0 encoding=UTF-8?
user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   xmlns=http://apache.org/cocoon/SQL/2.0;
 
   ecsnp/
   Price/
   Simon/
 /
   /
/user

It sort of works but, for some reason, the rowset, row and column name 
tags get omitted by the sql transformer!!!

In case it helps anyone say why this is, here's the intermediate xml 
from the stylesheet, before it goes into the sql transformer...

?xml version=1.0 encoding=UTF-8?
user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   sql:execute-query
 sql:use-connectionpool-TAL/sql:use-connection
 sql:query
   select
 USERNAME,
 SURNAME,
 INITIALS
   from
 STAFF
   where
 STAFFID = '24'
  /sql:query
   /sql:execute-query
/user

Koen Pellegrims wrote:

 try your stylesheet as follows:
 
  ?xml version=1.0?
  xsl:stylesheet version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 xsl:template match=bootstrap
   user
 sql:execute-query
   sql:use-connectionpool-TAL/sql:use-connection
   sql:query
 select
   USERNAME,
   SURNAME,
   INITIALS
 from
   STAFF
 where
   STAFFID = '24'
   /sql:query
 /sql:execute-query
   /user
 /xsl:template
  /xsl:stylesheet
 
 this is exactly the same approach you would take to generate fo, for
 example.
 
 Koen.
 
 
-Oorspronkelijk bericht-
Van: Simon Price [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 30 augustus 2002 13:03
Aan: [EMAIL PROTECTED]
Onderwerp: problems generating input to sql transformer with stylesheet
(a la Langham  Ziegeler book)


I'm having real problems doing a trivial tranformation (in the style
of Matthew and Carsten's excellent book).

I generate xml which then gets transformed by the sql transformer.
Unfortunately, it only works if I have no containing elements in the
input to the transformer. I'm guessing its related to the namespace? Or
is it a bug in the sql transformer? Any suggestions welcomed!

Here's the full details (stripped down to simplest repro so please don't
worry about the stylesheet now being pointless)...


version info:

tomcat 4.0.1
java 1.3.1
cocoon 2.1 head


sitemap fragment:

   map:match pattern=test3.xml
 map:generate src=model/bootstrap.xml/
 map:transform src=model/staff_model.xsl/
 map:transform type=sql/
 map:serialize type=xml/
   /map:match


model/bootstrap.xml:

?xml version=1.0?
bootstrap/


model/staff_model.xsl

?xml version=1.0?
xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   xsl:template match=bootstrap
 user
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
 use-connectionpool-TAL/use-connection
 query
   select
 USERNAME,
 SURNAME,
 INITIALS
   from
 STAFF
   where
 STAFFID = '24'
 /query
   /execute-query
 /user
   /xsl:template
/xsl:stylesheet


error in browser (reformatted by hand to make more readable):

Multiple colons are not allowed in a name. Error processing resource
'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18

user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  -^
   rowset xmlns=http://apache.org/cocoon/SQL/2.0;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 row
   usernameecsnp/username
   surnamePrice/surname
   initialsS/initials
 /row
   /rowset
/user

To help diagnose, the intermediate XML that comes out of the stylesheet
transformation, before going into the sql transformer is:

   ?xml version=1.0 encoding=UTF-8 ?
   user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
   use-connectionpool-TAL/use-connection
   queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
'24'/query
   /execute-query
   /user

Contrast this with the XML at the same point if the root user element
is removed from the stylesheet (THIS ONE WORKS):

   ?xml version=1.0 encoding=UTF-8 ?
   execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   use-connectionpool-TAL/use-connection
   queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
'24'/query
   /execute-query


Thanks in advance

Simon

---
Simon Price
Institute for Learning and Research Technology
University of Bristol
8-10 Berkeley Square
Bristol BS8 1HH
United Kingdom

Direct: +44 (0)7071 226 720
Office: +44 (0)117 928 7193
Fax: +44 (0)117 928 7112
[EMAIL PROTECTED]
http://www.ilrt.bristol.ac.uk

RE: problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Koen Pellegrims

oops, I just ran your example on my machine, and it ran like a charm :-s

I must say I'm running tomcat 4.0.4, cocoon 2.0.3 on java 1.4.0...

Koen

 -Oorspronkelijk bericht-
 Van: Simon Price [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 30 augustus 2002 14:53
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: problems generating input to sql transformer with
 stylesheet (a la Langham  Ziegeler book)


 Koen, thanks but I already tried this. The resultant xml using your
 stylesheet is...

 ?xml version=1.0 encoding=UTF-8?
 user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xmlns=http://apache.org/cocoon/SQL/2.0;
  
ecsnp/
Price/
Simon/
  /
/
 /user

 It sort of works but, for some reason, the rowset, row and column name
 tags get omitted by the sql transformer!!!

 In case it helps anyone say why this is, here's the intermediate xml
 from the stylesheet, before it goes into the sql transformer...

 ?xml version=1.0 encoding=UTF-8?
 user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
sql:execute-query
  sql:use-connectionpool-TAL/sql:use-connection
  sql:query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
   /sql:query
/sql:execute-query
 /user

 Koen Pellegrims wrote:

  try your stylesheet as follows:
 
   ?xml version=1.0?
   xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  xsl:template match=bootstrap
user
  sql:execute-query
sql:use-connectionpool-TAL/sql:use-connection
sql:query
  select
USERNAME,
SURNAME,
INITIALS
  from
STAFF
  where
STAFFID = '24'
/sql:query
  /sql:execute-query
/user
  /xsl:template
   /xsl:stylesheet
 
  this is exactly the same approach you would take to generate fo, for
  example.
 
  Koen.
 
 
 -Oorspronkelijk bericht-
 Van: Simon Price [mailto:[EMAIL PROTECTED]]
 Verzonden: vrijdag 30 augustus 2002 13:03
 Aan: [EMAIL PROTECTED]
 Onderwerp: problems generating input to sql transformer with stylesheet
 (a la Langham  Ziegeler book)
 
 
 I'm having real problems doing a trivial tranformation (in the style
 of Matthew and Carsten's excellent book).
 
 I generate xml which then gets transformed by the sql transformer.
 Unfortunately, it only works if I have no containing elements in the
 input to the transformer. I'm guessing its related to the namespace? Or
 is it a bug in the sql transformer? Any suggestions welcomed!
 
 Here's the full details (stripped down to simplest repro so please don't
 worry about the stylesheet now being pointless)...
 
 
 version info:
 
 tomcat 4.0.1
 java 1.3.1
 cocoon 2.1 head
 
 
 sitemap fragment:
 
map:match pattern=test3.xml
  map:generate src=model/bootstrap.xml/
  map:transform src=model/staff_model.xsl/
  map:transform type=sql/
  map:serialize type=xml/
/map:match
 
 
 model/bootstrap.xml:
 
 ?xml version=1.0?
 bootstrap/
 
 
 model/staff_model.xsl
 
 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
  use-connectionpool-TAL/use-connection
  query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /query
/execute-query
  /user
/xsl:template
 /xsl:stylesheet
 
 
 error in browser (reformatted by hand to make more readable):
 
 Multiple colons are not allowed in a name. Error processing resource
 'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18
 
 user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   -^
rowset xmlns=http://apache.org/cocoon/SQL/2.0;
 xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  row
usernameecsnp/username
surnamePrice/surname
initialsS/initials
  /row
/rowset
 /user
 
 To help diagnose, the intermediate XML that comes out of the stylesheet
 transformation, before going into the sql transformer is:
 
?xml version=1.0 encoding=UTF-8 ?
user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
 '24'/query
/execute-query
/user
 
 Contrast this with the XML at the same point if the root user element
 is removed from the stylesheet (THIS ONE WORKS):
 
?xml version=1.0 encoding=UTF-8 ?
execute-query xmlns=http://apache.org

SQL Transformer with nested query + Filter Transformer = ArrayIndexOutOfBoundsException exception

2002-08-30 Thread Igor Abade V. Leite

Hi again!

When I use the SQL Transformer with a single table, everything
goes fine. I can apply the Filter Transformer and I'll achieve the
desired results.
But when I use a nested query, I get the following error:

log
java.lang.ArrayIndexOutOfBoundsException
at org.apache.xml.utils.IntStack.pop(IntStack.java:127)
at
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.endElement(SAX2DTM.java:1785)
at
org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.endElement(Incrementa
lSAXSource_Filter.java:279)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endElement(Transform
erHandlerImpl.java:549)
at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:14
7)
at
org.apache.cocoon.transformation.FilterTransformer.endElement(FilterTran
sformer.java:186)
...
...
/log

Any ideas?

Thanks in advance,
Igor



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: problems generating input to sql transformer with stylesheet (a la Langham Ziegeler book)

2002-08-30 Thread Simon Price

Ah! That's good to know. I can't use Java 1.4.1 because of the old 
Oracle 8i JDBC driver I'm using but I will try running it under cocoon 
2.0.3 to see if its a 2.1 bug.

Thanks again.

Simon

Koen Pellegrims wrote:

 oops, I just ran your example on my machine, and it ran like a charm :-s
 
 I must say I'm running tomcat 4.0.4, cocoon 2.0.3 on java 1.4.0...
 
 Koen
 
 
-Oorspronkelijk bericht-
Van: Simon Price [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 30 augustus 2002 14:53
Aan: [EMAIL PROTECTED]
Onderwerp: Re: problems generating input to sql transformer with
stylesheet (a la Langham  Ziegeler book)


Koen, thanks but I already tried this. The resultant xml using your
stylesheet is...

?xml version=1.0 encoding=UTF-8?
user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   xmlns=http://apache.org/cocoon/SQL/2.0;
 
   ecsnp/
   Price/
   Simon/
 /
   /
/user

It sort of works but, for some reason, the rowset, row and column name
tags get omitted by the sql transformer!!!

In case it helps anyone say why this is, here's the intermediate xml
from the stylesheet, before it goes into the sql transformer...

?xml version=1.0 encoding=UTF-8?
user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   sql:execute-query
 sql:use-connectionpool-TAL/sql:use-connection
 sql:query
   select
 USERNAME,
 SURNAME,
 INITIALS
   from
 STAFF
   where
 STAFFID = '24'
  /sql:query
   /sql:execute-query
/user

Koen Pellegrims wrote:


try your stylesheet as follows:

 ?xml version=1.0?
 xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:sql=http://apache.org/cocoon/SQL/2.0;
xsl:template match=bootstrap
  user
sql:execute-query
  sql:use-connectionpool-TAL/sql:use-connection
  sql:query
select
  USERNAME,
  SURNAME,
  INITIALS
from
  STAFF
where
  STAFFID = '24'
  /sql:query
/sql:execute-query
  /user
/xsl:template
 /xsl:stylesheet

this is exactly the same approach you would take to generate fo, for
example.

Koen.



-Oorspronkelijk bericht-
Van: Simon Price [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 30 augustus 2002 13:03
Aan: [EMAIL PROTECTED]
Onderwerp: problems generating input to sql transformer with stylesheet
(a la Langham  Ziegeler book)


I'm having real problems doing a trivial tranformation (in the style
of Matthew and Carsten's excellent book).

I generate xml which then gets transformed by the sql transformer.
Unfortunately, it only works if I have no containing elements in the
input to the transformer. I'm guessing its related to the namespace? Or
is it a bug in the sql transformer? Any suggestions welcomed!

Here's the full details (stripped down to simplest repro so please don't
worry about the stylesheet now being pointless)...


version info:

tomcat 4.0.1
java 1.3.1
cocoon 2.1 head


sitemap fragment:

  map:match pattern=test3.xml
map:generate src=model/bootstrap.xml/
map:transform src=model/staff_model.xsl/
map:transform type=sql/
map:serialize type=xml/
  /map:match


model/bootstrap.xml:

?xml version=1.0?
bootstrap/


model/staff_model.xsl

?xml version=1.0?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  xsl:template match=bootstrap
user
  execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
use-connectionpool-TAL/use-connection
query
  select
USERNAME,
SURNAME,
INITIALS
  from
STAFF
  where
STAFFID = '24'
/query
  /execute-query
/user
  /xsl:template
/xsl:stylesheet


error in browser (reformatted by hand to make more readable):

Multiple colons are not allowed in a name. Error processing resource
'http://localhost:8080/cocoon/tal/admin/test3.xml'. Line 2, Position 18

user xmlns:xmlns:sql=http://apache.org/cocoon/SQL/2.0;
 -^
  rowset xmlns=http://apache.org/cocoon/SQL/2.0;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
row
  usernameecsnp/username
  surnamePrice/surname
  initialsS/initials
/row
  /rowset
/user

To help diagnose, the intermediate XML that comes out of the stylesheet
transformation, before going into the sql transformer is:

  ?xml version=1.0 encoding=UTF-8 ?
  user xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
  use-connectionpool-TAL/use-connection
  queryselect USERNAME, SURNAME, INITIALS from STAFF where STAFFID =
'24'/query
  /execute-query
  /user

Contrast this with the XML at the same point if the root user element
is removed from the stylesheet (THIS ONE WORKS):

  ?xml version=1.0 encoding=UTF-8 ?
  execute-query xmlns=http://apache.org/cocoon/SQL/2.0

Generic SQL transformer output

2002-08-19 Thread Alan Hodgkinson


Dear All,

I'm trying to implement a set of XSP sheets to manage
administrative records in a database. This merely means
implementing insert, update and delete for records in
a number of different tables.

Naturally, I'm striving for a generic solution so that 
I can use the same insert/update/elete functionality on
different database tables just by changing a table 
name parameter (most likely in the sitemap).

My problem is that the output generated by the 
SQLTransformer gives me row's, which are fine, except 
that they contain elements named after the columns names. 
I'd rather have a series of 

  column id=columnNamecolumnValue/column

tags (or something equivalent). My goal is to be able to
transform the output into a display table or input form.

My questions:

1. Is it possible to instruct the SQLTransformer (or
if not, the esql logicsheet) to generate column
tags that contain the column name and value.

2. Is there some XSLT trick I can use to sidestep the
problem entirely? E.g. Is it possible to write an XSLT 
transformation that converts the current SQLTransformer 
output to the format that I want?

3. Is there some way of getting the meta data associated
with the data being returned by the SQLTransformer? I would
like this in order to set up the table/column headers.

4. Is there already some clever code (in the Cocoon code/
examples that I haven't yet been able to find yet) that 
does this already?

Thanks in advance,

Alan.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Empty Rows Using SQL Transformer

2002-07-02 Thread Seth Ladd

Hello,

I did some searching in the mailing list archives, but didn't find the 
problem that I am experiencing (forgive me if I didn't phrase my search 
right).

I am running:
Cocoon 2.x (nightly build on Jun 18)
Resin 2.0.2
Oracle 8.1.7
oracle thin drivers for 8.1.7 (classes12.zip)
JDK 1.3.1
Solaris 8

I am using the SQL transformer, which up to now has been performing 
wonderfully.  I moved my WAR to a new (but identical as far as I can 
tell) machine, and now my database results come back as empty, but I get 
the right amount of rows back.

Example transformer:
xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:req=http://xml.apache.org/cocoon/requestgenerator/2.0;
 xsl:template match=/
 results
 execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
 query name=secevents
SELECT count(*) c from security_event_log
 /query
 /execute-query
 /results
 /xsl:template
/xsl:stylesheet

This doesn't report any errors, but returns this:

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 
xmlns:req=http://xml.apache.org/cocoon/requestgenerator/2.0;
 xsl:template match=/
 results
 rowset name=seceventsrowc//row/rowset
 /results
 /xsl:template
/xsl:stylesheet

It also exhibits this behavior on larger queries.  This query was tested 
in sqlplus.

Does anyone know why it wouldn't return the result?  The same exact 
binaries work in our QA environment, so they've been seen to work (a 
lot).  I think it must be a configuration issue.  But I'm not sure what 
the error would be, since I don't see errors anywhere, and the result is 
pretty close.

Any ideas, tips, or help would be greatly appreciated.

thanks very much!
Seth


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: please, please, ... help with SQL transformer

2002-04-11 Thread Hahn Kurt (CHA)

Since nobody else answered, I'll give it a try.
I don't know how that works with Access, but your datasource declaration
seems incomplete. E.g. here's mine (of course it looks differently because
your using JDBC-ODCB for Access, whereas with Oracle, there's a native
JDBC-driver):
datasources
!-- Oracle DB -- 
jdbc name=aigle_oracle_pool 
pool-controller min=5 max=10 oradb=true / 
auto-committrue/auto-commit 
dburljdbc:oracle:thin:@pallas6:1521:PAIG/dburl 
userMyUsername/user 
passwordMyPW/password 
/jdbc

Something else you could try is, in web.xml, comment out the IBM Websphere
section, and place your declaration in front of the other one. Can sometimes
help in case of a strange classloader problem.

Otherwise, give us more info. Check the various logs for that. Or try to use
Oracle directly, I think it is easier for Java applications. 

Did you test your connection in another front-end application? E.g. a small
Java program,just to see if it works.

Regards 
Kurt
-Message d'origine-
De: Jerónimo Molina [mailto:[EMAIL PROTECTED]]
Date: mercredi, 10. avril 2002 16:57
À: [EMAIL PROTECTED]
Objet: please, please, ... help with SQL transformer


Hi all  (sorry for my poor english):

My name's Jeronimo Molina, and I'm neby with cocoon.
I'm trying to work with SQL transformers, for generate an HTML page
with
data stored in a ACCESS database on my machine (it's my first work with
cocoon, so I don't want to do this with ORACLE any other DB).

I'm trying to do this at the next steps:

1.- Configure the JDBC-ODBC driver at the web.xml file, by adding

sun.jdbc.odbc.JdbcOdbcDriver

as shown bellow:

init-param
param-nameload-class/param-name
!-- For IBM WebSphere
com.ibm.servlet.classloader.Handler --

!-- For Database Driver --
oprg.hsqldb.jdbcDriver

!-- For JDBC:ODBC --
sun.jdbc.odbc.JdbcOdbcDriver
/param-value
/init-pram

2.- Configure the connection ad the cocoon.xml file as shown bellow:

datasources
jdbc name=personas
dburljdbc:odbc:nombres/dburl
/jdbc
/datasources

Note that nombres is the name of the ODBC I've just created
pointing to my
access database.

3.- Configure the sitemap.xmap file to use my new connection. I've
done
this modifying a line:


map:match pattern=sql/*
map:generate src=docs/samples/sql/{1}.xml/
map:transform type=sql
map:parameter name=use-connection
value=personas/
/map:transform
map:transform
src=stylesheets/simple-sql2html.xsl/
map:serialize/
/map:match


4.- I've also modified the sql-page.xml, putting the code

query
select id,nombre from nombres
/query

(where nombres is the table name)

in order of the query example provided in that file.

BUT I don't get the data stored in my access database, and I
don't know
why.

please, can anyone help me?

Thanks... Jeronimo.







-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: please, please, ... help with SQL transformer

2002-04-11 Thread Aitziber Zubieta

Thanks a lot for your idea but it doesn't work. I'm just making test with
Access Database.

I will be very glad if you have any other idea.

- Original Message -
From: Hahn Kurt (CHA) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 8:49 AM
Subject: RE: please, please, ... help with SQL transformer


Since nobody else answered, I'll give it a try.
I don't know how that works with Access, but your datasource declaration
seems incomplete. E.g. here's mine (of course it looks differently because
your using JDBC-ODCB for Access, whereas with Oracle, there's a native
JDBC-driver):
datasources
!-- Oracle DB --
jdbc name=aigle_oracle_pool
pool-controller min=5 max=10 oradb=true /
auto-committrue/auto-commit
dburljdbc:oracle:thin:@pallas6:1521:PAIG/dburl
userMyUsername/user
passwordMyPW/password
/jdbc

Something else you could try is, in web.xml, comment out the IBM Websphere
section, and place your declaration in front of the other one. Can sometimes
help in case of a strange classloader problem.

Otherwise, give us more info. Check the various logs for that. Or try to use
Oracle directly, I think it is easier for Java applications.

Did you test your connection in another front-end application? E.g. a small
Java program,just to see if it works.

Regards
Kurt
-Message d'origine-
De: Jerónimo Molina [mailto:[EMAIL PROTECTED]]
Date: mercredi, 10. avril 2002 16:57
À: [EMAIL PROTECTED]
Objet: please, please, ... help with SQL transformer


Hi all  (sorry for my poor english):

My name's Jeronimo Molina, and I'm neby with cocoon.
I'm trying to work with SQL transformers, for generate an HTML page
with
data stored in a ACCESS database on my machine (it's my first work with
cocoon, so I don't want to do this with ORACLE any other DB).

I'm trying to do this at the next steps:

1.- Configure the JDBC-ODBC driver at the web.xml file, by adding

sun.jdbc.odbc.JdbcOdbcDriver

as shown bellow:

init-param
param-nameload-class/param-name
!-- For IBM WebSphere
com.ibm.servlet.classloader.Handler --

!-- For Database Driver --
oprg.hsqldb.jdbcDriver

!-- For JDBC:ODBC --
sun.jdbc.odbc.JdbcOdbcDriver
/param-value
/init-pram

2.- Configure the connection ad the cocoon.xml file as shown bellow:

datasources
jdbc name=personas
dburljdbc:odbc:nombres/dburl
/jdbc
/datasources

Note that nombres is the name of the ODBC I've just created
pointing to my
access database.

3.- Configure the sitemap.xmap file to use my new connection. I've
done
this modifying a line:


map:match pattern=sql/*
map:generate src=docs/samples/sql/{1}.xml/
map:transform type=sql
map:parameter name=use-connection
value=personas/
/map:transform
map:transform
src=stylesheets/simple-sql2html.xsl/
map:serialize/
/map:match


4.- I've also modified the sql-page.xml, putting the code

query
select id,nombre from nombres
/query

(where nombres is the table name)

in order of the query example provided in that file.

BUT I don't get the data stored in my access database, and I
don't know
why.

please, can anyone help me?

Thanks... Jeronimo.







-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




[XSL] please, help with SQL transformer

2002-04-10 Thread Aitziber Zubieta

Hi all  (sorry for my poor english):

My name's Aitziber, and I'm neby with cocoon.
I'm trying to work with SQL transformers, for generate an HTML page with
data stored in a ACCESS database on my machine (it's my first work with
cocoon, so I don't want to do this with ORACLE any other DB).

I'm trying to do this at the next steps:

1.- Configure the JDBC-ODBC driver at the web.xml file, by adding

sun.jdbc.odbc.JdbcOdbcDriver

as shown bellow:

init-param
param-nameload-class/param-name
!-- For IBM WebSphere
com.ibm.servlet.classloader.Handler --

!-- For Database Driver --
oprg.hsqldb.jdbcDriver

!-- For JDBC:ODBC --
sun.jdbc.odbc.JdbcOdbcDriver
/param-value
/init-pram

2.- Configure the connection ad the cocoon.xml file as shown bellow:

datasources
jdbc name=personas
dburljdbc:odbc:nombres/dburl
/jdbc
/datasources

Note that nombres is the name of the ODBC I've just created pointing to my
access database.

3.- Configure the sitemap.xmap file to use my new connection. I've done
this modifying a line:


map:match pattern=sql/*
map:generate src=docs/samples/sql/{1}.xml/
map:transform type=sql
map:parameter name=use-connection value=personas/
/map:transform
map:transform src=stylesheets/simple-sql2html.xsl/
map:serialize/
/map:match


4.- I've also modified the sql-page.xml, putting the code

?xml version=1.0?
page xmlns:sql=http://apache.org/cocoon/SQL/2.0;

content
execute-query 
xmlns=http://apache.org/cocoon/SQL/2.0;
query
select id,nombre from nombres
/query
/execute-query
/content
/page

(where nombres is the table name)

in order of the query example provided in that file.

BUT I don't get the data stored in my access database, and I don't know
why.

please, can anyone help me?

Thanks... Aitziber.





-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




please, please, ... help with SQL transformer

2002-04-10 Thread Jerónimo Molina

Hi all  (sorry for my poor english):

My name's Jeronimo Molina, and I'm neby with cocoon.
I'm trying to work with SQL transformers, for generate an HTML page with
data stored in a ACCESS database on my machine (it's my first work with
cocoon, so I don't want to do this with ORACLE any other DB).

I'm trying to do this at the next steps:

1.- Configure the JDBC-ODBC driver at the web.xml file, by adding

sun.jdbc.odbc.JdbcOdbcDriver

as shown bellow:

init-param
param-nameload-class/param-name
!-- For IBM WebSphere
com.ibm.servlet.classloader.Handler --

!-- For Database Driver --
oprg.hsqldb.jdbcDriver

!-- For JDBC:ODBC --
sun.jdbc.odbc.JdbcOdbcDriver
/param-value
/init-pram

2.- Configure the connection ad the cocoon.xml file as shown bellow:

datasources
jdbc name=personas
dburljdbc:odbc:nombres/dburl
/jdbc
/datasources

Note that nombres is the name of the ODBC I've just created pointing 
to my
access database.

3.- Configure the sitemap.xmap file to use my new connection. I've done
this modifying a line:


map:match pattern=sql/*
map:generate src=docs/samples/sql/{1}.xml/
map:transform type=sql
map:parameter name=use-connection value=personas/
/map:transform
map:transform src=stylesheets/simple-sql2html.xsl/
map:serialize/
/map:match


4.- I've also modified the sql-page.xml, putting the code

query
select id,nombre from nombres
/query

(where nombres is the table name)

in order of the query example provided in that file.

BUT I don't get the data stored in my access database, and I don't know
why.

please, can anyone help me?

Thanks... Jeronimo.







-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: Sql Transformer

2002-03-25 Thread William Moore

Markus

Did you get ny replies off-list to your question?

I too had lots of problems with SQLTransformer, but managed to find 
workarounds.

In particular there seems to be a problem with namespaces. It is described 
(and fixed) by Christopher Watson in the message with subject RE: Cocoon 
2.0 release, IE5.5, XML NAMESPACE dated 2001-12-03 23:35:03. His message 
is in the archives at http://marc.theaimsgroup.com/?l=xml-cocoon-
usersm=100742253606131

I never used the serverpages generator, so your problem may be somewhere 
else. If you send me your sitemap and some of the xml xsl files, I might 
be able to help some more.

Regards

William

On Sunday, March 24, 2002, at 11:20  am, Markus Blank wrote:

 Hi,
 I created an xml File with an Insert into statement. The xsl File should 
 show text like Database succesfully updated. Following Parameters were 
 stored in the db  and so on.
  
 But I always get a nullpointer exception at the serverpages generator.
  
 If the xsl file is commented out in the sitemap the database will be 
 updated-but the error appears. If the stylesheet is not commented out the 
 error appears and the db won´t be updated.
  
 I tried a simple xml file -(insert into mytable Values ('aa')) and chose 
 the xml serializer-but my browser couldn´t display the xml code.
  
 Could anyone help me to insert data using sql transformer without a 
 nullpointer exception
  
 Markus


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Sql Transformer

2002-03-24 Thread Markus Blank



Hi,
I created an xml File with an Insert into 
statement. The xsl File should show text like Database succesfully updated. 
Following Parameters were stored in the db  and so on.

But I always get a nullpointer exception at the 
serverpages generator.

If the xsl file is commented out in the sitemap the 
database will be updated-but the error appears. If the stylesheet is not 
commented out the error appears and the db won´t be updated.

I tried a simple xml file -(insert into mytable 
Values ('aa')) and chose the xml serializer-but my browser couldn´t display the 
xml code.

Could anyone help me to insert data using sql 
transformer without a nullpointer exception

Markus


RE: two subqueries in sql transformer xml

2002-03-21 Thread Argyn Kuketayev

Sorry, I got it: current SQLTransformer doesn't queries on the same level.
So, I can't have: 

  execute-query xmlns=http://apache.org/cocoon/SQL/2.0; 
   query name=materials...   /query

   execute-query
query name=facility ... /query
   /execute-query

   execute-query
query name=component ... /query
   /execute-query

  /execute-query

thanx!

-Original Message-
From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 12:52 PM
To: '[EMAIL PROTECTED]'
Subject: two subqueries in sql transformer xml


I want to put two subqueries in xml file for sql transformer. It doesn't
work , says: errorORA-00933: SQL command not properly ended/error 


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




SQL Transformer after XSL with copy-of

2002-03-05 Thread Rigamonti Vittorio

Hi,

I have a problem with SQL transformer and XSL copy-of tag.

I already read something similar in the mail archive but I didn't understand
if the problem has a solution.

I set up a simple test case for the problem, this is the recipe:

you need an xml source file (copy.xml) like this:
-
myQuery
  select * from actor
/myQuery


and an xsl file (copy.xsl):
---
  xsl:template match=myQuery
page xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  xsl:copy-of select=./
  execute-query xmlns=http://apache.org/cocoon/SQL/2.0;
query isstoredprocedure=false
  xsl:value-of select=./
/query
  /execute-query
/page
  /xsl:template
/xsl:stylesheet
--

and the match element in sitemap.xmap:
---
   map:match pattern=copy
 map:generate src=path-to-copy/copy.xml/
 map:transform src=path-to-copy/copy.xsl/
 map:transform type=sql
   map:parameter name=use-connection value=personnel/
 /map:transform 
 map:serialize type=xml/
   /map:match
---

Of course you need also the correct configuration for the datasource and a
table actor on your db.


Now,

if I access the cocoon/copy url on my system
(w2k+tomcat3.3+cocoon2.0.1+mysql) I get a very long exception (you can find
it below).

If I comment out the sql transformer step in sitemap I get in the browser a
correct xml document.

If I comment out the copy-of tag in the xsl, cocoon returns me the correct
query result.
So, seems that the problem is in the some strange conflict between
copy-of/sqlt...

Can someone confirm my supposition? 
Is this problem solved? (If yes sorry for the time wasted!)

Thanks,
Vittorio


Original exception : java.lang.RuntimeException:
java.lang.NullPointerException 
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:) 
at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:182)

at org.apache.cocoon.components.source.URLSource.toSAX(URLSource.java:331) 
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109) 
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(Abstract
EventPipeline.java:118) 
at
org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(Abstrac
tStreamPipeline.java:149) 
at org.apache.cocoon.www.sitemap_xmap.matchN104AD(sitemap_xmap.java:6282) 
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3019) 
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2444) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:180) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:127) 
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:144)

at org.apache.cocoon.Cocoon.process(Cocoon.java:582) 
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:797) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java) 
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source) 
at org.apache.tomcat.core.Handler.invoke(Unknown Source) 
at org.apache.tomcat.core.Handler.service(Unknown Source) 
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source) 
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source) 
at org.apache.tomcat.core.ContextManager.service(Unknown Source) 
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source) 
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source) 
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source) 
at java.lang.Thread.run(Thread.java:484) 

Original exception : java.lang.RuntimeException:
java.lang.NullPointerException 
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3174) 
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:433) 
at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:49) 
at org.apache.xerces.parsers.SAXParser.endDocument(SAXParser.java:1230) 
at
org.apache.xerces.validators.common.XMLValidator.callEndDocument(XMLValidato
r.java:1146) 
at
org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher.dispatch
(XMLDocumentScanner.java:1499) 
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381) 
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) 
at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:182)

at org.apache.cocoon.components.source.URLSource.toSAX(URLSource.java:331) 
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109) 
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(Abstract
EventPipeline.java:118

Cocoon 2.0 and SQL transformer sample does'nt work with Postgresql 6.5 and JK 1.3

2002-02-22 Thread LEBRETON Philippe

In Cocoon 2.0 Sample, The SQL transformer sample does'nt work but esql
samples is OK. I have the error :

Error creating the resource
Could not read resource
file:/app/java/jakarta-tomcat-3.3/webapps/cocoon/docs/samples/sql/sql-page.xml

 details
 from
 source
org.apache.cocoon.ProcessingException
 description
org.apache.cocoon.ProcessingException: Could not read resource
file:/app/java/jakarta-tomcat-3.3/webapps/cocoon/docs/samples/sql/sql-page.xml:
This method is not yet implemented.
 extra info
org.apache.cocoon.ProcessingException: Could not read resource
file:/app/java/jakarta-tomcat-3.3/webapps/cocoon/docs/samples/sql/sql-page.xml:
This method is not yet implemented.

org.apache.cocoon.ProcessingException: Could not read resource
file:/app/java/jakarta-tomcat-3.3/webapps/cocoon/docs/samples/sql/sql-page.xml:
This method is not yet implemented.
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:115)

at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)

at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:359)

at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400409(sitemap_xmap.java:6873)

at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2922)
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
at
org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)

at org.apache.tomcat.core.Handler.service(Unknown
Source)
at
org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at
org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown
Source)
at
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown
Source)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:484)
This method is not yet implemented.
at
org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.java:291)

at
org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTransformer.java:398)

at
org.apache.cocoon.transformation.SQLTransformer.endElement(SQLTransformer.java:632)

at
org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:81)

at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)

at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1204)

at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at
org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:100)

at
org.apache.cocoon.components.source.URLSource.toSAX(URLSource.java:327)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109)

at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)

at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:359)

at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400409(sitemap_xmap.java:6873)

at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2922)
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
at
org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.tomcat.facade.ServletHandler.doService(Unknown Source

RE: [C2] Bug in SQL transformer?

2002-01-27 Thread Luca Morandini

Harald,

bottom line is: the problem lies in the stylesheet.

I don't think is a good idea splitting the template @*|node(), since the
first half extracts only attributes, while the second half only nodes.

Hence, splitting this template will result in extracting attributes first
and nodes afterwards.

Anyhow, why don't you just try to see what the results of the query (or
stored procedure) are  ? You can do this by omitting the transformation part
of the pipeline and having Cocoon ouput xml instead of html.

You can then build a stylesheet from scratch, avoiding to use the one
provided in the examples.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: SunnyDay [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 26, 2002 6:10 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [C2] Bug in SQL transformer?


 Hi Luca,

 the clean machine does the same - but only if I access my ORACLE-DB!!

 Now I commented out the line in the stylesheet which Grant (the
 originator of this thread - you remember ;) mentioned - and it worked -
 no exception no error page ...

 I decided to split the line from

 xsl:template match=@*|node() priority=-2
xsl:copy
  xsl:apply-templates select=@*|node()/
/xsl:copy
 /xsl:template

 into

 xsl:template match=@* priority=-2
xsl:copy
  xsl:apply-templates select=@*/
/xsl:copy
 /xsl:template

 xsl:template match=node() priority=-2
xsl:copy
  xsl:apply-templates select=node()/
/xsl:copy
 /xsl:template

 The crash onyl occurs if the node() template is used!
 And only if I use Oracle!

 Grant, what DB do you use? Oracle? Version?
 Luca, do have the possibility to verify the things above?

 kind regards
Harald


 SunnyDay wrote:

  Hi Luca,
 
  keep in mind that, when you modify an imported stylesheets, you have to
  modify the importing stylesheet as well... otherwise Cocoon won't
  notice the
  imported stylesheet has changed and will re-use the old
 (cached) version.
 
 
  I even deleted the work-dir and restarted tomcat ...
 
  I decided to setup a new linux box tonight - so I'll see what happens
  with a complete clean maschine ...
 
  best regards
 harald
 
 



 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: [C2] Bug in SQL transformer?

2002-01-26 Thread SunnyDay

Hi Luca,

the clean machine does the same - but only if I access my ORACLE-DB!!

Now I commented out the line in the stylesheet which Grant (the 
originator of this thread - you remember ;) mentioned - and it worked - 
no exception no error page ...

I decided to split the line from

xsl:template match=@*|node() priority=-2
   xsl:copy
 xsl:apply-templates select=@*|node()/
   /xsl:copy
/xsl:template

into

xsl:template match=@* priority=-2
   xsl:copy
 xsl:apply-templates select=@*/
   /xsl:copy
/xsl:template

xsl:template match=node() priority=-2
   xsl:copy
 xsl:apply-templates select=node()/
   /xsl:copy
/xsl:template

The crash onyl occurs if the node() template is used!
And only if I use Oracle!

Grant, what DB do you use? Oracle? Version?
Luca, do have the possibility to verify the things above?

kind regards
   Harald


SunnyDay wrote:

 Hi Luca,
 
 keep in mind that, when you modify an imported stylesheets, you have to
 modify the importing stylesheet as well... otherwise Cocoon won't 
 notice the
 imported stylesheet has changed and will re-use the old (cached) version.
 
 
 I even deleted the work-dir and restarted tomcat ...
 
 I decided to setup a new linux box tonight - so I'll see what happens 
 with a complete clean maschine ...
 
 best regards
harald
 
 



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




[C2] Bug in SQL transformer?

2002-01-22 Thread Miller, Grant

Hello,
I've been trying to use the SQL transformer. However, if it comes after an
XSLT transformer in the pipeline it always throws an error. If I use the
output of the XSLT step as the hardcoded input from a generate step (e.g.
file generator) then it works fine. The crash happens whether or not the XML
input to the sql transformer contains sql transform tags.
The example below is the simplest case I can find to illustrate the problem.

The pipeline:
map:pipeline
map:match pattern=testPage
map:generate type=serverpages src=test.xsp/
map:transform src=test/copy.xsl/
map:transform type=sql
map:parameter name=use-connection
value=kpidbpool/
/map:transform
map:serialize type=xml/
/map:match
/map:pipeline

Copy xsl:

?xml version=1.0?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0

xsl:template match=@*|node() priority=-1
xsl:copy
xsl:apply-templates select=@*|node()/
/xsl:copy
/xsl:template

/xsl:stylesheet

Error info:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException:
java.lang.NullPointerException 
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:212) 
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:210) 
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:359) 
at
org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(sitemap_xma
p.java:528) 
at
org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.java:373) 
at
org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.java:331) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114) 
at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xmap.java:33
94) 
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620) 
at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114) 
at org.apache.cocoon.Cocoon.process(Cocoon.java:514) 
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247) 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193) 
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66) 
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) 
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66) 
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64) 
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64) 
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64) 
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66

RE: [C2] Bug in SQL transformer?

2002-01-22 Thread Luca Morandini

Grant,

I'd suggest to take a look at the cocoon.log, which contains a lot of
information about errors.

Aanyway, I've used SQLTransformer after XSLT stages have been performed (I
generate tags embedding SP calls from stylesheets) and found no anomaly.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Miller, Grant [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:15 PM
 To: '[EMAIL PROTECTED]'
 Subject: [C2] Bug in SQL transformer?


 Hello,
 I've been trying to use the SQL transformer. However, if it comes after an
 XSLT transformer in the pipeline it always throws an error. If I use the
 output of the XSLT step as the hardcoded input from a generate step (e.g.
 file generator) then it works fine. The crash happens whether or
 not the XML
 input to the sql transformer contains sql transform tags.
 The example below is the simplest case I can find to illustrate
 the problem.

 The pipeline:
 map:pipeline
   map:match pattern=testPage
   map:generate type=serverpages src=test.xsp/
   map:transform src=test/copy.xsl/
   map:transform type=sql
   map:parameter name=use-connection
 value=kpidbpool/
   /map:transform
   map:serialize type=xml/
   /map:match
 /map:pipeline

 Copy xsl:

 ?xml version=1.0?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   version=1.0

   xsl:template match=@*|node() priority=-1
   xsl:copy
   xsl:apply-templates select=@*|node()/
   /xsl:copy
   /xsl:template

 /xsl:stylesheet

 Error info:

 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException:
 java.lang.NullPointerException
   at
 org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
 agesGenera
 tor.java:212)
   at
 org.apache.cocoon.components.pipeline.CachingEventPipeline.process
 (CachingEv
 entPipeline.java:210)
   at
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
 s(CachingS
 treamPipeline.java:359)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
 itemap_xma
 p.java:528)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:373)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:331)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at
 org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
 ap.java:33
 94)
   at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
   at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
   at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
 pplication
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
 onFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.ja
 va:243)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.ja
 va:201)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
   at
 org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
 lve.java:2
 46)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.ja
 va:2344)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
 e.java:164
 )
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
   at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
 cherValve.
 java:170)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64

RE: [C2] Bug in SQL transformer?

2002-01-22 Thread Miller, Grant

Ok, it turns out this is to do with copying in the xsl before the sql
transformer.
If I copy a node then the sql transform fails. If, in XSL, I match and
output the same thing as the copy would have done(in other words, a
hardcoded/manual copy) then it works fine.
Is there something special about copying nodes...(sax events or something)?
It fails both using the copy notation below and if I match on '*' and do
copy-of @*.
I'm confused...

-Original Message-
From: Luca Morandini [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 1:09 PM
To: [EMAIL PROTECTED]
Subject: RE: [C2] Bug in SQL transformer?


Grant,

I'd suggest to take a look at the cocoon.log, which contains a lot of
information about errors.

Aanyway, I've used SQLTransformer after XSLT stages have been performed (I
generate tags embedding SP calls from stylesheets) and found no anomaly.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Miller, Grant [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:15 PM
 To: '[EMAIL PROTECTED]'
 Subject: [C2] Bug in SQL transformer?


 Hello,
 I've been trying to use the SQL transformer. However, if it comes after an
 XSLT transformer in the pipeline it always throws an error. If I use the
 output of the XSLT step as the hardcoded input from a generate step (e.g.
 file generator) then it works fine. The crash happens whether or
 not the XML
 input to the sql transformer contains sql transform tags.
 The example below is the simplest case I can find to illustrate
 the problem.

 The pipeline:
 map:pipeline
   map:match pattern=testPage
   map:generate type=serverpages src=test.xsp/
   map:transform src=test/copy.xsl/
   map:transform type=sql
   map:parameter name=use-connection
 value=kpidbpool/
   /map:transform
   map:serialize type=xml/
   /map:match
 /map:pipeline

 Copy xsl:

 ?xml version=1.0?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   version=1.0

   xsl:template match=@*|node() priority=-1
   xsl:copy
   xsl:apply-templates select=@*|node()/
   /xsl:copy
   /xsl:template

 /xsl:stylesheet

 Error info:

 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException:
 java.lang.NullPointerException
   at
 org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
 agesGenera
 tor.java:212)
   at
 org.apache.cocoon.components.pipeline.CachingEventPipeline.process
 (CachingEv
 entPipeline.java:210)
   at
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
 s(CachingS
 treamPipeline.java:359)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
 itemap_xma
 p.java:528)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:373)
   at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:331)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at
 org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
 ap.java:33
 94)
   at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
   at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
   at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
 pplication
 FilterChain.java:247)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
 onFilterCh
 ain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.ja
 va:243)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.ja
 va:201)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 66)
   at
 org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
 lve.java:2
 46)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
 64

Re: [C2] Bug in SQL transformer?

2002-01-22 Thread SunnyDay

Hi,

I had a little fight with the transformer on sunday. I tried to use a SP 
and it always faild. So I inserted some debug-statements and it did not 
realy looked like a SQLTransformer - Problem!

What I did (after hourless banging my head against the wall):

I ...

(1) downloaded the most actual dev-distrib
(2) inserted some log-statements
(3) took the provided example 'sql-page' and inserted my SP-Call
(4) requested /cocoon/sql/sql-page= Exception
(5) requested /cocoon/sql/sql-page.source = Well, there was my data

The Logfile showed me that the SQL stuff had finished. The Exception 
came from a FileTransformer (if I remember correctly).

That was the point where I stopped because I had some other things to do.

Anyway, my data had empty tags around!

I'll continue on saturday but maybe someone could verify this

CuAll
   Harald

 -Original Message-
 From: Luca Morandini [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [C2] Bug in SQL transformer?
 
 
 Grant,
 
 I'd suggest to take a look at the cocoon.log, which contains a lot of
 information about errors.
 
 Aanyway, I've used SQLTransformer after XSLT stages have been performed (I
 generate tags embedding SP calls from stylesheets) and found no anomaly.
 
 Best regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
 
-Original Message-
From: Miller, Grant [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 1:15 PM
To: '[EMAIL PROTECTED]'
Subject: [C2] Bug in SQL transformer?


Hello,
I've been trying to use the SQL transformer. However, if it comes after an
XSLT transformer in the pipeline it always throws an error. If I use the
output of the XSLT step as the hardcoded input from a generate step (e.g.
file generator) then it works fine. The crash happens whether or
not the XML
input to the sql transformer contains sql transform tags.
The example below is the simplest case I can find to illustrate
the problem.

The pipeline:
map:pipeline
  map:match pattern=testPage
  map:generate type=serverpages src=test.xsp/
  map:transform src=test/copy.xsl/
  map:transform type=sql
  map:parameter name=use-connection
value=kpidbpool/
  /map:transform
  map:serialize type=xml/
  /map:match
/map:pipeline

Copy xsl:

?xml version=1.0?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  version=1.0

  xsl:template match=@*|node() priority=-1
  xsl:copy
  xsl:apply-templates select=@*|node()/
  /xsl:copy
  /xsl:template

/xsl:stylesheet

Error info:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException:
java.lang.NullPointerException
  at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
agesGenera
tor.java:212)
  at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process
(CachingEv
entPipeline.java:210)
  at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
s(CachingS
treamPipeline.java:359)
  at
org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
itemap_xma
p.java:528)
  at
org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
ava:373)
  at
org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
ava:331)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
  at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
ap.java:33
94)
  at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
  at
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
  at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
  at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
pplication
FilterChain.java:247)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
onFilterCh
ain.java:193)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
erValve.ja
va:243)
  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
66)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:472)
  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
org.apache.catalina.core.StandardContextValve.invoke

RE: [C2] Bug in SQL transformer?

2002-01-22 Thread Luca Morandini

SunnyDay,

the information you provided are too scarce... could you be more specic ?
BTW, which DBMS are you using ?

P.S.
Out of sheer curiosity: why don't you use your real name (I guess you have
one) ?

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: SunnyDay [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 7:10 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [C2] Bug in SQL transformer?


 Hi,

 I had a little fight with the transformer on sunday. I tried to use a SP
 and it always faild. So I inserted some debug-statements and it did not
 realy looked like a SQLTransformer - Problem!

 What I did (after hourless banging my head against the wall):

 I ...

 (1) downloaded the most actual dev-distrib
 (2) inserted some log-statements
 (3) took the provided example 'sql-page' and inserted my SP-Call
 (4) requested /cocoon/sql/sql-page= Exception
 (5) requested /cocoon/sql/sql-page.source = Well, there was my data

 The Logfile showed me that the SQL stuff had finished. The Exception
 came from a FileTransformer (if I remember correctly).

 That was the point where I stopped because I had some other things to do.

 Anyway, my data had empty tags around!

 I'll continue on saturday but maybe someone could verify this

 CuAll
Harald

  -Original Message-
  From: Luca Morandini [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 1:09 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [C2] Bug in SQL transformer?
 
 
  Grant,
 
  I'd suggest to take a look at the cocoon.log, which contains a lot of
  information about errors.
 
  Aanyway, I've used SQLTransformer after XSLT stages have been
 performed (I
  generate tags embedding SP calls from stylesheets) and found no anomaly.
 
  Best regards,
 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
 
 
 
 -Original Message-
 From: Miller, Grant [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:15 PM
 To: '[EMAIL PROTECTED]'
 Subject: [C2] Bug in SQL transformer?
 
 
 Hello,
 I've been trying to use the SQL transformer. However, if it
 comes after an
 XSLT transformer in the pipeline it always throws an error. If I use the
 output of the XSLT step as the hardcoded input from a generate
 step (e.g.
 file generator) then it works fine. The crash happens whether or
 not the XML
 input to the sql transformer contains sql transform tags.
 The example below is the simplest case I can find to illustrate
 the problem.
 
 The pipeline:
 map:pipeline
 map:match pattern=testPage
 map:generate type=serverpages src=test.xsp/
 map:transform src=test/copy.xsl/
 map:transform type=sql
 map:parameter name=use-connection
 value=kpidbpool/
 /map:transform
 map:serialize type=xml/
 /map:match
 /map:pipeline
 
 Copy xsl:
 
 ?xml version=1.0?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 version=1.0
 
 xsl:template match=@*|node() priority=-1
 xsl:copy
 xsl:apply-templates select=@*|node()/
 /xsl:copy
 /xsl:template
 
 /xsl:stylesheet
 
 Error info:
 
 org.apache.cocoon.ProcessingException: Exception in
 ServerPagesGenerator.generate(): java.lang.RuntimeException:
 java.lang.NullPointerException
 at
 org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
 agesGenera
 tor.java:212)
 at
 org.apache.cocoon.components.pipeline.CachingEventPipeline.process
 (CachingEv
 entPipeline.java:210)
 at
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
 s(CachingS
 treamPipeline.java:359)
 at
 org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
 itemap_xma
 p.java:528)
 at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:373)
 at
 org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
 ava:331)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
 at
 org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
 ap.java:33
 94)
 at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
 at
 org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
 at
 org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647

RE: [C2] Bug in SQL transformer?

2002-01-22 Thread Luca Morandini

Grant,

my advice is to cut the pipeline just before the SQLTransformer step and see
what happens... copying node-sets IS tricky.

Best regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Miller, Grant [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 6:20 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [C2] Bug in SQL transformer?


 Ok, it turns out this is to do with copying in the xsl before the sql
 transformer.
 If I copy a node then the sql transform fails. If, in XSL, I match and
 output the same thing as the copy would have done(in other words, a
 hardcoded/manual copy) then it works fine.
 Is there something special about copying nodes...(sax events or
 something)?
 It fails both using the copy notation below and if I match on '*' and do
 copy-of @*.
 I'm confused...

 -Original Message-
 From: Luca Morandini [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [C2] Bug in SQL transformer?


 Grant,

 I'd suggest to take a look at the cocoon.log, which contains a lot of
 information about errors.

 Aanyway, I've used SQLTransformer after XSLT stages have been performed (I
 generate tags embedding SP calls from stylesheets) and found no anomaly.

 Best regards,

 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -


  -Original Message-
  From: Miller, Grant [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 1:15 PM
  To: '[EMAIL PROTECTED]'
  Subject: [C2] Bug in SQL transformer?
 
 
  Hello,
  I've been trying to use the SQL transformer. However, if it
 comes after an
  XSLT transformer in the pipeline it always throws an error. If I use the
  output of the XSLT step as the hardcoded input from a generate
 step (e.g.
  file generator) then it works fine. The crash happens whether or
  not the XML
  input to the sql transformer contains sql transform tags.
  The example below is the simplest case I can find to illustrate
  the problem.
 
  The pipeline:
  map:pipeline
  map:match pattern=testPage
  map:generate type=serverpages src=test.xsp/
  map:transform src=test/copy.xsl/
  map:transform type=sql
  map:parameter name=use-connection
  value=kpidbpool/
  /map:transform
  map:serialize type=xml/
  /map:match
  /map:pipeline
 
  Copy xsl:
 
  ?xml version=1.0?
  xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  version=1.0
 
  xsl:template match=@*|node() priority=-1
  xsl:copy
  xsl:apply-templates select=@*|node()/
  /xsl:copy
  /xsl:template
 
  /xsl:stylesheet
 
  Error info:
 
  org.apache.cocoon.ProcessingException: Exception in
  ServerPagesGenerator.generate(): java.lang.RuntimeException:
  java.lang.NullPointerException
  at
  org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
  agesGenera
  tor.java:212)
  at
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process
  (CachingEv
  entPipeline.java:210)
  at
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
  s(CachingS
  treamPipeline.java:359)
  at
  org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
  itemap_xma
  p.java:528)
  at
  org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
  ava:373)
  at
  org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
  ava:331)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
  at
  org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
  ap.java:33
  94)
  at
  org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
  at
  org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
  at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
  at
  org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
  pplication
  FilterChain.java:247)
  at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
  onFilterCh
  ain.java:193)
  at
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
  erValve.ja
  va:243

Problems with XSLT-Transformer + SQL-Transformer on Cocoon2

2001-11-01 Thread Sebastian Frankfurt

Hello,

If I use cocoon2 with MySQL (and a proper jdbc driver) the
following way, everything works well:


map:generate src=htdocs/site_test.xml/
map:transform type=sql
   map:parameter name=use-connection  value=news/
/map:transform
map:transform src=stylesheets/html.xsl/
map:serialize type=html/


_but_ if I want to use it the other way, I only
get a NullPointerException :-(


map:generate src=htdocs/site_test.xml/
map:transform src=stylesheets/pre_sql_process.xsl/
map:transform type=sql
   map:parameter name=use-connection  value=news/
/map:transform
map:transform src=stylesheets/html.xsl/
map:serialize type=html/


So, the pre_sql_process.xsl is proper, but the
the sql-transformer get's a NullPointer.
Something's is gone wrong with the Chain from
the XSLT-Tranformer to the SQL-Transformer.

What do I have to do within the sitemap.xmap or
the stylesheet to get this chain work?

I am not on the list, so please drop me
a cc to [EMAIL PROTECTED]

thanx a lot,

Sebastian


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




RE: AW: [C2] Postgres with SQL - Transformer

2001-06-29 Thread Beauprez Sven

Mariano,

I tested the SQLTransformer with mysql and oracle as underlying databases,
it should work fine on both...
If you need an open source database, i certainly recommend mysql. I use the
following jdbc driver: http://mmmysql.sourceforge.net/


Sven


-Original Message-
From: Mariano Kamp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 3:08 PM
To: [EMAIL PROTECTED]
Subject: Re: AW: [C2] Postgres with SQL - Transformer


Hallo Carsten,

  thanks for answering my question and sorry for not being more specific in 
first place. 

Yes I am using connection pooling configured in cocoon.xconf, but the 
funny thing is I was also using connection pooling when using esql and that 
was working ok.

  I don't think that the problem is related to the avalon code. The stack 
trace showed that the exeception was raised in postgresql classes. 
Unfortunately I don't have access to the running system today, but if you 
want I can post it tomorrow.

  Well, yes and we need connection pooling and we also want to use an open 
source database besides oracle. As we are reporting data and don't need 
transactions I will have a look at mysql now.

Bis bald,
Mariano


On Thursday 28 June 2001 02:49 pm, you wrote:
  Mariano Kamp wrote:
  Von: Mariano Kamp [mailto:[EMAIL PROTECTED]]
  Gesendet: Donnerstag, 28. Juni 2001 14:36
  An: [EMAIL PROTECTED]
  Betreff: [C2] Postgres with SQL - Transformer
 
 
  Hi there,
 
I tried C2 with postgress, but postgres throws an exeption that
  prepareStatement() is not supported yet ;-( Is there any way to tell the
  SQL-Transformer not to prepare the Statements and use dynamic sql
  instead?

 I am not quiet sure but I think the prepareStatement comes from the
 underlying
 Avalon databasesource code. Am I correct that you use preconfigured sql
 connections in the cocoon.xconf?
 If so the only solution is to don't use them and write your connection
 directly into the sitemap when the transformer is used:
 map:transform type=sql
   map:parameter name=dburl value=your db url/
   map:parameter name=username value=your username/
   map:parameter name=password value=your password/
 /map:transform

 Using this no prepareStatement() is called (I hope) but the bad news: no
 connection pooling.


 Carsten

 Open Source GroupsunShine - b:Integrated
 
 Carsten Ziegeler, SN AG, Klingenderstrasse 5, D-33100 Paderborn
 www.sundn.de  mailto: [EMAIL PROTECTED]
 

  Mariano
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: [C2] Postgres with SQL - Transformer

2001-06-29 Thread Mariano Kamp

Sven, 

  thank you very much for your response.

  I see your point in polluting the code by providing the dynamic sql 
opportunity to and furthermore prepared statements are the way to go anyway. 
The exception says it's not implemented *yet*, so as we are just looking 
for *some* open source database to support, and I got mysql up and running 
yesterday ,it is not pressing us anymore. As mentioned earlier we are 
building a reporting system and performance is critical but transactions are 
not, so for the time being mysql will just do fine.

  Again, thanks for caring.
Mariano

On Thursday 28 June 2001 04:22 pm, Beauprez Sven wrote:
 Mariano,

 The latest version of the SQLTransformer (HEAD branch) uses prepared
 statements (for the queries) and callable statements (for stored
 procedures). It doesn't use the createStatement() on the connection object
 anymore. I removed it because i thought it would be an improvement to use
 prepared statements instead. (i thought all jdbc drivers implemented this,
 but it seems not all of them do :-( )

 I think the code will get messy if i incorporate the old way also, i will
 try to find a compromise for this...

 Someone an idea?

 In the meantime, the old version of the SQLTransformer in the
 cocoon_20_branch still uses createStatement(), maybe you can use this one
 for now.


 Sven




 -Original Message-
 From: Mariano Kamp [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 2:36 PM
 To: [EMAIL PROTECTED]
 Subject: [C2] Postgres with SQL - Transformer


 Hi there,

   I tried C2 with postgress, but postgres throws an exeption that
 prepareStatement() is not supported yet ;-( Is there any way to tell the
 SQL-Transformer not to prepare the Statements and use dynamic sql instead?

 Mariano

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: AW: [C2] Postgres with SQL - Transformer

2001-06-29 Thread Mariano Kamp

Yeah,

  I tried it on both too and especially with mysql it was a breeze ;-)

Mariano

On Friday 29 June 2001 09:33 am, Beauprez Sven wrote:
 Mariano,

 I tested the SQLTransformer with mysql and oracle as underlying databases,
 it should work fine on both...
 If you need an open source database, i certainly recommend mysql. I use the
 following jdbc driver: http://mmmysql.sourceforge.net/


 Sven


 -Original Message-
 From: Mariano Kamp [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 3:08 PM
 To: [EMAIL PROTECTED]
 Subject: Re: AW: [C2] Postgres with SQL - Transformer


 Hallo Carsten,

   thanks for answering my question and sorry for not being more specific in
 first place.

 Yes I am using connection pooling configured in cocoon.xconf, but the
 funny thing is I was also using connection pooling when using esql and that
 was working ok.

   I don't think that the problem is related to the avalon code. The stack
 trace showed that the exeception was raised in postgresql classes.
 Unfortunately I don't have access to the running system today, but if you
 want I can post it tomorrow.

   Well, yes and we need connection pooling and we also want to use an open
 source database besides oracle. As we are reporting data and don't need
 transactions I will have a look at mysql now.

 Bis bald,
 Mariano

 On Thursday 28 June 2001 02:49 pm, you wrote:
   Mariano Kamp wrote:
   Von: Mariano Kamp [mailto:[EMAIL PROTECTED]]
   Gesendet: Donnerstag, 28. Juni 2001 14:36
   An: [EMAIL PROTECTED]
   Betreff: [C2] Postgres with SQL - Transformer
  
  
   Hi there,
  
 I tried C2 with postgress, but postgres throws an exeption that
   prepareStatement() is not supported yet ;-( Is there any way to tell
   the SQL-Transformer not to prepare the Statements and use dynamic sql
   instead?
 
  I am not quiet sure but I think the prepareStatement comes from the
  underlying
  Avalon databasesource code. Am I correct that you use preconfigured sql
  connections in the cocoon.xconf?
  If so the only solution is to don't use them and write your connection
  directly into the sitemap when the transformer is used:
  map:transform type=sql
  map:parameter name=dburl value=your db url/
  map:parameter name=username value=your username/
  map:parameter name=password value=your password/
  /map:transform
 
  Using this no prepareStatement() is called (I hope) but the bad news: no
  connection pooling.
 
 
  Carsten
 
  Open Source GroupsunShine - b:Integrated
  
  Carsten Ziegeler, SN AG, Klingenderstrasse 5, D-33100 Paderborn
  www.sundn.de  mailto: [EMAIL PROTECTED]
  
 
   Mariano
  
   -
   Please check that your question has not already been answered in the
   FAQ before posting. http://xml.apache.org/cocoon/faqs.html
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




[C2] Postgres with SQL - Transformer

2001-06-28 Thread Mariano Kamp

Hi there,

  I tried C2 with postgress, but postgres throws an exeption that 
prepareStatement() is not supported yet ;-( Is there any way to tell the 
SQL-Transformer not to prepare the Statements and use dynamic sql instead?

Mariano

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: AW: [C2] Postgres with SQL - Transformer

2001-06-28 Thread Mariano Kamp

Hallo Carsten,

  thanks for answering my question and sorry for not being more specific in 
first place. 

Yes I am using connection pooling configured in cocoon.xconf, but the 
funny thing is I was also using connection pooling when using esql and that 
was working ok.

  I don't think that the problem is related to the avalon code. The stack 
trace showed that the exeception was raised in postgresql classes. 
Unfortunately I don't have access to the running system today, but if you 
want I can post it tomorrow.

  Well, yes and we need connection pooling and we also want to use an open 
source database besides oracle. As we are reporting data and don't need 
transactions I will have a look at mysql now.

Bis bald,
Mariano


On Thursday 28 June 2001 02:49 pm, you wrote:
  Mariano Kamp wrote:
  Von: Mariano Kamp [mailto:[EMAIL PROTECTED]]
  Gesendet: Donnerstag, 28. Juni 2001 14:36
  An: [EMAIL PROTECTED]
  Betreff: [C2] Postgres with SQL - Transformer
 
 
  Hi there,
 
I tried C2 with postgress, but postgres throws an exeption that
  prepareStatement() is not supported yet ;-( Is there any way to tell the
  SQL-Transformer not to prepare the Statements and use dynamic sql
  instead?

 I am not quiet sure but I think the prepareStatement comes from the
 underlying
 Avalon databasesource code. Am I correct that you use preconfigured sql
 connections in the cocoon.xconf?
 If so the only solution is to don't use them and write your connection
 directly into the sitemap when the transformer is used:
 map:transform type=sql
   map:parameter name=dburl value=your db url/
   map:parameter name=username value=your username/
   map:parameter name=password value=your password/
 /map:transform

 Using this no prepareStatement() is called (I hope) but the bad news: no
 connection pooling.


 Carsten

 Open Source GroupsunShine - b:Integrated
 
 Carsten Ziegeler, SN AG, Klingenderstrasse 5, D-33100 Paderborn
 www.sundn.de  mailto: [EMAIL PROTECTED]
 

  Mariano
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




RE: [C2] Postgres with SQL - Transformer

2001-06-28 Thread Beauprez Sven

Mariano,

The latest version of the SQLTransformer (HEAD branch) uses prepared
statements (for the queries) and callable statements (for stored
procedures). It doesn't use the createStatement() on the connection object
anymore. I removed it because i thought it would be an improvement to use
prepared statements instead. (i thought all jdbc drivers implemented this,
but it seems not all of them do :-( )

I think the code will get messy if i incorporate the old way also, i will
try to find a compromise for this...

Someone an idea?

In the meantime, the old version of the SQLTransformer in the
cocoon_20_branch still uses createStatement(), maybe you can use this one
for now.


Sven




-Original Message-
From: Mariano Kamp [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 2:36 PM
To: [EMAIL PROTECTED]
Subject: [C2] Postgres with SQL - Transformer


Hi there,

  I tried C2 with postgress, but postgres throws an exeption that 
prepareStatement() is not supported yet ;-( Is there any way to tell the 
SQL-Transformer not to prepare the Statements and use dynamic sql instead?

Mariano

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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