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:
> > 
> >   
> > 
> >   
> > 
> > 
> > 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:
> 
> 
> 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]



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:


  http://apache.org/cocoon/SQL/2.0";
nrofrows="4">

   ...


   ...


   ...


   ...

  


My stylesheet snippet is:

  

  


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]



Logic control in sitemap via parameters

2003-03-06 Thread Samuel Bruce
Within a pipeline, I retrieve DB records using an SQL
Transformer. I know the number of rows that I've
retrieved using the nr-of-rows parameter.
I'd like to branch to a different pipeline if the
number of rows retrieved in the SQL Transform is 0.

Is there a way to pass that nrofrows value from my
result set in my xsl file back to the sitemap as a
parameter? Or is there any other way of knowing how
many rows were retrieved by the SQL Transformer in the sitemap?

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Newbie Use of Request Params with DB Action

2003-03-04 Thread Samuel Bruce
Thanks. Solved with your help.

Take care, be well, God bless.

--- Christian Haul
<[EMAIL PROTECTED]> wrote:
> On 04.Mar.2003 -- 06:26 AM, Samuel Bruce wrote:
> > I don't know what I did the first time, but
> whatever I
> > did wrong I must not have had enough patience to
> look
> > at it closer.
> > The request parameters ARE displayed with the
> request
> > generator after the db action. Thank you again for
> > your help!
> 
> Good to hear your problem is solved!
> Take care.
> 
>   Chris.
> -- 
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9
> 6856 335A 9E08
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Newbie Use of Request Params with DB Action

2003-03-04 Thread Samuel Bruce
I don't know what I did the first time, but whatever I
did wrong I must not have had enough patience to look
at it closer.
The request parameters ARE displayed with the request
generator after the db action. Thank you again for
your help!

--- Samuel Bruce <[EMAIL PROTECTED]> wrote:
> Thank you once again.
> 
> Before I created this post to cocoon-users, I tried
> using the request generator after the mod-db action
> and all of the request parameters were gone (weren't
> displayed with xml serializer). Before the mod-db
> action they were all there (using the request
> generator). That's why I created this thread.
> Maybe I did something wrong. I'll try again - work
> on
> it some more. If I'm successful, I'll let you know.
> If
> not, I'll send my pipeline and xsl. 
> 
> Thanks so much for your assistance and patience with
> a
> newbie!
> 
> --- Christian Haul
> <[EMAIL PROTECTED]> wrote:
> > On 03.Mar.2003 -- 06:43 PM, Samuel Bruce wrote:
> > > Thanks for responding and sorry for the
> ambiguity
> > of
> > > my post. Your reply was helpful.
> > > 
> > > The parameters that I am referring to are
> request
> > > parameters sent from a post in an HTML form to a
> > > pipeline in my sitemap. That pipeline has a
> mod-db
> > > action. 
> > > I'd like to capture one of the input parameters
> > from
> > > the form to be available as a parameter in an
> XSLT
> > 
> > > transformer after that input parameter has been
> > used
> > > by the mod-db action.
> > > Is it possible? My interpretation of your
> response
> > > along with the behavior that I see is that the
> > request
> > > parameter is consumed by the mod-db action.
> > 
> > This is absolutely possible! Request parameter are
> > read-only and are
> > not removed after reading them. BTW none of the
> > input modules removes
> > a value. Conceptually, they are only for reading
> > values, not modifying
> > state. Although this is not enforced, all current
> > ones obey this
> > principle.
> > 
> > You can verify that the parameter is still there
> for
> > example by using
> > the request generator in the same pipeline as you
> > have the action.
> > 
> > If you can't make it work, include the pipeline
> and
> > your xsl file
> > (head and template that uses the parameter).
> > 
> > Chris.
> > -- 
> > C h r i s t i a n   H a u l
> > [EMAIL PROTECTED]
> > fingerprint: 99B0 1D9D 7919 644A 4837  7D73
> FEF9
> > 6856 335A 9E08
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Newbie Use of Request Params with DB Action

2003-03-04 Thread Samuel Bruce
Thank you once again.

Before I created this post to cocoon-users, I tried
using the request generator after the mod-db action
and all of the request parameters were gone (weren't
displayed with xml serializer). Before the mod-db
action they were all there (using the request
generator). That's why I created this thread.
Maybe I did something wrong. I'll try again - work on
it some more. If I'm successful, I'll let you know. If
not, I'll send my pipeline and xsl. 

Thanks so much for your assistance and patience with a
newbie!

--- Christian Haul
<[EMAIL PROTECTED]> wrote:
> On 03.Mar.2003 -- 06:43 PM, Samuel Bruce wrote:
> > Thanks for responding and sorry for the ambiguity
> of
> > my post. Your reply was helpful.
> > 
> > The parameters that I am referring to are request
> > parameters sent from a post in an HTML form to a
> > pipeline in my sitemap. That pipeline has a mod-db
> > action. 
> > I'd like to capture one of the input parameters
> from
> > the form to be available as a parameter in an XSLT
> 
> > transformer after that input parameter has been
> used
> > by the mod-db action.
> > Is it possible? My interpretation of your response
> > along with the behavior that I see is that the
> request
> > parameter is consumed by the mod-db action.
> 
> This is absolutely possible! Request parameter are
> read-only and are
> not removed after reading them. BTW none of the
> input modules removes
> a value. Conceptually, they are only for reading
> values, not modifying
> state. Although this is not enforced, all current
> ones obey this
> principle.
> 
> You can verify that the parameter is still there for
> example by using
> the request generator in the same pipeline as you
> have the action.
> 
> If you can't make it work, include the pipeline and
> your xsl file
> (head and template that uses the parameter).
> 
>   Chris.
> -- 
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9
> 6856 335A 9E08
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: Newbie Use of Request Params with DB Action

2003-03-03 Thread Samuel Bruce
Thanks for responding and sorry for the ambiguity of
my post. Your reply was helpful.

The parameters that I am referring to are request
parameters sent from a post in an HTML form to a
pipeline in my sitemap. That pipeline has a mod-db
action. 
I'd like to capture one of the input parameters from
the form to be available as a parameter in an XSLT 
transformer after that input parameter has been used
by the mod-db action.
Is it possible? My interpretation of your response
along with the behavior that I see is that the request
parameter is consumed by the mod-db action.

--- Christian Haul <[EMAIL PROTECTED]>
wrote:
> Samuel Bruce wrote:
> > Hello,
> > 
> > I'm using a version of cocoon that I built from
> CVS
> > back in October of 2002, running with tomcat
> 4.1.12 on
> > WIN XP.
> > 
> > I have a pipeline that generates an HTML form and
> > passes  parameters to a mod-db action which
> inserts DB
> > records successfully.
> > 
> > Can any of those parameters passed to the action
> be
> > passed to another pipeline after the mod-db action
> or
> > are those parameters gone?
> 
> Mmmh, if by parameters you mean sitemap parameters,
> e.g.
> , they are per component.
> 
> Request parameters OTOH are per request. Redirects
> cause
> new requests.
> 
> Everything else. please be more specific.
> 
>   Chris.
> 
> -- 
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
>  fingerprint: 99B0 1D9D 7919 644A 4837  7D73
> FEF9 6856 335A 9E08
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Newbie Use of Request Params with DB Action

2003-03-03 Thread Samuel Bruce
Hello,

I'm using a version of cocoon that I built from CVS
back in October of 2002, running with tomcat 4.1.12 on
WIN XP.

I have a pipeline that generates an HTML form and
passes  parameters to a mod-db action which inserts DB
records successfully.

Can any of those parameters passed to the action be
passed to another pipeline after the mod-db action or
are those parameters gone?

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: mod-db action yields 'CALL IDENTITY()' MySQL syntax error

2002-10-25 Thread Samuel Bruce
Thanks very much. It worked like a charm.

This configuration wasn't apparent to me from reading
the documentation. Thanks for making it clear. 

--- Christian Haul
<[EMAIL PROTECTED]> wrote:
> On 24.Oct.2002 -- 09:38 PM, Samuel Bruce wrote:
> > Hello,
> > 
> > I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.
> > 
> > The mod-db action inserts the first row correctly,
> but
> > fails on the second row insert. It seems to also
> fail
> > attempting to rollback.
> > 
> > Anything you can do to help is appreciated.
> 
> > Thread-10/DatabaseAction: Rolling back
> transaction.
> > Caused by Syntax error or access violation: You
> have
> > an error in your SQL syntax near 'CALL IDENTITY()'
> at
> > line 1
> > DEBUG   (2002-10-24) 23:56.37:520  
> > [sitemap.action.mod-db-add] ()
> > Thread-10/DatabaseAction: There was an error
> rolling
> > back the transaction
> > java.sql.SQLException: General error: Warning: 
> Some
> > non-transactional changed tables couldn't be
> rolled
> > back
> > at
> 
> >
>
org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
> > at
> 
> So, you are trying to use the autoincrement module
> for HSQLDB with
> MySQL. That just won't work. Please use the MySQL
> one. For this, you
> need to edit the cocoon.xconf and uncomment the
> correct module and
> comment out the hsqldb one. mod-db uses the one with
> shorthand "auto"
> unless instructed otherwise.
> 
>   Chris.
> -- 
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9
> 6856 335A 9E08
> 
> 
>
-
> 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]>
> 


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.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]>




mod-db action yields 'CALL IDENTITY()' MySQL syntax error

2002-10-24 Thread Samuel Bruce
Hello,

I'm using the latest CVS, TC 4.1.12, JDK 1.4.01.

The mod-db action inserts the first row correctly, but
fails on the second row insert. It seems to also fail
attempting to rollback.

Anything you can do to help is appreciated.

Here is a snippet from my sitemap.log:

DEBUG   (2002-10-24) 23:56.37:359  
[sitemap.action.mod-db-add] ()
Thread-10/AbstractComplementaryConfigurableAction:
(Re)Loading context://resources/dbgx.xml
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: modeTypes : {2=request-attr,
1=others, 0=autoincr}
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=0
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was
"autoincr" returning "autoincr"
DEBUG   (2002-10-24) 23:56.37:379  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=2
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: i=3
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: requested mode was "others"
returning "all"
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: query: INSERT INTO gx (oid,
aid, gid) VALUES (?, ?, ?)
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column gx.oid
from request-param using getAttribute method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid [0] 1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.abid from request-param using getAttribute
method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid [0] 30
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Trying to set column
grpmbrs.grpid from request-param using
getAttributeValues method
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [0] 1
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gid [1] 2
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: > row no. 0
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAddAction: Automatically setting key
DEBUG   (2002-10-24) 23:56.37:389  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.oid[0] to
1
DEBUG   (2002-10-24) 23:56.37:409  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.aid[0] to
30
DEBUG   (2002-10-24) 23:56.37:409  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Setting column gx.gxid[0] to
1
DEBUG   (2002-10-24) 23:56.37:509  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: Rolling back transaction.
Caused by Syntax error or access violation: You have
an error in your SQL syntax near 'CALL IDENTITY()' at
line 1
DEBUG   (2002-10-24) 23:56.37:520  
[sitemap.action.mod-db-add] ()
Thread-10/DatabaseAction: There was an error rolling
back the transaction
java.sql.SQLException: General error: Warning:  Some
non-transactional changed tables couldn't be rolled
back
at
org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
at
org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
at
org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java:635)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:882)
at
org.gjt.mm.mysql.Connection.execSQL(Connection.java:815)
at
org.gjt.mm.mysql.Connection.rollback(Connection.java:551)
at
org.apache.avalon.excalibur.datasource.Jdbc3Connection.rollback(Jdbc3Connection.java:92)
at
org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:778)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActionSetNode.call(ActionSetNode.java:176)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActSetNode.invoke(ActSetNode.java:111)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sit

Re: Package oracle.jdbc/sql does not exist error building latest CVS

2002-10-24 Thread Samuel Bruce
Worked like a charm.

Thanks.

--- Antonio Gallardo Rivera
<[EMAIL PROTECTED]> wrote:
> Upgrade to Tomcat 4.1.12
> 
> Antonio Gallardo
> 
> El Jueves, 24 de Octubre de 2002 17:35, Samuel Bruce
> escribió:
> > I'm using WIN XP, JDK 1.4.01, Tomcat 4.04
> >
> > Any help is greatly appreciated
> >
> > __
> > Do you Yahoo!?
> > Y! Web Hosting - Let the expert host your web site
> > http://webhosting.yahoo.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]>
> 
>
-
> 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]>
> 


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.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]>




Package oracle.jdbc/sql does not exist error building latest CVS

2002-10-24 Thread Samuel Bruce
I'm using WIN XP, JDK 1.4.01, Tomcat 4.04

Any help is greatly appreciated

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

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

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