Problems downloading 2.1

2002-09-26 Thread jorge_noe bello_mendoza

I'm in trouble downloading 2.1 CVS
I think it's a problem related with the
firewall / proxy my company uses.

Is there an orthodox way (I mean ftp or http)
of downloading 2.1 ?
I found a Code Repository in Cocoon page
but I'm not sure what should I download.

Any help will be appreciated.



_
Chat with friends online, try MSN Messenger: http://messenger.msn.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]




Re: Need help with XMLForm

2002-09-26 Thread Ivelin Ivanov


If can just extract the code from say WizardAction.jave.

Form.lookup( id, objectModel );
Form.addViolation( violation );


- Original Message - 
From: Bobby Mitchell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 1:01 PM
Subject: Need help with XMLForm


 Can I use xsp to add Violations to an instance of XMLForm? If so, can 
 you provide a short code snippet?
 
 -- 
 Robert J. (Bobby) Mitchell
 Systems Administrator
 NASA Institute for Advanced Concepts
 555A 14th St Atlanta, Ga. 30318
 Phone: (404)347-9633 Fax: (404)347-9638
 
 
 
 
 -
 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 downloading 2.1

2002-09-26 Thread Richard Reyes

Are you sure you mean 2.1???

Heres the binary release 2.0.1..

http://xml.apache.org/cocoon/dist/cocoon-2.0.1-bin.zip


- Original Message - 
From: jorge_noe bello_mendoza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 5:17 PM
Subject: Problems downloading 2.1


 I'm in trouble downloading 2.1 CVS
 I think it's a problem related with the
 firewall / proxy my company uses.
 
 Is there an orthodox way (I mean ftp or http)
 of downloading 2.1 ?
 I found a Code Repository in Cocoon page
 but I'm not sure what should I download.
 
 Any help will be appreciated.
 
 
 
 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.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]




How to insert element to XML by XSP?

2002-09-26 Thread funing

  It seems that the insert tag of SourceWritingTransformer doesn't
work now. Does anyone know what can be used in place of it?
 
best regards
-- 
funing [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 downloading 2.1

2002-09-26 Thread Antonio Gallardo Rivera


Yes, there is a automatic nightly snapshot of CVS, you can download it from:

http://cvs.apache.org/snapshots/xml-cocoon2/

Antonio Gallardo


El Miércoles, 25 de Septiembre de 2002 18:17, jorge_noe bello_mendoza 
escribió:
 I'm in trouble downloading 2.1 CVS
 I think it's a problem related with the
 firewall / proxy my company uses.

 Is there an orthodox way (I mean ftp or http)
 of downloading 2.1 ?
 I found a Code Repository in Cocoon page
 but I'm not sure what should I download.

 Any help will be appreciated.



 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.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]




compile problem (cvs)

2002-09-26 Thread Michael Maluck

./xml-cocoon2/build/cocoon/work/blocks-build.xml:25: 
./xml-cocoon2/src/blocks/batik/java not found.

cu
Michael

-
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: SunRise - Accessing Parameter

2002-09-26 Thread Carsten Ziegeler

Hi Richard,

first, could you please send plain text mails and not html.

I assuem that you want to access the resource parameter
in the redirect, right?
So you can use:

map:act type=request
map:parameter name=parameters value=true/

map:redirect-to uri={resource}/
/map:act

With the above used request action, you have access to all request
parameters using their name. So {resource} is replaced with
the value.

HTH
Carsten

-Original Message-
From: Richard Reyes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:56 PM
To: C2 Users
Subject: SunRise - Accessing Parameter


Hi Guys,

In
http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
s.html

How can I access the resource parameter in loginpage.xml ( the underlined
part ).

?xml version=1.0?
content
 form
  urlfoo-login?resource=foo-protected/url
  field name=name type=te

How can I access this parameter in this pipeline? after logging in.

map:match pattern=foo-login
 map:act type=sunRise-login
   map:parameter name=handler value=foo-handler/
   map:parameter name=parameter_name
value=request:name/
   map:parameter name=parameter_password
value=request:password/
   !-- If the authentication is successfull then this
redirect will be performed --
   map:redirect-to uri=foo-resource-1.html/
 /map:act
!-- authentication failed: --
map:generate src=login-failed.xml/
map:transform src=login-failed.xsl/
map:serialize/
/map:match

Thanks
Richard


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




[newbie] ESQL Error Handling

2002-09-26 Thread Zein Dowe

Hi,

i got some questions about the esql logicsheet from cocoon.
I suppose the first one is easy to answer:

1. How can i count the number of rows from the result of my query?

The second one seems quit more difficult to me (but i am a newbie and know
nothing ;-):

2. How can I handle the exception which is thrown if the database connection
fails?

If i get it right, this kind of exception is handled by cocoon itself and
not
by the esql-logicsheet. So how can i prevent that the ugly cocoon exception
window pops up and, instead of that, show a message which
says that the connection process has failed?

If somebody knows the answers or has some suggestions, i would be
very grateful if you share them with me.

regards,
Zein

-- 
Werden Sie mit uns zum OnlineStar 2002! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de


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




AW: FOP In Latest Cocoon Releases

2002-09-26 Thread Skladovs, Victor

Hi Frank!

I think all we have to do is to replace xalan and maybe xerces jars in a
cocoon distribution.
I tried to do this. I replaced xalan-2.3.1 with xalan-2.0.0 in
Cocoon.2.0.3. It worked very unstable, I did it all back at the result,
but my pdf were fine!

The question is how could I replace xalan and xerces in cocoon? What
must I take into account so that the cocoon works stable?

Regards,
Viktor

-Ursprüngliche Nachricht-
Von: Przybilla, Frank [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 15:06
An: '[EMAIL PROTECTED]'
Betreff: AW: FOP In Latest Cocoon Releases


Hello to all cocoon users,

I also have big troubles with fop in cocoon-2.01,cocoon-2.02,
cocoon-2.03.

Everything is working fine with fop-0.20.3 as a standalone application
but integrated into cocoon there is sometimes a strange behavior.

My problem occurs especially in conjunction with the generation of fop
tables and hyphenation of long
text in table-cells. The output produced with fop in cocoon is sometimes
messing around the characters of a word.

What I have tested so far, is that there is a problem with
Xalan-2.2.0.jar,
Xerces-1.4.4.jar
which are used in these cocoon versions. When you run fop with these
jars
then you are faced
to the same problems in fop  as a stand alone application. So in fact
the
problem is not cocoon itself,
but the used versions of Xerces and Xalan.

Has anybody an idea where this comes from? Is there a way to solve these
problems?

Thanks and best regards.

Frank



-Ursprüngliche Nachricht-
Von: Skladovs, Victor [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 11:42
An: [EMAIL PROTECTED]
Betreff: FOP In Latest Cocoon Releases


Dear Friends!

I am working with Cocoon and producing my pdf files (mostly
tables) with fop integrated in it.
But I am forced to use a relatively old version of Cocoon
(Cocoon-2.0rc1), because ONLY with this release all my pdf tables are
being correctly shown .I mean columns and row headers etc.
When being generating with any of the following versions of cocoon
(2.0.1, 2.0.2, 2.0.3), very many of my tables are being shown
incorrectly (especially, column and row headers), although compiled
simply from command line with, say, fop-0.20.3, used in Cocoon-2.0.3,
they look
fine!
Then, on advice of a fop-users-list member, I've compiled my fo file
from the command line, BUT using all necessary jar file from the cocoon
and tomcat directory. The pdf's are good!
It seems like something else in cocoon must be preventing it's fop to
work correctly.

Has anybody already faced this problem? What does the correct work of
Cocoon-fop depend on? What could I do to make the latest Cocoon releases
to work correctly, as fop concerns?

Thanks for your help!
Regards,
Viktor


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




mySQL connection pool

2002-09-26 Thread Cocoon User


i have an mySQL database: myDB with one  table myTable running at
localhost

can you please give me an example of connection pool syntax for
cocoon.xconf file ?


thank

Kounis Stavros




-
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: SunRise - Accessing Parameter

2002-09-26 Thread Richard Reyes

Hi Carsten,

How can I use map:act type=request when I got map:act
type=sunRise-login???
see
map:match pattern=foo-login
  map:act type=sunRise-login
map:parameter name=handler value=foo-handler/
map:parameter name=parameter_name
value=request:name/
map:parameter name=parameter_password
value=request:password/
!-- If the authentication is successfull then this redirect will be
performed --
map:redirect-to uri=foo-resource-1.html/
  /map:act

Thanks.

- Original Message -
From: Carsten Ziegeler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 12:38 AM
Subject: RE: SunRise - Accessing Parameter


 Hi Richard,

 first, could you please send plain text mails and not html.

 I assuem that you want to access the resource parameter
 in the redirect, right?
 So you can use:

 map:act type=request
 map:parameter name=parameters value=true/

 map:redirect-to uri={resource}/
 /map:act

 With the above used request action, you have access to all request
 parameters using their name. So {resource} is replaced with
 the value.

 HTH
 Carsten

 -Original Message-
 From: Richard Reyes [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 10:56 PM
 To: C2 Users
 Subject: SunRise - Accessing Parameter


 Hi Guys,

 In

http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
 s.html

 How can I access the resource parameter in loginpage.xml ( the underlined
 part ).

 ?xml version=1.0?
 content
  form
   urlfoo-login?resource=foo-protected/url
   field name=name type=te

 How can I access this parameter in this pipeline? after logging in.

 map:match pattern=foo-login
  map:act type=sunRise-login
map:parameter name=handler value=foo-handler/
map:parameter name=parameter_name
 value=request:name/
map:parameter name=parameter_password
 value=request:password/
!-- If the authentication is successfull then this
 redirect will be performed --
map:redirect-to uri=foo-resource-1.html/
  /map:act
 !-- authentication failed: --
 map:generate src=login-failed.xml/
 map:transform src=login-failed.xsl/
 map:serialize/
 /map:match

 Thanks
 Richard


 -
 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: mySQL connection pool

2002-09-26 Thread Richard Reyes

Something like this...

  datasources

jdbc name=ConnMySQL
  pool-controller min=5 max=10/
  dburljdbc:mysql://localhost/db_xxx/dburl
  userroot/user
  password/password
/jdbc


  /datasources

- Original Message - 
From: Cocoon User [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 12:41 AM
Subject: mySQL connection pool


 
 i have an mySQL database: myDB with one  table myTable running at
 localhost
 
 can you please give me an example of connection pool syntax for
 cocoon.xconf file ?
 
 
 thank
 
 Kounis Stavros
 
 
 
 
 -
 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]




AW: FOP In Latest Cocoon Releases

2002-09-26 Thread Przybilla, Frank

Hi Viktor,

I have also made the same experiences with exchanging the 
version of Xalan and Xerces in cocoon-2.0{1,2,3}. It doesn't work.

As J. Pietschmann wrote it is a bug in fop which is fixed in 
FOP CVS, branch tag fop-0_20_2-maintain.

So we should try to replace fop.

Regards 

Frank


-Ursprüngliche Nachricht-
Von: Skladovs, Victor [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. September 2002 09:39
An: [EMAIL PROTECTED]
Betreff: AW: FOP In Latest Cocoon Releases


Hi Frank!

I think all we have to do is to replace xalan and maybe xerces jars in a
cocoon distribution.
I tried to do this. I replaced xalan-2.3.1 with xalan-2.0.0 in
Cocoon.2.0.3. It worked very unstable, I did it all back at the result,
but my pdf were fine!

The question is how could I replace xalan and xerces in cocoon? What
must I take into account so that the cocoon works stable?

Regards,
Viktor

-Ursprüngliche Nachricht-
Von: Przybilla, Frank [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 15:06
An: '[EMAIL PROTECTED]'
Betreff: AW: FOP In Latest Cocoon Releases


Hello to all cocoon users,

I also have big troubles with fop in cocoon-2.01,cocoon-2.02,
cocoon-2.03.

Everything is working fine with fop-0.20.3 as a standalone application
but integrated into cocoon there is sometimes a strange behavior.

My problem occurs especially in conjunction with the generation of fop
tables and hyphenation of long
text in table-cells. The output produced with fop in cocoon is sometimes
messing around the characters of a word.

What I have tested so far, is that there is a problem with
Xalan-2.2.0.jar,
Xerces-1.4.4.jar
which are used in these cocoon versions. When you run fop with these
jars
then you are faced
to the same problems in fop  as a stand alone application. So in fact
the
problem is not cocoon itself,
but the used versions of Xerces and Xalan.

Has anybody an idea where this comes from? Is there a way to solve these
problems?

Thanks and best regards.

Frank



-Ursprüngliche Nachricht-
Von: Skladovs, Victor [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 11:42
An: [EMAIL PROTECTED]
Betreff: FOP In Latest Cocoon Releases


Dear Friends!

I am working with Cocoon and producing my pdf files (mostly
tables) with fop integrated in it.
But I am forced to use a relatively old version of Cocoon
(Cocoon-2.0rc1), because ONLY with this release all my pdf tables are
being correctly shown .I mean columns and row headers etc.
When being generating with any of the following versions of cocoon
(2.0.1, 2.0.2, 2.0.3), very many of my tables are being shown
incorrectly (especially, column and row headers), although compiled
simply from command line with, say, fop-0.20.3, used in Cocoon-2.0.3,
they look
fine!
Then, on advice of a fop-users-list member, I've compiled my fo file
from the command line, BUT using all necessary jar file from the cocoon
and tomcat directory. The pdf's are good!
It seems like something else in cocoon must be preventing it's fop to
work correctly.

Has anybody already faced this problem? What does the correct work of
Cocoon-fop depend on? What could I do to make the latest Cocoon releases
to work correctly, as fop concerns?

Thanks for your help!
Regards,
Viktor


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

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




mySQL driver ? and performance

2002-09-26 Thread Cocoon User

1.
where can i find mySQL driver for cocoon ?

2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php



thnx

Kounis Stavros






-
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: Deploying Cocoon via Ant

2002-09-26 Thread Ugo Cei

Vadim Gritsenko wrote:
 Ugo Cei wrote:
 
 I'm trying to setup a development environment for Cocoon applications 
 based on Ant. I'd like to use the Ant deploy target to deploy an 
 application, once it's been built, to a remote server, using Tomcat's 
 manager interface (using Tomcat 4.1.10).
 
 
 
 I've seen this report from somebody else, asked a question, never got 
 result... What URL you use to deploy webapp (I found two admin 
 interfaces in tomcat :-/ ), what are the parameters?

Yes, I found it in the mail archives. Actually I use Ant's Catalina 
optional tasks (see 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html, end 
of page). The Ant target is something like:

   target name=deploy description=Deploy web application
   depends=war
 deploy url=${url} username=${username} password=${password}
 path=${path} war=file:./${dest}/resl.war/
   /target

It invokes an URL like the following:

http://hostname:8080/manager/deploy?path=/resl

and sends the WAR file via HTTP PUT. It actually succeedes because the 
WAR file is stored in the server's work directory (somewhere like 
$CATALINA_HOME/work/Standalone/localhost, I can't check the exact path 
at the moment because the server is down).

I can obtain the exact same effect if I manually drop the WAR file in 
$CATALINA_HOME/webapps and invoke:

http://hostname:8080/manager/install?path=/reslwar=jar:file:../webapps/resl.war!/

In both cases the application is successfully deployed, but the WAR file 
is NOT unpacked. In this scenario Cocoon (2.0.3, JDK 1.3.1) works 
perfectly as long as there are no XSP pages! Every single XSP page that 
is invoked cannot be compiled because the compiler cannot find a single 
class, not even java.lang.String!

The Java source derived form the transformation of the XSP file, 
however, is correctly generated under the work directory.

On the other hand, if I restart Tomcat with the WAR file in the webapps 
subdirectory, it does unpack the WAR file and the XSP pages get compiled 
without errors.

That's about all, hope someone can help.

Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - 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]




AW: FOP In Latest Cocoon Releases

2002-09-26 Thread Skladovs, Victor

Frank, I don't believe it is a fop bug!
I had been tested all the variants from the command line and I have
assessed that it is xalan bug!
The bug appears ONLY by transforming XML and XSL files.
While working only with, say, FO documents, everything's works fine, but
when I tried to transform my xml file with a xml2fo.xsl:
fop -xml table.xml -xsl xml2fo.xsl -pdf table.pdf

I've got a bad pdf!

Regards,
Viktor

-Ursprüngliche Nachricht-
Von: Przybilla, Frank [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. September 2002 09:46
An: '[EMAIL PROTECTED]'
Betreff: AW: FOP In Latest Cocoon Releases


Hi Viktor,

I have also made the same experiences with exchanging the 
version of Xalan and Xerces in cocoon-2.0{1,2,3}. It doesn't work.

As J. Pietschmann wrote it is a bug in fop which is fixed in 
FOP CVS, branch tag fop-0_20_2-maintain.

So we should try to replace fop.

Regards 

Frank


-Ursprüngliche Nachricht-
Von: Skladovs, Victor [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. September 2002 09:39
An: [EMAIL PROTECTED]
Betreff: AW: FOP In Latest Cocoon Releases


Hi Frank!

I think all we have to do is to replace xalan and maybe xerces jars in a
cocoon distribution.
I tried to do this. I replaced xalan-2.3.1 with xalan-2.0.0 in
Cocoon.2.0.3. It worked very unstable, I did it all back at the result,
but my pdf were fine!

The question is how could I replace xalan and xerces in cocoon? What
must I take into account so that the cocoon works stable?

Regards,
Viktor

-Ursprüngliche Nachricht-
Von: Przybilla, Frank [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 15:06
An: '[EMAIL PROTECTED]'
Betreff: AW: FOP In Latest Cocoon Releases


Hello to all cocoon users,

I also have big troubles with fop in cocoon-2.01,cocoon-2.02,
cocoon-2.03.

Everything is working fine with fop-0.20.3 as a standalone application
but integrated into cocoon there is sometimes a strange behavior.

My problem occurs especially in conjunction with the generation of fop
tables and hyphenation of long
text in table-cells. The output produced with fop in cocoon is sometimes
messing around the characters of a word.

What I have tested so far, is that there is a problem with
Xalan-2.2.0.jar,
Xerces-1.4.4.jar
which are used in these cocoon versions. When you run fop with these
jars
then you are faced
to the same problems in fop  as a stand alone application. So in fact
the
problem is not cocoon itself,
but the used versions of Xerces and Xalan.

Has anybody an idea where this comes from? Is there a way to solve these
problems?

Thanks and best regards.

Frank



-Ursprüngliche Nachricht-
Von: Skladovs, Victor [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 25. September 2002 11:42
An: [EMAIL PROTECTED]
Betreff: FOP In Latest Cocoon Releases


Dear Friends!

I am working with Cocoon and producing my pdf files (mostly
tables) with fop integrated in it.
But I am forced to use a relatively old version of Cocoon
(Cocoon-2.0rc1), because ONLY with this release all my pdf tables are
being correctly shown .I mean columns and row headers etc.
When being generating with any of the following versions of cocoon
(2.0.1, 2.0.2, 2.0.3), very many of my tables are being shown
incorrectly (especially, column and row headers), although compiled
simply from command line with, say, fop-0.20.3, used in Cocoon-2.0.3,
they look
fine!
Then, on advice of a fop-users-list member, I've compiled my fo file
from the command line, BUT using all necessary jar file from the cocoon
and tomcat directory. The pdf's are good!
It seems like something else in cocoon must be preventing it's fop to
work correctly.

Has anybody already faced this problem? What does the correct work of
Cocoon-fop depend on? What could I do to make the latest Cocoon releases
to work correctly, as fop concerns?

Thanks for your help!
Regards,
Viktor


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

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

Warnings building in java API docs

2002-09-26 Thread Antonio Gallardo Rivera

I am recently downloaded again from CVS and recompile.

I am getting this errors:

/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/xml/dom/DOMUtil.java:507: 
warning - Tag @link: missing #: valueOf(Node, Object)

Also the same error is in:

527, 562 lines.

Aditionaly someothers error are in:

/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/components/validation/schematron/ValidationResult.java:129:
 
warning - @todo is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/components/xmlform/Form.java:401:
 
warning - @todo is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/components/xmlform/Form.java:511:
 
warning - @todo is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/transformation/EncodeURLTransformer.java:126:
 
warning - @cocoon:name is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/transformation/EncodeURLTransformer.java:126:
 
warning - @cocoon:status is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/transformation/EncodeURLTransformer.java:126:
 
warning - @cocoon:parameter is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/transformation/EncodeURLTransformer.java:126:
 
warning - @cocoon:parameter is an unknown tag.
/cocoon-2.1/xml-cocoon2/build/cocoon/src/org/apache/cocoon/transformation/I18nTransformer.java:231:
 
warning - @todo is an unknown tag.



Antonio Gallardo

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




About building Cocoon 2.1 CVS

2002-09-26 Thread Antonio Gallardo Rivera

Why in the directory:

cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/

Its a subdirectory: webapp that has many subdirectories recursively.

Is this correct? And why?

Regards,

Antonio Gallardo




-
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: About building Cocoon 2.1 CVS

2002-09-26 Thread Antonio Gallardo Rivera

I am asking because in the subdirectories are as long as this string:

/home/agallardo/prueba/cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib

El Jueves, 26 de Septiembre de 2002 03:15, Antonio Gallardo Rivera escribió:
 Why in the directory:

 cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/

 Its a subdirectory: webapp that has many subdirectories recursively.

 Is this correct? And why?

 Regards,

 Antonio Gallardo




 -
 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[2]: Error deploying cocoon.war (Version 2.0.3) to Tomcat 4.1.10

2002-09-26 Thread Andrei Svirida

Hallo Vadim,

i've downloaded the Cocoon 2.0.3 and tried to deploy the file cocoon.war
to my Tomcat server (4.1.10) using the Tomcat Manager (or 'Deployment
tool' by Sun)

VG How did you do this? i.e., what was the url to deploy the war?
The URL was http://Server:8080/manager/deploy
With Tomcat you can submit the file with the HTTP POST method to the
manager servlet, which will handle its deployment.

not found Line 26, column 53: cannot access class DefaultConfiguration; file
--

In Tomcat/work/Standalone/localhost/cocoon/WEB-INF/lib i can see
all libraries which classes cocoon servlet claims not to find, e.g 
avalon-framework-4.1.2.jar


VG Not Cocoon but compiler. Compiler did not get correct classpath.
OK, you are right

--
Andrei Svirida, Projekte  Entwicklung
MIDRAY GmbH - a debitel company
Phone:  +49.221.8884 435 
Fax:+49.221.8884 455

http://www.midray.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]




Source Writing Transformer: Adding namespaces

2002-09-26 Thread Alex Romayev

Hi,

I'm using Source Writing Transformer to write XML to
file.  I need to add namespace declarations to the
root node, does anyone know how to do this?

Thanks,
-Alex

-
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: [newbie] ESQL Error Handling

2002-09-26 Thread Christian Haul

On 26.Sep.2002 -- 09:37 AM, Zein Dowe wrote:
 Hi,
 
 i got some questions about the esql logicsheet from cocoon.
 I suppose the first one is easy to answer:
 
 1. How can i count the number of rows from the result of my query?

There's a row-count tag but it works only with some cases. You saftest
bet is to count the rows as you retrieve them. If you need paging or
something, esql provides a limit clause. See docs and search this list.

 The second one seems quit more difficult to me (but i am a newbie and know
 nothing ;-):
 
 2. How can I handle the exception which is thrown if the database connection
 fails?

You can override the error handler in your sitemap.

Other errors can be handled in the esql:error-results/
block. Connection errors not, I'm afraid.

Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add SUMMARY:  to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

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




Re: Source Writing Transformer: Adding namespaces

2002-09-26 Thread funing

Can you use the insert tag?

On Thu, 26 Sep 2002 02:17:56 -0700 (PDT)
Alex Romayev [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm using Source Writing Transformer to write XML to
 file.  I need to add namespace declarations to the
 root node, does anyone know how to do this?
 
 Thanks,
 -Alex


-- 
funing [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: SunRise - Accessing Parameter

2002-09-26 Thread Carsten Ziegeler

You can simply nest them:

map:match pattern=foo-login
 map:act type=sunRise-login
  map:parameter name=handler value=foo-handler/
  map:parameter name=parameter_name value=request:name/
  map:parameter name=parameter_password
value=request:password/

  map:act type=request
 map:parameter name=parameters value=true/

 map:redirect-to uri={resource}/
 /map:act
  /map:act
/map:match

Carsten

 -Original Message-
 From: Richard Reyes [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 12:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: SunRise - Accessing Parameter


 Hi Carsten,

 How can I use map:act type=request when I got map:act
 type=sunRise-login???
 see
 map:match pattern=foo-login
   map:act type=sunRise-login
 map:parameter name=handler
 value=foo-handler/
 map:parameter name=parameter_name
 value=request:name/
 map:parameter name=parameter_password
 value=request:password/
 !-- If the authentication is successfull then this redirect will be
 performed --
 map:redirect-to uri=foo-resource-1.html/
   /map:act

 Thanks.

 - Original Message -
 From: Carsten Ziegeler [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 26, 2002 12:38 AM
 Subject: RE: SunRise - Accessing Parameter


  Hi Richard,
 
  first, could you please send plain text mails and not html.
 
  I assuem that you want to access the resource parameter
  in the redirect, right?
  So you can use:
 
  map:act type=request
  map:parameter name=parameters value=true/
 
  map:redirect-to uri={resource}/
  /map:act
 
  With the above used request action, you have access to all request
  parameters using their name. So {resource} is replaced with
  the value.
 
  HTH
  Carsten
 
  -Original Message-
  From: Richard Reyes [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 26, 2002 10:56 PM
  To: C2 Users
  Subject: SunRise - Accessing Parameter
 
 
  Hi Guys,
 
  In
 
 http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunris
eComponent
 s.html

 How can I access the resource parameter in loginpage.xml ( the underlined
 part ).

 ?xml version=1.0?
 content
  form
   urlfoo-login?resource=foo-protected/url
   field name=name type=te

 How can I access this parameter in this pipeline? after logging in.

 map:match pattern=foo-login
  map:act type=sunRise-login
map:parameter name=handler value=foo-handler/
map:parameter name=parameter_name
 value=request:name/
map:parameter name=parameter_password
 value=request:password/
!-- If the authentication is successfull then this
 redirect will be performed --
map:redirect-to uri=foo-resource-1.html/
  /map:act
 !-- authentication failed: --
 map:generate src=login-failed.xml/
 map:transform src=login-failed.xsl/
 map:serialize/
 /map:match

 Thanks
 Richard


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




xsp-session:getxml

2002-09-26 Thread Antonio Gallardo Rivera

I will try to explain how far I am now in the building of the 
xsp-session:getxml for XSP.

As I said I was researching about that, now I can get the values of the 
authentication context.

In XSP we can use:
Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;

2-Add imports:
xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionContext/xsp:include
xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include

3- Logic inside the xsp:page:

xsp:logic
SimpleSessionContext a = 
((SimpleSessionContext)xsp:exprxsp-session:get-attribute 
name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr);
DocumentFragment b = a.getXML(/);
String d = DOMUtil.createText(b);
/xsp:logic

Only for test I used, and it gets the values I need.

xsp:exprb/xsp:expr

After it returns I saw in the generated HTML that there is only one context.

myhandler
authentication
ID1/ID
rolemyrole/role
data
usernameMy name/username
birthday/birthday
.
/data
/authentication
/myhandler

I am also researching about how to get the authentication context because 
there are two attributes and the name of the handler can be diferent as long 
as I know. Then:

A) adding imports
xsp:includejava.util.ArrayList/xsp:include
xsp:includejava.util.HashMap/xsp:include

B) xsp:logic

ArrayList al = 
((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);

String al0 = ((String)al.get(0));
String al1 = ((String)al.get(1));oot node, does anyone know how
HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute 
name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);

With al. I can make use of the attributesnames of the session, after that I 
can get the names using the variables al0 and al1.

al0 is org.apache.cocoon.webapps.authentication.Handlers
and
al1 is org.apache.cocoon.webapps.authentication.SessionContext

About al1 is above a litlle explain that can helps to get directly the 
authentication ID using the Strings:

xsp:logic
SimpleSessionContext a = 
((SimpleSessionContext)xsp:exprxsp-session:get-attribute 
name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr);
DocumentFragment b = a.getXML(/myhandler/authentication/ID);
/xsp:logic

After this, the variable b has the value of /authentication/ID.

About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a 
ArrayList that contains the names of the attributes.

Some examples using

pKey: xsp:exprhs.keySet()/xsp:expr/p
pValue: xsp:exprhs.values()/xsp:expr/p
pAttribute: xsp:exprhs.values()/xsp:expr/p

But I cannot take the Session Context. I was thinking in a get how to get away 
the context and just write a tag like:

xsp-session:getxml path=/myhandler/authentication/

Another question: Can we add this new function to the already xsp-session 
logicsheet?

Comments are welcome :)

Antonio Gallardo








-
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: Using frames ?

2002-09-26 Thread Luca Morandini

Ganael,

I thought me and Vadim answered already to this question...
...anyway, you could build one pipeline for the frameset page, containing frames' 
URIs, and then map those URIs to other pipelines.

Best regards,

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


 -Original Message-
 From: Ganael LAPLANCHE [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 12:14 PM
 To: [EMAIL PROTECTED]
 Subject: Using frames ?


 Hello folks :)

 How could I recompose a frame-using document with many documents generated
 in memory with map:transform ? Is it possible ?

 Thank you,

 Ganaël.


 -
 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: Source Writing Transformer: Adding namespaces

2002-09-26 Thread Alex Romayev

Not sure how I would do that, here is an example:

What I would like to get is:
news  
  xmlns:pub=http://www.romayev.com/publication/1.0;
  item id=N100AE
pub:publication
 
pub:published-date2001-11-06/pub:published-date
  ...
/pub:publication
  /item
/news

Here is the code I use for SourceWritingTransformer:
source:write src=content/news.xml
  news  
   
xmlns:pub=http://www.romayev.com/publication/1.0;
item id=N100AE
  pub:publication
   
pub:published-date2001-11-06/pub:published-date
...
  /pub:publication
/item
  /news
/source:write

--- funing [EMAIL PROTECTED] wrote:
 Can you use the insert tag?
 
 On Thu, 26 Sep 2002 02:17:56 -0700 (PDT)
 Alex Romayev [EMAIL PROTECTED] wrote:
 
  Hi,
  
  I'm using Source Writing Transformer to write XML
 to
  file.  I need to add namespace declarations to the
  root node, does anyone know how to do this?
  
  Thanks,
  -Alex
 
 
 -- 
 funing [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]




Re: Using frames ?

2002-09-26 Thread Ganael LAPLANCHE

Yes, I'm sorry...
Thank you very much for helping me :)

Ganaël.

- Original Message -
From: Luca Morandini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 12:30 PM
Subject: RE: Using frames ?


Ganael,

I thought me and Vadim answered already to this question...
...anyway, you could build one pipeline for the frameset page, containing
frames' URIs, and then map those URIs to other pipelines.

Best regards,

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


 -Original Message-
 From: Ganael LAPLANCHE [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 12:14 PM
 To: [EMAIL PROTECTED]
 Subject: Using frames ?


 Hello folks :)

 How could I recompose a frame-using document with many documents generated
 in memory with map:transform ? Is it possible ?

 Thank you,

 Ganaël.


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




Re: Problems downloading 2.1

2002-09-26 Thread Vadim Gritsenko

jorge_noe bello_mendoza wrote:

 I'm in trouble downloading 2.1 CVS
 I think it's a problem related with the
 firewall / proxy my company uses.

 Is there an orthodox way (I mean ftp or http)
 of downloading 2.1 ?


There are snapshots:
http://cvs.apache.org/snapshots/xml-cocoon2/

Vadim


 I found a Code Repository in Cocoon page
 but I'm not sure what should I download.

 Any help will be appreciated.





-
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: Serializig and LF: Problem

2002-09-26 Thread Vadim Gritsenko

Skansen wrote:

Hello

When using the XSL stylesheet below cocoon gives the output below.

The problem is that after a td or a tddiv i can't have a LF or CR.
If there is one i get aditional height in the row. (which is bad)

What i would like to get is:

td
diva...a//div

Any idea how.


1. Put this on one line
2. http://www.w3.org/TR/xslt#strip
Use strip-space


I'm using cocoon from 20020826 on vm1.3 
I tried the output in Mozilla 1.1 and IE 5.5. With a stylesheet and 
html.../html around it.

P.S
Cocoon reverse the attributes on output :)


It's Xalan or Xerces.

Vadim



Jakob

XSL Transformation

?xml version=1.0?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:template match=/
  xsl:apply-templates/
/xsl:template

xsl:template match=TREE
 div id=header
  !-- Navigation Bar --
  table width=759 cellspacing=0 cellpadding=0  border=0 height=17 
class=sM bgcolor=#336699
trtd width=759 class=mH 
  div class=mHtSP
 table width=455 cellspacing=0 cellpadding=0 border=0 height=15
 tr
td class=mHidiv class=mHspaxsl:attribute 
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
   xsl:for-each select=NODE
td class=mHidiv class=mHspaxsl:attribute 
name=hrefxsl:textxb-/xsl:textxsl:value-of 
select=TABNAME/xsl:text.html/xsl:text/xsl:attributebxsl:value-of 
select=TABNAME//b/a/div/td
   /xsl:for-each
 /tr
 /table
  /div
/td/tr
  /table
 /div
/xsl:template

/xsl:stylesheet




- Output from Cocoon

div id=header
table bgcolor=#336699 class=sM height=17 border=0 cellpadding=0 
cellspacing=0 width=759
tr
td class=mH width=759
div class=mHtSP
table height=15 border=0 cellpadding=0 cellspacing=0 width=455
tr
td class=mHi
div class=mHsp
a href=index.htmlbHome/b/a
/div
/td
/tr
/table
/div
/td
/tr
/table
/div
  





-
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: [newbie] ESQL Error Handling

2002-09-26 Thread Vadim Gritsenko

Zein Dowe wrote:

Hi,

i got some questions about the esql logicsheet from cocoon.
I suppose the first one is easy to answer:

1. How can i count the number of rows from the result of my query?


Not sure does ESQL has something for this or not, but in any case you 
can count using XSLT.


The second one seems quit more difficult to me (but i am a newbie and know
nothing ;-):

2. How can I handle the exception which is thrown if the database connection
fails?

If i get it right, this kind of exception is handled by cocoon itself and
not
by the esql-logicsheet. So how can i prevent that the ugly cocoon exception
window pops up and, instead of that, show a message which
says that the connection process has failed?


Any exception can be handled as you want using map:handle-errors/ 
pipeline in the sitemap. This pipeline has pre-set generator, so you can 
write an XSLT to format (and process) the error any way you want it.

Vadim


If somebody knows the answers or has some suggestions, i would be
very grateful if you share them with me.

regards,
Zein





-
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: About building Cocoon 2.1 CVS

2002-09-26 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

Why in the directory:

cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/

Its a subdirectory: webapp that has many subdirectories recursively.

Is this correct? And why?


No, it's not. Bug.

Vadim


Regards,

Antonio Gallardo
  





-
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] Re: Multiple-logicsheets: evaluation probelms with SQL

2002-09-26 Thread Alan Hodgkinson


Phew.. I got it to work. Details and discussion below:

Alan Hodgkinson wrote:

 I get a compile error from the Java code generated by
 my logicsheet.

 I'm trying to implement a logicsheet that looks up
 a value given an id. I'm calling it from an XSP page
 as follows:

   dbutil:idlookup table=Clients
  xsp-request:get-parameter name=clientId/
   /dbutil:idlookup

 The dbutil logic sheet makes use of the esql logicsheet.
 dbutil:idlookup performs, more or less, the following:

   xsl:template match=dbutil:idlookup
 esql:collection
...
esql:query
   select name from Clients where clientId =
 xsl:value-of select=.|text()/
 
 I had hoped that the idlookup tag would contain
 the text representation my client id (e.g. '1') at evaluation
 time. I find instead that Cocoon is attempting to replace the
 get-parameter with a Java call, which (logically speaking)
 generates a select that looks like this:
 
 select name from Clients where clientId =
   xsp-request:get-parameter name=clientId/
 
 This would be fine except that the select statement is
 apparently treated internally as a string and when
 processed by the generator, it creates JSP code that
 looks like this (Slightly adjusted and line-wrapped to
 make it more readable):
 
   _esql_query =
   new EsqlQuery(
 _esql_connection,
 String.valueOf(
 select name from Clients where clientId =
(XSPRequestHelper.getParameter(objectModel,
   clientId, null, null, null)
)
 
 )
 );
 
 Note the embedded Java method call in the literal string.
 This causes the problem. (I suppose I should consider myself
 lucky that the method call generated a syntax error instead
 of failing silently :)

After more thought and searching of the mail archives, I 
wondered if it might be possible to make use of xsp:expr
and xsp:logic tags that allow me to set a Java variable on 
the fly that. The problem is that I would be trying to 
create a string containing a tag that I need to evaluate.

The answer is yes, but it wasn't as obvious as I thought.

This eventually worked (located in the logicsheet):

  xsl:template match=dbutil:idlookup
  
xsl:variable name=id-value
  xsl:copy-of select=./
/xsl:variable

xsp:logic
  String idSelect = select xsl:value-of select=@value-field/
from xsl:value-of select=@table/ where xsl:value-of
select=@id-field/  =   + xsl:value-of select=$id-value/ ;
/xsp:logic

esql:connection
  esql:poolxsl:value-of select=@connection//esql:pool
  esql:execute-query
esql:query
  xsp:expridSelect/xsp:expr
/esql:query
...

Note the weird quoting in the xsp:logic tag. Everything 
up to the id-value is quoted, since all the 'value-of' 
tags up to that point are selecting XML attributes and 
return literals. 

The final 'value-of', which returns $id-value, and should 
contain results of evaluating the tag 
xsp-request:get-parameter name=clientId/. It _must_ not
be quoted because when it is translated into Java/JSP code 
it turns into code not a literal string. In fact it's a 
method call that returns a string.

background-info related=slightly
  I got the idea from Stehpan Ng, who described a similar 
  problem. In his case he is trying to get parameter values 
  from the pipeline into his ESQL statement:

  http://www.mail-archive.com/cocoon-users@xml.apache.org/msg15161.html
/background-info

Christian Haul also supplied a few tips which helped me find
the eventual solution..

 Christian Haul wrote:
snip/
 Two options: 

 a) create the query dynamically. esql expects just a string. Thus you
 need to 
  esql:query
 xsp:exprselect name from clients where clientid= +
   xsp-request:get-parameter name=clientId/
 xsp:expr
  /esql:query

This does not work as is, because the conversion to JSP/Java 
results in a some local definitions, which cannot be simply added 
to an xsp:expr. I needed to use the XMST variable as described 
above.
 
 b) use a prepared statement
  esql:query
 select name from clients where clientid=
   esql:parameterxsp-request:get-parameter
 name=clientId//esql:parameter
  /esql:query
 
 Preferable is b).

This would work, but requires that my parameter comes from the 
HTML form parameters. Remember how I call my logicsheet:

   dbutil:idlookup table=Clients
  xsp-request:get-parameter name=clientId/
   /dbutil:idlookup

I want a generic logicsheet and don't want to be constrained 
to have to get the clientId parameter from the HTML parameters. 

E.g. I should be free to replace the xsp-request:get-parameter
with anything and the logic sheet shouldn't have to worry about 
what it gets. With XSLT this isn't normally a problem. That fact 
that the parameter, which could be XML nodes instead of text, is 
placed in to a Java string that is evaluated 

Re: xsp-session:getxml

2002-09-26 Thread Antonio Gallardo Rivera

Hi folks,

Can someone help me how to do that?

1-You need a component manager in your XSP - I'm not sure, but
   I think it's somehow available - I never wrote any XSP...
2. Lookup a session manager

Inside the XSPSessionHelper we have only the Session, but we need to go to the 
SessionManager, how we can get it?

All this is about to extend the xsp-session with a new tag like 
session:getxml. I need help to finish it. Please help. :)

Thanks in advance,

Antonio Gallardo


El Jueves, 26 de Septiembre de 2002 03:50, Antonio Gallardo Rivera escribió:
 I will try to explain how far I am now in the building of the
 xsp-session:getxml for XSP.

 As I said I was researching about that, now I can get the values of the
 authentication context.

 In XSP we can use:
 Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;

 2-Add imports:
 xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionContext
/xsp:include xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
 xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include

 3- Logic inside the xsp:page:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/);
 String d = DOMUtil.createText(b);
 /xsp:logic

 Only for test I used, and it gets the values I need.

 xsp:exprb/xsp:expr

 After it returns I saw in the generated HTML that there is only one
 context.

 myhandler
 authentication
 ID1/ID
 rolemyrole/role
 data
   usernameMy name/username
   birthday/birthday
   .
 /data
 /authentication
 /myhandler

 I am also researching about how to get the authentication context because
 there are two attributes and the name of the handler can be diferent as
 long as I know. Then:

 A) adding imports
 xsp:includejava.util.ArrayList/xsp:include
 xsp:includejava.util.HashMap/xsp:include

 B) xsp:logic

 ArrayList al =
 ((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);

 String al0 = ((String)al.get(0));
 String al1 = ((String)al.get(1));oot node, does anyone know how
 HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);

 With al. I can make use of the attributesnames of the session, after that I
 can get the names using the variables al0 and al1.

 al0 is org.apache.cocoon.webapps.authentication.Handlers
 and
 al1 is org.apache.cocoon.webapps.authentication.SessionContext

 About al1 is above a litlle explain that can helps to get directly the
 authentication ID using the Strings:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/myhandler/authentication/ID);
 /xsp:logic

 After this, the variable b has the value of /authentication/ID.

 About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a
 ArrayList that contains the names of the attributes.

 Some examples using

 pKey: xsp:exprhs.keySet()/xsp:expr/p
 pValue: xsp:exprhs.values()/xsp:expr/p
 pAttribute: xsp:exprhs.values()/xsp:expr/p

 But I cannot take the Session Context. I was thinking in a get how to get
 away the context and just write a tag like:

 xsp-session:getxml path=/myhandler/authentication/

 Another question: Can we add this new function to the already xsp-session
 logicsheet?

 Comments are welcome :)

 Antonio Gallardo








 -
 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: About building Cocoon 2.1 CVS

2002-09-26 Thread Antonio Gallardo Rivera

Thanks,

Antonio

El Jueves, 26 de Septiembre de 2002 06:28, Vadim Gritsenko escribió:
 Antonio Gallardo Rivera wrote:
 Why in the directory:
 
 cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/
 
 Its a subdirectory: webapp that has many subdirectories recursively.
 
 Is this correct? And why?

 No, it's not. Bug.

 Vadim

 Regards,
 
 Antonio Gallardo

 -
 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: Serializig and LF: Problem

2002-09-26 Thread Vadim Gritsenko

Vadim Gritsenko wrote:

 Skansen wrote:

 Hello

 When using the XSL stylesheet below cocoon gives the output below.

 The problem is that after a td or a tddiv i can't have a LF or CR.
 If there is one i get aditional height in the row. (which is bad)

 What i would like to get is:

 td
 diva...a//div

 Any idea how.


 1. Put this on one line
 2. http://www.w3.org/TR/xslt#strip
 Use strip-space


Another thing to check is that html serializer has indent set to no:

indentno/indent

See 
http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT

Vadim



 I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla 
 1.1 and IE 5.5. With a stylesheet and html.../html around it.

 P.S
 Cocoon reverse the attributes on output :)


 It's Xalan or Xerces.

 Vadim



 Jakob

 XSL Transformation

 ?xml version=1.0?
 xsl:stylesheet version=1.0 
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:template match=/
  xsl:apply-templates/
 /xsl:template

 xsl:template match=TREE
 div id=header
  !-- Navigation Bar --
  table width=759 cellspacing=0 cellpadding=0  border=0 
 height=17 class=sM bgcolor=#336699
trtd width=759 class=mH 
  div class=mHtSP
 table width=455 cellspacing=0 cellpadding=0 border=0 
 height=15
 tr
td class=mHidiv class=mHspaxsl:attribute 
 
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td 

   xsl:for-each select=NODE
td class=mHidiv class=mHspaxsl:attribute 
 name=hrefxsl:textxb-/xsl:textxsl:value-of 
 select=TABNAME/xsl:text.html/xsl:text/xsl:attributebxsl:value-of 
 select=TABNAME//b/a/div/td
   /xsl:for-each
 /tr
 /table
  /div
/td/tr
  /table
 /div
 /xsl:template

 /xsl:stylesheet




 - Output from Cocoon

 div id=header
 table bgcolor=#336699 class=sM height=17 border=0 
 cellpadding=0 cellspacing=0 width=759
 tr
 td class=mH width=759
 div class=mHtSP
 table height=15 border=0 cellpadding=0 cellspacing=0 
 width=455
 tr
 td class=mHi
 div class=mHsp
 a href=index.htmlbHome/b/a
 /div
 /td
 /tr
 /table
 /div
 /td
 /tr
 /table
 /div





-
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: [SUMMARY] Re: Multiple-logicsheets: evaluation probelms with SQL

2002-09-26 Thread Antonio Gallardo Rivera

Nice work! What about to integrate dbutil to Cocoon? I think many people will 
use it. ;)

Then this tip will not only will live in the maillist but also in the cocoon 
environment and other people will use this library. As I see the XSP is a 
very new technolgy and because of that we need to build all the logisheets 
(libraries) almost from scratch. ;).

Regards,

Antonio Gallardo.


El Jueves, 26 de Septiembre de 2002 07:37, Alan Hodgkinson escribió:
 Phew.. I got it to work. Details and discussion below:

 Alan Hodgkinson wrote:
  I get a compile error from the Java code generated by
  my logicsheet.
 
  I'm trying to implement a logicsheet that looks up
  a value given an id. I'm calling it from an XSP page
  as follows:
 
dbutil:idlookup table=Clients
   xsp-request:get-parameter name=clientId/
/dbutil:idlookup
 
  The dbutil logic sheet makes use of the esql logicsheet.
  dbutil:idlookup performs, more or less, the following:
 
xsl:template match=dbutil:idlookup
  esql:collection
 ...
 esql:query
select name from Clients where clientId =
  xsl:value-of select=.|text()/
 
  I had hoped that the idlookup tag would contain
  the text representation my client id (e.g. '1') at evaluation
  time. I find instead that Cocoon is attempting to replace the
  get-parameter with a Java call, which (logically speaking)
  generates a select that looks like this:
 
  select name from Clients where clientId =
xsp-request:get-parameter name=clientId/
 
  This would be fine except that the select statement is
  apparently treated internally as a string and when
  processed by the generator, it creates JSP code that
  looks like this (Slightly adjusted and line-wrapped to
  make it more readable):
 
_esql_query =
new EsqlQuery(
  _esql_connection,
  String.valueOf(
  select name from Clients where clientId =
 (XSPRequestHelper.getParameter(objectModel,
clientId, null, null, null)
 )
  
  )
  );
 
  Note the embedded Java method call in the literal string.
  This causes the problem. (I suppose I should consider myself
  lucky that the method call generated a syntax error instead
  of failing silently :)

 After more thought and searching of the mail archives, I
 wondered if it might be possible to make use of xsp:expr
 and xsp:logic tags that allow me to set a Java variable on
 the fly that. The problem is that I would be trying to
 create a string containing a tag that I need to evaluate.

 The answer is yes, but it wasn't as obvious as I thought.

 This eventually worked (located in the logicsheet):

   xsl:template match=dbutil:idlookup

 xsl:variable name=id-value
   xsl:copy-of select=./
 /xsl:variable

 xsp:logic
   String idSelect = select xsl:value-of select=@value-field/
 from xsl:value-of select=@table/ where xsl:value-of
 select=@id-field/  =   + xsl:value-of select=$id-value/ ;
 /xsp:logic

 esql:connection
   esql:poolxsl:value-of select=@connection//esql:pool
   esql:execute-query
 esql:query
   xsp:expridSelect/xsp:expr
 /esql:query
 ...

 Note the weird quoting in the xsp:logic tag. Everything
 up to the id-value is quoted, since all the 'value-of'
 tags up to that point are selecting XML attributes and
 return literals.

 The final 'value-of', which returns $id-value, and should
 contain results of evaluating the tag
 xsp-request:get-parameter name=clientId/. It _must_ not
 be quoted because when it is translated into Java/JSP code
 it turns into code not a literal string. In fact it's a
 method call that returns a string.

 background-info related=slightly
   I got the idea from Stehpan Ng, who described a similar
   problem. In his case he is trying to get parameter values
   from the pipeline into his ESQL statement:

   http://www.mail-archive.com/cocoon-users@xml.apache.org/msg15161.html
 /background-info

 Christian Haul also supplied a few tips which helped me find
 the eventual solution..

  Christian Haul wrote:

 snip/

  Two options:
 
  a) create the query dynamically. esql expects just a string. Thus you
  need to
   esql:query
  xsp:exprselect name from clients where clientid= +
xsp-request:get-parameter name=clientId/
  xsp:expr
   /esql:query

 This does not work as is, because the conversion to JSP/Java
 results in a some local definitions, which cannot be simply added
 to an xsp:expr. I needed to use the XMST variable as described
 above.

  b) use a prepared statement
   esql:query
  select name from clients where clientid=
esql:parameterxsp-request:get-parameter
  name=clientId//esql:parameter
   /esql:query
 
  Preferable is b).

 This would work, but requires that my parameter comes from the

 HTML form parameters. Remember how I call 

Re: xsp-session:getxml

2002-09-26 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

Hi folks,

Can someone help me how to do that?

1-You need a component manager in your XSP - I'm not sure, but
   I think it's somehow available - I never wrote any XSP...


this.manager


2. Lookup a session manager


manager.lookup(SessionManager.ROLE);

Don't forget to release when you are done:
manager.release(sessionManager);

Vadim


Inside the XSPSessionHelper we have only the Session, but we need to go to the 
SessionManager, how we can get it?

All this is about to extend the xsp-session with a new tag like 
session:getxml. I need help to finish it. Please help. :)

Thanks in advance,

Antonio Gallardo


El Jueves, 26 de Septiembre de 2002 03:50, Antonio Gallardo Rivera escribió:
  

I will try to explain how far I am now in the building of the
xsp-session:getxml for XSP.

As I said I was researching about that, now I can get the values of the
authentication context.

In XSP we can use:
Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;

2-Add imports:
xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionContext
/xsp:include xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include

3- Logic inside the xsp:page:

xsp:logic
SimpleSessionContext a =
((SimpleSessionContext)xsp:exprxsp-session:get-attribute
name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/);
String d = DOMUtil.createText(b);
/xsp:logic

Only for test I used, and it gets the values I need.

xsp:exprb/xsp:expr

After it returns I saw in the generated HTML that there is only one
context.

myhandler
authentication
ID1/ID
rolemyrole/role
data
  usernameMy name/username
  birthday/birthday
  .
/data
/authentication
/myhandler

I am also researching about how to get the authentication context because
there are two attributes and the name of the handler can be diferent as
long as I know. Then:

A) adding imports
xsp:includejava.util.ArrayList/xsp:include
xsp:includejava.util.HashMap/xsp:include

B) xsp:logic

ArrayList al =
((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);

String al0 = ((String)al.get(0));
String al1 = ((String)al.get(1));oot node, does anyone know how
HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute
name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);

With al. I can make use of the attributesnames of the session, after that I
can get the names using the variables al0 and al1.

al0 is org.apache.cocoon.webapps.authentication.Handlers
and
al1 is org.apache.cocoon.webapps.authentication.SessionContext

About al1 is above a litlle explain that can helps to get directly the
authentication ID using the Strings:

xsp:logic
SimpleSessionContext a =
((SimpleSessionContext)xsp:exprxsp-session:get-attribute
name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/myhandler/authentication/ID);
/xsp:logic

After this, the variable b has the value of /authentication/ID.

About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a
ArrayList that contains the names of the attributes.

Some examples using

pKey: xsp:exprhs.keySet()/xsp:expr/p
pValue: xsp:exprhs.values()/xsp:expr/p
pAttribute: xsp:exprhs.values()/xsp:expr/p

But I cannot take the Session Context. I was thinking in a get how to get
away the context and just write a tag like:

xsp-session:getxml path=/myhandler/authentication/

Another question: Can we add this new function to the already xsp-session
logicsheet?

Comments are welcome :)

Antonio Gallardo






-
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: mySQL driver ? and performance

2002-09-26 Thread Vadim Gritsenko

Cocoon User wrote:

1.
where can i find mySQL driver for cocoon ?


JDBC driver for mySQL will do just fine.


2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php


If no one has comparison on this list, lookup on the web data on 
performance of JDBC driver of mySQL.

Vadim


thnx

Kounis Stavros
  





-
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: [SUMMARY] Re: Multiple-logicsheets: evaluation probelms with SQL

2002-09-26 Thread Alan Hodgkinson


Dear Antonio,

 Nice work! What about integrating dbutil to Cocoon? I think many 
 people will use it. ;)

Duh.. Good idea. Why didn't I think of that?

Unfortunately, it's a performance pig.. and probably not suitable for
production. But for low traffic sites or as a demo/learning excerise 
it'd be fine.

You'll hear more from me when the code is a little more stable.

Best wishes,

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]




RE: mySQL driver ? and performance

2002-09-26 Thread [EMAIL PROTECTED]

Kounis,

The JDBC driver has been renamed MySQL Connector/J and
can be found at http://www.mysql.com/downloads/api-jdbc.html

The jar file should be placed in the Tomcat/lib directory
if you don't want to fiddle with the classpath.

Conrad

Original Message:
-
From: Cocoon User [EMAIL PROTECTED]
Date: Thu, 26 Sep 2002 10:48:59 +0300 (EEST)
To: [EMAIL PROTECTED]
Subject: mySQL driver ? and performance


1.
where can i find mySQL driver for cocoon ?

2.
i use to get data from mySQL using php
can anyone comment the performance of cocoon retrieving data from mySQL
compiring to php



thnx

Kounis Stavros






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




mail2web - Check your email from the web at
http://mail2web.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]




RE: Serializig and LF: Problem

2002-09-26 Thread Luca Morandini

Vadim,

I think the problem is not related to indentation, since the HTML output appears to 
have no indentation; moreover, I presume
strip-space will be of no use, since there are no spaces to strip in the input 
elements.

Look, the XSL fragment, according to Skansen, is:

td class=mHidiv class=mHspaxsl:attribute
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td

And the result is:

td class=mHi
div class=mHsp
a href=index.htmlbHome/b/a
/div
/td

Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this might 
be a Xalan bug.

Anyway, a span will save the day :)

Best regards,

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


 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 2:41 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Serializig and LF: Problem


 Vadim Gritsenko wrote:

  Skansen wrote:
 
  Hello
 
  When using the XSL stylesheet below cocoon gives the output below.
 
  The problem is that after a td or a tddiv i can't have a LF or CR.
  If there is one i get aditional height in the row. (which is bad)
 
  What i would like to get is:
 
  td
  diva...a//div
 
  Any idea how.
 
 
  1. Put this on one line
  2. http://www.w3.org/TR/xslt#strip
  Use strip-space


 Another thing to check is that html serializer has indent set to no:

 indentno/indent

 See
 http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT

 Vadim



  I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla
  1.1 and IE 5.5. With a stylesheet and html.../html around it.
 
  P.S
  Cocoon reverse the attributes on output :)
 
 
  It's Xalan or Xerces.
 
  Vadim
 
 
 
  Jakob
 
  XSL Transformation
 
  ?xml version=1.0?
  xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xsl:template match=/
   xsl:apply-templates/
  /xsl:template
 
  xsl:template match=TREE
  div id=header
   !-- Navigation Bar --
   table width=759 cellspacing=0 cellpadding=0  border=0
  height=17 class=sM bgcolor=#336699
 trtd width=759 class=mH 
   div class=mHtSP
  table width=455 cellspacing=0 cellpadding=0 border=0
  height=15
  tr
 td class=mHidiv class=mHspaxsl:attribute
  
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
 
xsl:for-each select=NODE
 td class=mHidiv class=mHspaxsl:attribute
  name=hrefxsl:textxb-/xsl:textxsl:value-of
  select=TABNAME/xsl:text.html/xsl:text/xsl:attributebxsl:value-of
  select=TABNAME//b/a/div/td
/xsl:for-each
  /tr
  /table
   /div
 /td/tr
   /table
  /div
  /xsl:template
 
  /xsl:stylesheet
 
 
 
 
  - Output from Cocoon
 
  div id=header
  table bgcolor=#336699 class=sM height=17 border=0
  cellpadding=0 cellspacing=0 width=759
  tr
  td class=mH width=759
  div class=mHtSP
  table height=15 border=0 cellpadding=0 cellspacing=0
  width=455
  tr
  td class=mHi
  div class=mHsp
  a href=index.htmlbHome/b/a
  /div
  /td
  /tr
  /table
  /div
  /td
  /tr
  /table
  /div
 




 -
 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: [SUMMARY] Re: Multiple-logicsheets: evaluation probelms with SQL

2002-09-26 Thread Antonio Gallardo Rivera

This is a common problem in all implementations I know about the function:

lookup(field).

But it a nice start. I think is better have something slow than nothing. With 
the time we or other people will improve the function.

Antonio

El Jueves, 26 de Septiembre de 2002 07:57, Alan Hodgkinson escribió:
 Dear Antonio,

  Nice work! What about integrating dbutil to Cocoon? I think many
  people will use it. ;)

 Duh.. Good idea. Why didn't I think of that?

 Unfortunately, it's a performance pig.. and probably not suitable for
 production. But for low traffic sites or as a demo/learning excerise
 it'd be fine.

 You'll hear more from me when the code is a little more stable.

 Best wishes,

 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]

-
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: Serializig and LF: Problem

2002-09-26 Thread Vadim Gritsenko

Luca Morandini wrote:

Vadim,

I think the problem is not related to indentation, since the HTML output appears to 
have no indentation; moreover, I presume
strip-space will be of no use, since there are no spaces to strip in the input 
elements.

Look, the XSL fragment, according to Skansen, is:

td class=mHidiv class=mHspaxsl:attribute
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td


Must admit that I have not noticed that from the first sight. :)
But I would try indent=no anyway.


And the result is:

td class=mHi
div class=mHsp
a href=index.htmlbHome/b/a
/div
/td

Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this might 
be a Xalan bug.

Anyway, a span will save the day :)


Will it? There should be no difference in behaviour - which means that 
this is an issue with serializer.

Vadim


Best regards,

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


  

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: Re: Serializig and LF: Problem


Vadim Gritsenko wrote:



Skansen wrote:

  

Hello

When using the XSL stylesheet below cocoon gives the output below.

The problem is that after a td or a tddiv i can't have a LF or CR.
If there is one i get aditional height in the row. (which is bad)

What i would like to get is:

td
diva...a//div

Any idea how.


1. Put this on one line
2. http://www.w3.org/TR/xslt#strip
Use strip-space
  

Another thing to check is that html serializer has indent set to no:

indentno/indent

See
http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT

Vadim





I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla
1.1 and IE 5.5. With a stylesheet and html.../html around it.

P.S
Cocoon reverse the attributes on output :)



It's Xalan or Xerces.

Vadim



  

Jakob

XSL Transformation

?xml version=1.0?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:template match=/
 xsl:apply-templates/
/xsl:template

xsl:template match=TREE
div id=header
 !-- Navigation Bar --
 table width=759 cellspacing=0 cellpadding=0  border=0
height=17 class=sM bgcolor=#336699
   trtd width=759 class=mH 
 div class=mHtSP
table width=455 cellspacing=0 cellpadding=0 border=0
height=15
tr
   td class=mHidiv class=mHspaxsl:attribute
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td

  xsl:for-each select=NODE
   td class=mHidiv class=mHspaxsl:attribute
name=hrefxsl:textxb-/xsl:textxsl:value-of
select=TABNAME/xsl:text.html/xsl:text/xsl:attributebxsl:value-of
select=TABNAME//b/a/div/td
  /xsl:for-each
/tr
/table
 /div
   /td/tr
 /table
/div
/xsl:template

/xsl:stylesheet




- Output from Cocoon

div id=header
table bgcolor=#336699 class=sM height=17 border=0
cellpadding=0 cellspacing=0 width=759
tr
td class=mH width=759
div class=mHtSP
table height=15 border=0 cellpadding=0 cellspacing=0
width=455
tr
td class=mHi
div class=mHsp
a href=index.htmlbHome/b/a
/div
/td
/tr
/table
/div
/td
/tr
/table
/div




-
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: About building Cocoon 2.1 CVS

2002-09-26 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

I am asking because in the subdirectories are as long as this string:

/home/agallardo/prueba/cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib


Fixed (in CVS); try again.

Vadim


El Jueves, 26 de Septiembre de 2002 03:15, Antonio Gallardo Rivera escribió:
  

Why in the directory:

cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/

Its a subdirectory: webapp that has many subdirectories recursively.

Is this correct? And why?

Regards,

Antonio Gallardo






-
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: Serializig and LF: Problem

2002-09-26 Thread Luca Morandini

snip
 Must admit that I have not noticed that from the first sight. :)
/snip

Vadim, you corrected me many times, let me return the favour once in a while ;)

snip
 But I would try indent=no anyway.
/snip

I tried that to no avail (it was my first thought, too).

snip
 Anyway, a span will save the day :)
 
 
 Will it? There should be no difference in behaviour - which means that 
 this is an issue with serializer.
/snip

I guess it will, since span does't break HTML text as div does... though it is 
included in a td... hmmm... don't really know.

Anyway, the behaviour of Xalan (or the Serializer) begs further investigations.

Best regards,

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

 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 3:29 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Serializig and LF: Problem
 
 
 Luca Morandini wrote:
 
 Vadim,
 
 I think the problem is not related to indentation, since the HTML output appears to 
have no indentation; moreover, I presume
 strip-space will be of no use, since there are no spaces to strip in the input 
elements.
 
 Look, the XSL fragment, according to Skansen, is:
 
 td class=mHidiv class=mHspaxsl:attribute
 
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
 
 
 Must admit that I have not noticed that from the first sight. :)
 But I would try indent=no anyway.
 
 
 And the result is:
 
 td class=mHi
 div class=mHsp
 a href=index.htmlbHome/b/a
 /div
 /td
 
 Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this 
might be a Xalan bug.
 
 Anyway, a span will save the day :)
 
 
 Will it? There should be no difference in behaviour - which means that 
 this is an issue with serializer.
 
 Vadim
 
 
 Best regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
   
 
 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 2:41 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Serializig and LF: Problem
 
 
 Vadim Gritsenko wrote:
 
 
 
 Skansen wrote:
 
   
 
 Hello
 
 When using the XSL stylesheet below cocoon gives the output below.
 
 The problem is that after a td or a tddiv i can't have a LF or CR.
 If there is one i get aditional height in the row. (which is bad)
 
 What i would like to get is:
 
 td
 diva...a//div
 
 Any idea how.
 
 
 1. Put this on one line
 2. http://www.w3.org/TR/xslt#strip
 Use strip-space
   
 
 Another thing to check is that html serializer has indent set to no:
 
 indentno/indent
 
 See
 http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT
 
 Vadim
 
 
 
 
 
 I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla
 1.1 and IE 5.5. With a stylesheet and html.../html around it.
 
 P.S
 Cocoon reverse the attributes on output :)
 
 
 
 It's Xalan or Xerces.
 
 Vadim
 
 
 
   
 
 Jakob
 
 XSL Transformation
 
 ?xml version=1.0?
 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:template match=/
  xsl:apply-templates/
 /xsl:template
 
 xsl:template match=TREE
 div id=header
  !-- Navigation Bar --
  table width=759 cellspacing=0 cellpadding=0  border=0
 height=17 class=sM bgcolor=#336699
trtd width=759 class=mH 
  div class=mHtSP
 table width=455 cellspacing=0 cellpadding=0 border=0
 height=15
 tr
td class=mHidiv class=mHspaxsl:attribute
 
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
 
   xsl:for-each select=NODE
td class=mHidiv class=mHspaxsl:attribute
 name=hrefxsl:textxb-/xsl:textxsl:value-of
 select=TABNAME/xsl:text.html/xsl:text/xsl:attributebxsl:value-of
 select=TABNAME//b/a/div/td
   /xsl:for-each
 /tr
 /table
  /div
/td/tr
  /table
 /div
 /xsl:template
 
 /xsl:stylesheet
 
 
 
 
 - Output from Cocoon
 
 div id=header
 table bgcolor=#336699 class=sM height=17 border=0
 cellpadding=0 cellspacing=0 width=759
 tr
 td class=mH width=759
 div class=mHtSP
 table height=15 border=0 cellpadding=0 cellspacing=0
 width=455
 tr
 td class=mHi
 div class=mHsp
 a href=index.htmlbHome/b/a
 /div
 /td
 /tr
 /table
 /div
 /td
 /tr
 /table
 /div
 
 
 
 
 -
 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]
 


global form-encoding setting

2002-09-26 Thread yuryx

Hi folks!

Is there a way to change default setting for form-encoding parameter? 
Now I have to use param1=xsp-request:parameter name=test 
form-encoding=KOI8-R/ for each parameter. Is there a way to set it 
somewhere in sitemap.xmap or in another place?

-- 

Best regards,
Yury.
--
Yury Mikhienko.
IT engineer, ZAO Mobicom-Kavkaz



-
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 downloading 2.1

2002-09-26 Thread Vadim Gritsenko

Jorge Bello wrote:

Thanks Antonio and Vadim

  

Yes, there is a automatic nightly snapshot of CVS, you can download it


from:
  

http://cvs.apache.org/snapshots/xml-cocoon2/



I guess I have to choose the one with the latest date.
Is that correct ?
  


Yes.  And once it worlking, you want to keep a copy of it - because 
sometimes snapshot can have some feature broken.

Vadim



-
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: global form-encoding setting

2002-09-26 Thread Vadim Gritsenko

yuryx wrote:

 Hi folks!

 Is there a way to change default setting for form-encoding parameter? 
 Now I have to use param1=xsp-request:parameter name=test 
 form-encoding=KOI8-R/ for each parameter. Is there a way to set it 
 somewhere in sitemap.xmap or in another place?



Try SetCharacterEncodingAction.java, add it as the very first step in 
the pipeline. It has to be called before any request.getParameter() 
calls. Example:

map:pipeline
  map:act type=set-encoding
  map:match
  ...
  /map:match
  ...
  /map:act
/map:pipeline


Vadim



-
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: global form-encoding setting

2002-09-26 Thread Alex Romayev

Try:

map:action name=set-character-encoding
src=org.apache.cocoon.acting.SetCharacterEncodingAction/

and

map:act type=set-character-encoding
  map:parameter name=form-encoding value=KOI8-R/
   
/map:act

--- yuryx [EMAIL PROTECTED] wrote:
 Hi folks!
 
 Is there a way to change default setting for
 form-encoding parameter? 
 Now I have to use param1=xsp-request:parameter
 name=test 
 form-encoding=KOI8-R/ for each parameter. Is
 there a way to set it 
 somewhere in sitemap.xmap or in another place?
 
 -- 
 
 Best regards,
 Yury.
 --
 Yury Mikhienko.
 IT engineer, ZAO Mobicom-Kavkaz
 
 
 

-
 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: xsp-session:getxml

2002-09-26 Thread Antonio Gallardo Rivera

Sorry Vadim, but I cannot get the manager. Inside the

XSPSessionHelper.java in org.apache.cocoon.components.markup.xsp

What I am doing wrong?

Antonio

El Jueves, 26 de Septiembre de 2002 06:43, Vadim Gritsenko escribió:
 Antonio Gallardo Rivera wrote:
 Hi folks,
 
 Can someone help me how to do that?
 
 1-You need a component manager in your XSP - I'm not sure, but
I think it's somehow available - I never wrote any XSP...

 this.manager

 2. Lookup a session manager

 manager.lookup(SessionManager.ROLE);

 Don't forget to release when you are done:
 manager.release(sessionManager);

 Vadim

 Inside the XSPSessionHelper we have only the Session, but we need to go to
  the SessionManager, how we can get it?
 
 All this is about to extend the xsp-session with a new tag like
 session:getxml. I need help to finish it. Please help. :)
 
 Thanks in advance,
 
 Antonio Gallardo
 
 El Jueves, 26 de Septiembre de 2002 03:50, Antonio Gallardo Rivera 
escribió:
 I will try to explain how far I am now in the building of the
 xsp-session:getxml for XSP.
 
 As I said I was researching about that, now I can get the values of the
 authentication context.
 
 In XSP we can use:
 Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;
 
 2-Add imports:
 xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionConte
 xt /xsp:include xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
  xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include
 
 3- Logic inside the xsp:page:
 
 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:exp
 r ); DocumentFragment b = a.getXML(/);
 String d = DOMUtil.createText(b);
 /xsp:logic
 
 Only for test I used, and it gets the values I need.
 
 xsp:exprb/xsp:expr
 
 After it returns I saw in the generated HTML that there is only one
 context.
 
 myhandler
 authentication
 ID1/ID
 rolemyrole/role
 data
 usernameMy name/username
 birthday/birthday
 .
 /data
 /authentication
 /myhandler
 
 I am also researching about how to get the authentication context because
 there are two attributes and the name of the handler can be diferent as
 long as I know. Then:
 
 A) adding imports
 xsp:includejava.util.ArrayList/xsp:include
 xsp:includejava.util.HashMap/xsp:include
 
 B) xsp:logic
 
 ArrayList al =
 ((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);
 
 String al0 = ((String)al.get(0));
 String al1 = ((String)al.get(1));oot node, does anyone know how
 HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);
 
 With al. I can make use of the attributesnames of the session, after that
  I can get the names using the variables al0 and al1.
 
 al0 is org.apache.cocoon.webapps.authentication.Handlers
 and
 al1 is org.apache.cocoon.webapps.authentication.SessionContext
 
 About al1 is above a litlle explain that can helps to get directly the
 authentication ID using the Strings:
 
 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:exp
 r ); DocumentFragment b = a.getXML(/myhandler/authentication/ID);
  /xsp:logic
 
 After this, the variable b has the value of /authentication/ID.
 
 About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a
 ArrayList that contains the names of the attributes.
 
 Some examples using
 
 pKey: xsp:exprhs.keySet()/xsp:expr/p
 pValue: xsp:exprhs.values()/xsp:expr/p
 pAttribute: xsp:exprhs.values()/xsp:expr/p
 
 But I cannot take the Session Context. I was thinking in a get how to get
 away the context and just write a tag like:
 
 xsp-session:getxml path=/myhandler/authentication/
 
 Another question: Can we add this new function to the already xsp-session
 logicsheet?
 
 Comments are welcome :)
 
 Antonio Gallardo

 -
 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: About building Cocoon 2.1 CVS

2002-09-26 Thread Antonio Gallardo Rivera

It works!

I am aware what will happen in the next update. After updating the CVS I dont 
make a clean. I make better a installwar directly. Maybe this is why I got 
the problem.

Antonio Gallardo

El Jueves, 26 de Septiembre de 2002 07:35, Vadim Gritsenko escribió:
 Antonio Gallardo Rivera wrote:
 I am asking because in the subdirectories are as long as this string:
 
 /home/agallardo/prueba/cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/
 lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-IN
 F/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-
 INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WE
 B-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/
 WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webap
 p/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib/webapp/WEB-INF/lib

 Fixed (in CVS); try again.

 Vadim

 El Jueves, 26 de Septiembre de 2002 03:15, Antonio Gallardo Rivera 
escribió:
 Why in the directory:
 
 cocoon-2.1/xml-cocoon2/build/cocoon/webapp/WEB-INF/lib/
 
 Its a subdirectory: webapp that has many subdirectories recursively.
 
 Is this correct? And why?
 
 Regards,
 
 Antonio Gallardo

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




strange error message

2002-09-26 Thread kyle koss

I keep getting this error from cocoon, whenever I use the svg2png
serializer. I checked the archives for this, and found a few people with
similar errors, but it seems none of them had a reply. The error only
appears in the logs, and does not seem to cause any problems, but it is
a little worrisome, as I would like it to not generate any errors at
all.

Here is the error:
ERROR   (2002-09-25) 16:46.34:030   [access] (Unknown-URI)
Unknown-thread/CocoonServlet: Cocoon servlet threw an Exception while
trying to close stream.
java.io.IOException: Cannot flush a closed output stream
at
org.apache.catalina.connector.ResponseStream.flush(ResponseStream.java:2
41)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
ava:1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
1125)
at java.lang.Thread.run(Thread.java:536)

My environment:
Apache Tomcat 4.0.4
Cocoon 2.0.3
Jdk1.4.0_02
Mandrake Linux 8.2

Please help, thanx,
Kyle



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




xsp:logic how to ???

2002-09-26 Thread Jessica Niewint

Hi, it's me again ... could some one give me a hint how to use xsp:logic 
in the right way ?

I have to generate a document structure like this:
document
  section A
 chapter 1
 chapter 2
  section B
 chapter 3

  My problem is to combine the logic with my esql tags.

xsp:page laguage=java xmlns:xsp=http://apache.org/xsp; 
xmlns:esql=http://apache.org/cocoon/SQL/v2;
Document xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:noNamespaceSchemaLocation=schema.xsd 
xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp=http://apache.org/xsp;
esql:connection
esql:poolxmldb/esql:pool
 Document
esql:execute-query
esql:queryselect * from document/esql:query
esql:results
esql:row-results
DocObjesql:get-string 
column=DocObject//DocObj
DocTitleesql:get-string 
column=DocTitle//DocTitle
DocVeresql:get-string 
column=DocVersion//DocVer
DocAuthesql:get-string 
column=DocAuthor//DocAuth
DocDateesql:get-date 
column=DocData//DocDate
/esql:row-results
/esql:results
/esql:execute-query
Section
esql:execute-query
esql:queryselect * from section where DocID 
1/esql:query
  // Here I have to make an output first for the section A and all its 
chapters and after that I have to realize an output of the section B and 
all its chapters ...
   how can I realize it ?
xsp:logic
  for (int x=0; x =esql:row-results; x++){
esql:results
esql:row-results
SecTitleesql:get-string 
column=SecTitle//SecTitle
SecContentesql:get-string 
column=SecContent//SecContent
/esql:row-results
/esql:results
/esql:execute-query

Chapter
esql:execute-query
esql:queryselect * from chapter 
where Chapter= nr  AND 
Section=A/esql:query

   xsp:logic
  for (int y=0; 
y=esql:row-results; y++){
   esql:results
esql:row-results

ChapTitleesql:get-string column=ChapTitle//ChapTitle

ChapContentesql:get-string column=ChapContent//ChapContent
/esql:row-results
/esql:results
  }
 /xsp:logic
/esql:execute-query
}
   /xsp:logic
   /Chatpter
/Section
   /sql:connection
   /Document

Is it possible to use esql or better to write everything in Java? I am 
really new to all this stuff ... sorry if I mix up everything ...
J.


-
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: Serializig and LF: Problem

2002-09-26 Thread Skansen

Thanks :)

The tip on indent dit it but it should be put in the HTML serializer as 
indent1/indent

Still got a one loose end were do it put  http://www.w3.org/TR/xslt#strip;?


Regards


 Jakob


P.S
sitemap.xmp Before indent1/indent was added to the serializer.

--- Transformer ---
  map:transformers default=xslt
   map:transformer name=xslt  
src=org.apache.cocoon.transformation.TraxTransformer
use-request-parametersfalse/use-request-parameters
use-browser-capabilities-dbfalse/use-browser-capabilities-db
   /map:transformer
  /map:transformers

--- Serializer ---
map:serializer name=html   mime-type=text/html
src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
   /map:serializer

--- Resource ---
map:resource name=skinit
 map:transform src=stylesheets/html/{type}.xsl
  map:parameter name=resource value={resource}/
 /map:transform
 map:serialize/
/map:resource

--- part of Pipline ---

map:match pattern=nav-*.xml
map:generate src=xdocs/{1}.xml/
 map:call resource=skinit
  map:parameter name=resource value={1}/
  map:parameter name=type value=tree2menu/
 /map:call
/map:match





- Original Message - 
From: Luca Morandini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 3:44 PM
Subject: RE: Serializig and LF: Problem


 snip
  Must admit that I have not noticed that from the first sight. :)
 /snip
 
 Vadim, you corrected me many times, let me return the favour once in a while ;)
 
 snip
  But I would try indent=no anyway.
 /snip
 
 I tried that to no avail (it was my first thought, too).
 
 snip
  Anyway, a span will save the day :)
  
  
  Will it? There should be no difference in behaviour - which means that 
  this is an issue with serializer.
 /snip
 
 I guess it will, since span does't break HTML text as div does... though it is 
included in a td... hmmm... don't really know.
 
 Anyway, the behaviour of Xalan (or the Serializer) begs further investigations.
 
 Best regards,
 
 - 
Luca Morandini 
GIS Consultant 
   [EMAIL PROTECTED] 
 http://utenti.tripod.it/lmorandini/index.html 
 -
  
 
  -Original Message-
  From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 26, 2002 3:29 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Serializig and LF: Problem
  
  
  Luca Morandini wrote:
  
  Vadim,
  
  I think the problem is not related to indentation, since the HTML output appears 
to have no indentation; moreover, I presume
  strip-space will be of no use, since there are no spaces to strip in the input 
elements.
  
  Look, the XSL fragment, according to Skansen, is:
  
  td class=mHidiv class=mHspaxsl:attribute
  
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
  
  
  Must admit that I have not noticed that from the first sight. :)
  But I would try indent=no anyway.
  
  
  And the result is:
  
  td class=mHi
  div class=mHsp
  a href=index.htmlbHome/b/a
  /div
  /td
  
  Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this 
might be a Xalan bug.
  
  Anyway, a span will save the day :)
  
  
  Will it? There should be no difference in behaviour - which means that 
  this is an issue with serializer.
  
  Vadim
  
  
  Best regards,
  
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
  
  

  
  -Original Message-
  From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 26, 2002 2:41 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Serializig and LF: Problem
  
  
  Vadim Gritsenko wrote:
  
  
  
  Skansen wrote:
  

  
  Hello
  
  When using the XSL stylesheet below cocoon gives the output below.
  
  The problem is that after a td or a tddiv i can't have a LF or CR.
  If there is one i get aditional height in the row. (which is bad)
  
  What i would like to get is:
  
  td
  diva...a//div
  
  Any idea how.
  
  
  1. Put this on one line http://www.w3.org/TR/xslt#strip

  2. http://www.w3.org/TR/xslt#strip
  Use strip-space

  
  Another thing to check is that html serializer has indent set to no:
  
  indentno/indent
  
  See
  http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT
  
  Vadim
  
  
  
  
  
  I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla
  1.1 and IE 5.5. With a stylesheet and html.../html around it.
  
  P.S
  Cocoon reverse the attributes on output :)
  
  
  
  It's Xalan or Xerces.
  
  Vadim
  
  
  

  
  Jakob
  
  XSL Transformation
  
  ?xml version=1.0?
  xsl:stylesheet version=1.0
  

sunRise: How do I display failure information to a user when Aut hentication fails

2002-09-26 Thread Ritter, Tony G

Hello all,

 Has anyone successfully implemented a clean solution on passing data
from a failed authentication back to the client.  All of the documentation
refers to the ability to do it but I have not found an example on how to
pick up the context temp informtion in a XML or XSP form.  There is a lot
of references to possibilities but no concrete explanation.  Any help would
be appreciated.  Any ideas ??

Cocoon Version:  2.0.3
 Session Namespace:  http://cocoon.apache.org/session/1.0
Sunshine Namespace:  http://cocoon.apache.org/sunshine/1.0


-SITEMAP snippet: --

  map:match pattern=view/html/ras-login
map:act type=create-session/
map:act type=sunRise-login
   map:parameter name=handler value=ras-handler/
   map:parameter name=parameter_name value=request:name/
   map:parameter name=parameter_password
value=request:password/
   !-- If the authentication is successfull then this redirect will
be performed --
   map:redirect-to uri=ras-portal/
/map:act

!-- authentication failed: --
  map:generate src=authen/loginFailed.xml /
  map:transform type=sunShine /
  map:serialize type=xml /
  /map:match



-   loginFailed.xml   --

?xml version=1.0?
page xmlns:session=http://cocoon.apache.org/session/1.0;
  xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; 

sunshinesunshine:getxml context=temp
path=/authentication/dataempty set/sunshine:getxml/sunshine

/page



-   Form Output   --

?xml version=1.0 encoding=UTF-8 ?
page xmlns:session=http://cocoon.apache.org/session/1.0;
xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; 
sunshine:actionempty set/sunshine:action 
/page


-   Sitemap trace information   --

DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: end invoking auth resource
DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: BEGIN
isValidAuthenticationFragment fragment=[#document-fragment: null]
DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: END
isValidAuthenticationFragment valid=false
INFO(2002-09-26) 11:21.59:206   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: sunRise: Failed authentication
using handler 'ras-handler'
DEBUG   (2002-09-26) 11:21.59:226   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: end authentication
DEBUG   (2002-09-26) 11:21.59:226   [core.sunrise]
(/ras/view/html/ras-login) Thread-10/SunRise: END authenticate
fragment=[#document-fragment: null]
DEBUG   (2002-09-26) 11:21.59:246   [core.event-pipeline]
(/ras/view/html/ras-login) Thread-10/CachingEventPipeline: Caching content
for further requests of 'view/html/ras-login'.
DEBUG   (2002-09-26) 11:21.59:267   [core.sunshine]
(/ras/view/html/ras-login) Thread-10/SunShine: BEGIN setup
objectModel={httpresponse=org.apache.coyote.tomcat4.CoyoteResponseFacade@6e8
f94, response=org.apache.cocoon.environment.http.HttpResponse@143dc4,
notifying-object=org.apache.cocoon.components.notification.SimpleNotifyingBe
an@633d51, context=org.apache.cocoon.environment.http.HttpContext@4eaec9,
request=org.apache.cocoon.environment.http.HttpRequest@3533b8,
httprequest=org.apache.coyote.tomcat4.CoyoteRequestFacade@569c60,
httpservletcontext=org.apache.catalina.core.ApplicationContextFacade@3468f4}
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: BEGIN
processInputFields
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
processInputFields
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
setup
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: BEGIN
streamContextFragment name=temp, path=/authentication/data,
consumerorg.apache.cocoon.sunshine.transformation.SunShineTransformer@4ffc79
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
streamContextFragment streamed=false
DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: BEGIN
streamContextFragment name=sunRise, path=/authentication/data,
consumerorg.apache.cocoon.sunshine.transformation.SunShineTransformer@4ffc79
DEBUG   [core.xslt-processor] (/ras/view/html/ras-login)
Thread-10/XSLTProcessorImpl: XSLTProcessorImpl component initialized.
DEBUG   [core.xslt-processor] (/ras/view/html/ras-login)
Thread-10/XSLTProcessorImpl: XSLTProcessorImpl getTemplates: stylesheet
file:/D:/RASDPD/CD_IMAGE1d0/tomcat/webapps/ras/view/html/error2html.xsl
DEBUG   [core.xslt-processor] (/ras/view/html/ras-login)
Thread-10/XSLTProcessorImpl: Creating new Templates for
file:/D:/RASDPD/CD_IMAGE1d0/tomcat/webapps/ras/view/html/error2html.xsl
DEBUG   [core.xslt-processor] (/ras/view/html/ras-login)
Thread-10/XSLTProcessorImpl: Source =
org.apache.cocoon.components.source.FileSource@6d2380, templatesHandler =

Need help with XMLForm

2002-09-26 Thread Bobby Mitchell

I'm trying to use the logger with my version of WizardAction.java.

I tried to get info by putting the statement: 
getLogger().debug(TESTING: ); in perform(), but I don't get any 
messages in the log files.

How can I use the logger in WizardAction.java?

-- 
Robert J. (Bobby) Mitchell
Systems Administrator
NASA Institute for Advanced Concepts
555A 14th St Atlanta, Ga. 30318
Phone: (404)347-9633 Fax: (404)347-9638




-
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: Serializig and LF: Problem

2002-09-26 Thread Vadim Gritsenko

Skansen wrote:

Thanks :)

The tip on indent dit it but it should be put in the HTML serializer as 
indent1/indent


Good.


Still got a one loose end were do it put  http://www.w3.org/TR/xslt#strip;?


You put it into address line of your favorite browser and read it 
whenever you have time
:)


Vadim


Regards


 Jakob


P.S
sitemap.xmp Before indent1/indent was added to the serializer.

--- Transformer ---
  map:transformers default=xslt
   map:transformer name=xslt  
src=org.apache.cocoon.transformation.TraxTransformer
use-request-parametersfalse/use-request-parameters
use-browser-capabilities-dbfalse/use-browser-capabilities-db
   /map:transformer
  /map:transformers

--- Serializer ---
map:serializer name=html   mime-type=text/html
src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
   /map:serializer

--- Resource ---
map:resource name=skinit
 map:transform src=stylesheets/html/{type}.xsl
  map:parameter name=resource value={resource}/
 /map:transform
 map:serialize/
/map:resource

--- part of Pipline ---

map:match pattern=nav-*.xml
map:generate src=xdocs/{1}.xml/
 map:call resource=skinit
  map:parameter name=resource value={1}/
  map:parameter name=type value=tree2menu/
 /map:call
/map:match





- Original Message - 
From: Luca Morandini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 3:44 PM
Subject: RE: Serializig and LF: Problem


  

snip


Must admit that I have not noticed that from the first sight. :)
  

/snip

Vadim, you corrected me many times, let me return the favour once in a while ;)

snip


But I would try indent=no anyway.
  

/snip

I tried that to no avail (it was my first thought, too).

snip


Anyway, a span will save the day :)



Will it? There should be no difference in behaviour - which means that 
this is an issue with serializer.
  

/snip

I guess it will, since span does't break HTML text as div does... though it is 
included in a td... hmmm... don't really know.

Anyway, the behaviour of Xalan (or the Serializer) begs further investigations.

Best regards,

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



-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Serializig and LF: Problem


Luca Morandini wrote:

  

Vadim,

I think the problem is not related to indentation, since the HTML output appears 
to have no indentation; moreover, I presume
strip-space will be of no use, since there are no spaces to strip in the input 
elements.

Look, the XSL fragment, according to Skansen, is:

td class=mHidiv class=mHspaxsl:attribute
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td



Must admit that I have not noticed that from the first sight. :)
But I would try indent=no anyway.


  

And the result is:

td class=mHi
div class=mHsp
a href=index.htmlbHome/b/a
/div
/td

Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this 
might be a Xalan bug.

Anyway, a span will save the day :)



Will it? There should be no difference in behaviour - which means that 
this is an issue with serializer.

Vadim


  

Best regards,

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


 



-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: Re: Serializig and LF: Problem


Vadim Gritsenko wrote:

   

  

Skansen wrote:

 



Hello

When using the XSL stylesheet below cocoon gives the output below.

The problem is that after a td or a tddiv i can't have a LF or CR.
If there is one i get aditional height in the row. (which is bad)

What i would like to get is:

td
diva...a//div

Any idea how.
   

  

1. Put this on one line http://www.w3.org/TR/xslt#strip



  

2. http://www.w3.org/TR/xslt#strip
Use strip-space
 



Another thing to check is that html serializer has indent set to no:

indentno/indent

See
http://xml.apache.org/xalan-j/apidocs/javax/xml/transform/OutputKeys.html#INDENT

Vadim



   

  

I'm using cocoon from 20020826 on vm1.3 I tried the output in Mozilla
1.1 and IE 5.5. With a stylesheet and html.../html around it.

P.S
Cocoon reverse the attributes on output :)

   

  

It's Xalan or Xerces.

Vadim



 



Jakob

XSL Transformation

?xml version=1.0?

Re: Need help with XMLForm

2002-09-26 Thread Bobby Mitchell

Bobby Mitchell wrote:

 I'm trying to use the logger with my version of WizardAction.java.

 I tried to get info by putting the statement: 
 getLogger().debug(TESTING: ); in perform(), but I don't get any 
 messages in the log files.

 How can I use the logger in WizardAction.java?

Another stupid mistake. I made changes to the wrong file. Sweet.

-- 
Robert J. (Bobby) Mitchell
Systems Administrator
NASA Institute for Advanced Concepts
555A 14th St Atlanta, Ga. 30318
Phone: (404)347-9633 Fax: (404)347-9638





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




How to create db conn in action to use in esql or sql?

2002-09-26 Thread Timothy Larson

I need to create a database connection,
do some security checks,
and set a user role
before I have rights to run queries against the database.

I made an action to do all of the setup, but I do not know how
to make xsp/esql or xsl/sql use the established connection.

Any ideas how to make esql or sql use a previously created
database connection?  Unless there is a trick, I do not think
I can use connection pools for this, because the security
checks and role setting has to be done per user.

If I find a solution, I will share it with the list.

Tim



-
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: AW: FOP In Latest Cocoon Releases

2002-09-26 Thread J.Pietschmann

Skladovs, Victor wrote:
 The question is how could I replace xalan and xerces in cocoon? What
 must I take into account so that the cocoon works stable?

Xalan-2.0.0 has many small but very nasty bugs, don't
use it. Rather, upgrade the FOP jar.

J.Pietschmann


-
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: AW: FOP In Latest Cocoon Releases

2002-09-26 Thread J.Pietschmann

Skladovs, Victor wrote:
 Frank, I don't believe it is a fop bug!
 I had been tested all the variants from the command line and I have
 assessed that it is xalan bug!
 The bug appears ONLY by transforming XML and XSL files.
 While working only with, say, FO documents, everything's works fine, but
 when I tried to transform my xml file with a xml2fo.xsl:
 
fop -xml table.xml -xsl xml2fo.xsl -pdf table.pdf
 
 I've got a bad pdf!

Xalan 2.3.1 still has bugs, in particular it accepts buggy
style sheets. This is not exposed if the transformation
result is serialized but causes trouble if the result is
consumed via SAX events by something else, as it happens
in Cocoon and the FOP command above. Try *upgrading* to
Xalan  2.4, and you'll probably see an error message.

J.Pietschmann


-
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: Serializig and LF: Problem

2002-09-26 Thread Luca Morandini

Skansen,

hold on a second...

The indent tag recognizes only the yes value and the non yes values... I mean, 
whatever you put into it would do the trick (as
long as it is not yes): if you try foo it will work just as well as no or 1.

Why it didn't work before ? Because you forgot to touch the XML source document 
after changing the indent tag, hence, the result
was retrieved from cache: don't worry, I did the same mistake myself :(

Ok, now I think this has been solved for good.

Best regards,

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


 -Original Message-
 From: Skansen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 8:19 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Serializig and LF: Problem


 Thanks :)

 The tip on indent dit it but it should be put in the HTML serializer as 
indent1/indent

 Still got a one loose end were do it put  http://www.w3.org/TR/xslt#strip;?


 Regards


  Jakob


 P.S
 sitemap.xmp Before indent1/indent was added to the serializer.

 --- Transformer ---
   map:transformers default=xslt
map:transformer name=xslt  
src=org.apache.cocoon.transformation.TraxTransformer
 use-request-parametersfalse/use-request-parameters
 use-browser-capabilities-dbfalse/use-browser-capabilities-db
/map:transformer
   /map:transformers

 --- Serializer ---
 map:serializer name=html   mime-type=text/html
src=org.apache.cocoon.serialization.HTMLSerializer
  encodingISO-8859-1/encoding
/map:serializer

 --- Resource ---
 map:resource name=skinit
  map:transform src=stylesheets/html/{type}.xsl
   map:parameter name=resource value={resource}/
  /map:transform
  map:serialize/
 /map:resource

 --- part of Pipline ---

 map:match pattern=nav-*.xml
 map:generate src=xdocs/{1}.xml/
  map:call resource=skinit
   map:parameter name=resource value={1}/
   map:parameter name=type value=tree2menu/
  /map:call
 /map:match





 - Original Message -
 From: Luca Morandini [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 26, 2002 3:44 PM
 Subject: RE: Serializig and LF: Problem


  snip
   Must admit that I have not noticed that from the first sight. :)
  /snip
 
  Vadim, you corrected me many times, let me return the favour once in a while ;)
 
  snip
   But I would try indent=no anyway.
  /snip
 
  I tried that to no avail (it was my first thought, too).
 
  snip
   Anyway, a span will save the day :)
   
  
   Will it? There should be no difference in behaviour - which means that
   this is an issue with serializer.
  /snip
 
  I guess it will, since span does't break HTML text as div does... though it is 
included in a td... hmmm... don't
 really know.
 
  Anyway, the behaviour of Xalan (or the Serializer) begs further investigations.
 
  Best regards,
 
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
 
 
   -Original Message-
   From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, September 26, 2002 3:29 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Serializig and LF: Problem
  
  
   Luca Morandini wrote:
  
   Vadim,
   
   I think the problem is not related to indentation, since the HTML output 
appears to have no indentation; moreover, I presume
   strip-space will be of no use, since there are no spaces to strip in the input 
elements.
   
   Look, the XSL fragment, according to Skansen, is:
   
   td class=mHidiv class=mHspaxsl:attribute
   
name=hrefxsl:textindex.html/xsl:text/xsl:attributebHome/b/a/div/td
   
  
   Must admit that I have not noticed that from the first sight. :)
   But I would try indent=no anyway.
  
  
   And the result is:
   
   td class=mHi
   div class=mHsp
   a href=index.htmlbHome/b/a
   /div
   /td
   
   Which, IMHO, cannot be, given the afore-mentioned XSL fragment: therefore this 
might be a Xalan bug.
   
   Anyway, a span will save the day :)
   
  
   Will it? There should be no difference in behaviour - which means that
   this is an issue with serializer.
  
   Vadim
  
  
   Best regards,
   
   -
  Luca Morandini
  GIS Consultant
 [EMAIL PROTECTED]
   http://utenti.tripod.it/lmorandini/index.html
   -
   
   
   
   
   -Original Message-
   From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, September 26, 2002 2:41 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Serializig and LF: Problem
   
   
   Vadim Gritsenko wrote:
   
   
   
   Skansen wrote:
   
   
   
 

Re: How to create db conn in action to use in esql or sql?

2002-09-26 Thread Vadim Gritsenko

Timothy Larson wrote:

I need to create a database connection,


Why not:

1. Get connection from the pool,
2.

do some security checks,

3.

set a user role


And then,

run queries against the database.


Using ESQL+XSP or SQL transformer.


PS It's really bad idea to create connection per request.

Vadim


I made an action to do all of the setup, but I do not know how
to make xsp/esql or xsl/sql use the established connection.

Any ideas how to make esql or sql use a previously created
database connection?  Unless there is a trick, I do not think
I can use connection pools for this, because the security
checks and role setting has to be done per user.

If I find a solution, I will share it with the list.

Tim
  





-
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: xsp:logic how to ???

2002-09-26 Thread Christopher Painter-Wakefield


I'll take a stab at it...

You don't need java for looping over the rows, that is already done by the
esql logicsheet when you use esql:row-results.  You can mix xsp:logic
and ESQL tags as needed however.  Here's some code (below) that might be
close to what you want to do.  Note I wasn't sure everywhere what you were
trying to do with your queries, and some of them didn't make sense to me,
so I made guesses as to what your database schema looks like and rewrote
the queries accordingly.  Hopefully it will help make some sense of this
for you.  Also note I've used java to get a foreign key (I made up the
column name, but I assume it must exist) from the section table for use in
the chapter table, but ESQL also provides some features that would allow
you to avoid even this little bit of java.  I'm not real familiar with it,
but presumably it is documented in the ESQL documentation.  Anyway, this
shows you that you can easily mix xsp:logic and ESQL tags.

?xml version=1.0 encoding=UTF-8?
xsp:page
  xmlns:xsp=http://apache.org/xsp;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;

  Document
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=schema.xsd
  
!-- Get Document --
esql:connection
  esql:poolxmldb/esql:pool
  esql:execute-query
esql:queryselect * from document where DocID = 1/esql:query
esql:results
  esql:row-results
DocObjesql:get-string column=DocObject//DocObj
DocTitleesql:get-string column=DocTitle//DocTitle
DocVeresql:get-string column=DocVersion//DocVer
DocAuthesql:get-string column=DocAuthor//DocAuth
DocDateesql:get-date column=DocData//DocDate
  /esql:row-results
/esql:results
  /esql:execute-query

  !-- Get Sections --
  esql:execute-query
esql:queryselect * from section where DocID = 1/esql:query
esql:results
  !-- Loop over sections - no xsp:logic needed, this is already a
java loop --
  esql:row-results
Section
  SecTitleesql:get-string column=SecTitle//SecTitle
  SecContentesql:get-string column
=SecContent//SecContent
  xsp:logic
!-- Save your foreign key for the chapter table --
String section = esql:get-string column=SecID/;
  /xsp:logic

  !-- Get Chapters for this Section --
  esql:execute-query
esql:query
  select * from chapter
  where DocID = 1 AND Section=
esql:parameter type=string
  xsp:exprsection/xsp:expr
/esql:parameter
/esql:query
esql:results
  !-- Loop over Chapters --
  esql:row-results
Chapter
  ChapTitleesql:get-string column
=ChapTitle//ChapTitle
  ChapContentesql:get-string column
=ChapContent//ChapContent
/Chapter
  /esql:row-results
/esql:results
  /esql:execute-query

/Section
  /esql:row-results
/esql:results
  /esql:execute-query
/esql:connection
  /Document
/xsp:page




Hi, it's me again ... could some one give me a hint how to use xsp:logic
in the right way ?

I have to generate a document structure like this:
document
  section A
 chapter 1
 chapter 2
  section B
 chapter 3

  My problem is to combine the logic with my esql tags.

xsp:page laguage=java xmlns:xsp=http://apache.org/xsp;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
 Document xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=schema.xsd
xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp=
http://apache.org/xsp;
  esql:connection
   esql:poolxmldb/esql:pool
 Document
 esql:execute-query
esql:queryselect * from document/esql:query
esql:results
 esql:row-results
  DocObjesql:get-string column=DocObject//DocObj
  DocTitleesql:get-string column=DocTitle//DocTitle
  DocVeresql:get-string column=DocVersion//DocVer
  DocAuthesql:get-string column=DocAuthor//DocAuth
  DocDateesql:get-date column=DocData//DocDate
 /esql:row-results
/esql:results
   /esql:execute-query
  Section
esql:execute-query
 esql:queryselect * from section where DocID 1/esql:query
  // Here I have to make an output first for the section A and all its
chapters and after that I have to realize an output of the section B and
all its chapters ...
   how can I realize it ?
xsp:logic
  for (int x=0; x =esql:row-results; x++){
 esql:results
  esql:row-results
   SecTitleesql:get-string column=SecTitle//SecTitle
   SecContentesql:get-string column=SecContent//SecContent
  /esql:row-results
 /esql:results
 

Re: [SUMMARY] Re: Multiple-logicsheets: evaluation probelms withSQL

2002-09-26 Thread Christian Haul

Alan Hodgkinson wrote:
Christian Haul wrote:
 
 snip/
 
Two options: 

a) create the query dynamically. esql expects just a string. Thus you
need to 
 esql:query
xsp:exprselect name from clients where clientid= +
  xsp-request:get-parameter name=clientId/
xsp:expr
 /esql:query
 
 
 This does not work as is, because the conversion to JSP/Java 
 results in a some local definitions, which cannot be simply added 
 to an xsp:expr. I needed to use the XMST variable as described 
 above.

I'm afraid that you lost me here. Your solution adds it to an expression 
as well. So, where's the difference? (BTW: you should really use 
copy-of) Your solution:

 xsp:logic
   String idSelect = select xsl:value-of select=@value-field/
 from xsl:value-of select=@table/ where xsl:value-of
 select=@id-field/  =   + xsl:value-of select=$id-value/ ;
 /xsp:logic
 
 esql:connection
   esql:poolxsl:value-of select=@connection//esql:pool
   esql:execute-query
 esql:query
   xsp:expridSelect/xsp:expr


  
 
b) use a prepared statement
 esql:query
select name from clients where clientid=
  esql:parameterxsp-request:get-parameter
name=clientId//esql:parameter
 /esql:query

Preferable is b).
 
 
 This would work, but requires that my parameter comes from the 
 HTML form parameters. Remember how I call my logicsheet:

Oh no! I've just taken your example and used it. So replace it with

   esql:query
 select name from clients where clientid=
   esql:parameter
 String.valueOf(xsl:copy-of select=./)
   /esql:parameter
  /esql:query

 E.g. I should be free to replace the xsp-request:get-parameter
 with anything and the logic sheet shouldn't have to worry about 
 what it gets. With XSLT this isn't normally a problem. That fact 
 that the parameter, which could be XML nodes instead of text, is 
 placed in to a Java string that is evaluated by the DB server is 
 what causes the problem. In Lisp or Bourne shell you'de use the
 an 'eval' function to guarantee that your parameters are 
 completely resolved. That's not available here.

Indeed, you need to worry about the resulting type. But there's really 
no way around. The XSL is used as macro language and does not know 
anything about the underlying language. XSP is not bound to java, python 
  and javascript are available as well. Java is just more common and 
therefore more logicsheets exist.

In the example above you will always get the string representation. But 
whatever gets placed in the tag as argument must be replaced with an 
expression. If it doesn't, you're lost. But there is no way that I am 
aware of to cater for that case.

Thus it is good practice to write logicsheets in a way that delegates 
the real processing to java classes i.e. beans and have a 2 phase 
processing: 1) prepare 2) evaluate.

Even if you take the esql logicsheet, you have large parts for the 
prepare stage although not only java classes but a lot loops and stuff, 
and you can use any of the esql:get-xxx tags in any expression (evaluate 
stage).

If you are going to write a dbutil logicsheet that looks up a value 
based on the id you will need to follow this pattern:

   dbutil:lookup
 !-- note that arbitrary code may be present anywhere here --
 !-- setup --
 !-- everything is hardcoded ? no need to pass connection name? --
 !-- now evaluate --
 dbutil:get-object oid=something/
   /dbutil:lookup

Oh, yes, you will need to create a way to have a dynamic id:

   dbutil:lookup
 !-- note that arbitrary code may be present anywhere here --
 !-- setup --
 !-- everything is hardcoded ? no need to pass connection name? --
 !-- now evaluate --
 dbutil:get-object
   dbutil:param name=oidxsp:exprsomething/xsp:expr
 /dbutil:get-object
   /dbutil:lookup

For this you may want to look at the logicsheet-utils.xsl that provides 
templates for this.

BTW the above rationale is explained in the Logicsheet Concepts 
chapter http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html

Oh, another thing: SiLLy does not exist.

Chris. Haul

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




Portal Exception in latest Cocoon 2.1?

2002-09-26 Thread Rob Johnston

Hello,

In the most recent Cocoon snapshot (today - 2002-09-26), I noticed a
problem with the portal example... when I enter guest/guest or
cocoon/cocoon to login, I get a:

description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

exception

java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java:243)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
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:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:484)

in the localhost_log file:

2002-09-26 17:35:45 StandardWrapperValve[Cocoon2]: Servlet.service() for servlet 
Cocoon2 threw exception
java.lang.IllegalStateException
   ... etc

However, if I go back and re-enter the portal from the examples screen, it
comes up to the main portal screen as if I had already logged in (so the
authentication was successful).

Is this likely a configuration issue or a problem with the portal?  (this is
a fresh checkout, and a standard './build.sh -Dinclude.webapp.libs=yes
-Dinclude.scratchpad.libs=yes -Dinclude.sample.libs=yes webapp' build.  This
is under tomcat 4.0.4.

Sorry if this is a repeat or smoke, but I can't seem to find any info about
it in the mailing lists.

thanks,
rob 

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




shared session-objects : cocoon/jsp

2002-09-26 Thread Dirk Reiss

Hello all,

our problem is that we would like to get information from a cocoon-application 
whose content is displayed in on frame to some jsp which would be displayed 
in another frame. or first attempt would be to use the session-object to set 
some attributes in it and read them from the jsp (and vice-versa). 

unfortuately this doesn't work as not even the session-ids are equal...

any ideas? some code-examples would be great and very appreciated...

btw: we use cocoon 2.0.2...

many thanks in advance,
dirk



-- 
// Dirk Reiss
// Helmstedter Str. 134
// D - 38102 Braunschweig
// (++49) (0) 531 7996276
// (++49) (0) 162 8925618
// [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: xsp-session:getxml

2002-09-26 Thread Antonio Gallardo Rivera

Please check this function I included into XSPSessionHelper.java in 
src/java/org/apache/cocoon/components/language/markup/xsp:

/** GetXML Fragment from the given session context and path
  *
  *
 * @param session The Session object
 * @param context The Session context tha define where to search
 * @param path The parameter path
 * @param defaultValue Value to substitute in absence of the required 
Fragment
 **/
 public static DocumentFragment getXML(ComponentManager cm, String 
context, String path) throws ProcessingException {

 DocumentFragment df = null;
 SessionManager sm = null;

 try {
 // Start looking up the manager
 sm = (SessionManager)cm.lookup(SessionManager.ROLE);
 // Make our work
 df = sm.getContextFragment(context, path);
 if (sm != null) {
 cm.release(sm);
 }
 } catch (ComponentException ce) {
throw new ProcessingException(Error during lookup of 
SessionManager component., ce);
 }
 // End releasing the sessionmanager
return df;
 }

Soon I will publish here too the changes in the xsp-session.xsl

I takes me 3 days!

Antonio Gallardo.


El Jueves, 26 de Septiembre de 2002 03:50, Antonio Gallardo Rivera escribió:
 I will try to explain how far I am now in the building of the
 xsp-session:getxml for XSP.

 As I said I was researching about that, now I can get the values of the
 authentication context.

 In XSP we can use:
 Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;

 2-Add imports:
 xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionContext
/xsp:include xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
 xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include

 3- Logic inside the xsp:page:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/);
 String d = DOMUtil.createText(b);
 /xsp:logic

 Only for test I used, and it gets the values I need.

 xsp:exprb/xsp:expr

 After it returns I saw in the generated HTML that there is only one
 context.

 myhandler
 authentication
 ID1/ID
 rolemyrole/role
 data
   usernameMy name/username
   birthday/birthday
   .
 /data
 /authentication
 /myhandler

 I am also researching about how to get the authentication context because
 there are two attributes and the name of the handler can be diferent as
 long as I know. Then:

 A) adding imports
 xsp:includejava.util.ArrayList/xsp:include
 xsp:includejava.util.HashMap/xsp:include

 B) xsp:logic

 ArrayList al =
 ((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);

 String al0 = ((String)al.get(0));
 String al1 = ((String)al.get(1));oot node, does anyone know how
 HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);

 With al. I can make use of the attributesnames of the session, after that I
 can get the names using the variables al0 and al1.

 al0 is org.apache.cocoon.webapps.authentication.Handlers
 and
 al1 is org.apache.cocoon.webapps.authentication.SessionContext

 About al1 is above a litlle explain that can helps to get directly the
 authentication ID using the Strings:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/myhandler/authentication/ID);
 /xsp:logic

 After this, the variable b has the value of /authentication/ID.

 About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a
 ArrayList that contains the names of the attributes.

 Some examples using

 pKey: xsp:exprhs.keySet()/xsp:expr/p
 pValue: xsp:exprhs.values()/xsp:expr/p
 pAttribute: xsp:exprhs.values()/xsp:expr/p

 But I cannot take the Session Context. I was thinking in a get how to get
 away the context and just write a tag like:

 xsp-session:getxml path=/myhandler/authentication/

 Another question: Can we add this new function to the already xsp-session
 logicsheet?

 Comments are welcome :)

 Antonio Gallardo








 -
 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: Portal Exception in latest Cocoon 2.1?

2002-09-26 Thread Kenneth J. Hughes

I saw the same thing here today.

At 02:37 PM 9/26/2002 -0700, Rob Johnston [EMAIL PROTECTED] wrote:
Hello,

In the most recent Cocoon snapshot (today - 2002-09-26), I noticed a
problem with the portal example... when I enter guest/guest or
cocoon/cocoon to login, I get a:

description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

exception

java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java:243)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

[...]

Is this likely a configuration issue or a problem with the portal?  (this is
a fresh checkout, and a standard './build.sh -Dinclude.webapp.libs=yes
-Dinclude.scratchpad.libs=yes -Dinclude.sample.libs=yes webapp' build.  This
is under tomcat 4.0.4.

[...]



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




[ANN] Added xf:textarea support to XMLForm

2002-09-26 Thread Ivelin Ivanov


Sample usage added to the Wizard Demo.

Enjoy.

-=Ivelin=-


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




[PRE-SUMMARY] xsp-session:getxml

2002-09-26 Thread Antonio Gallardo Rivera

Finally I can said:

IT WORKS!

Please tell me to whom I need to send my 2 cents (4 days and almost his nights 
of work).

I modified the files:

XSPSessionHelper.java
Session.xsl

And I can said that now it works, again.

Many thanks to Carsten and Gritsenko. They give me tips to get into the 
sources and the architecture inside Cocoon to write this new tag that I am 
sure many people will welcome.

Antonio Gallardo.

El Jueves, 26 de Septiembre de 2002 03:50, Antonio Gallardo Rivera escribió:
 I will try to explain how far I am now in the building of the
 xsp-session:getxml for XSP.

 As I said I was researching about that, now I can get the values of the
 authentication context.

 In XSP we can use:
 Namespace: xmlns:xsp-session=http://apache.org/xsp/session/2.0;

 2-Add imports:
 xsp:includeorg.apache.cocoon.webapps.session.context.SimpleSessionContext
/xsp:include xsp:includeorg.w3c.dom.DocumentFragment/xsp:include
 xsp:includeorg.apache.cocoon.xml.dom.DOMUtil/xsp:include

 3- Logic inside the xsp:page:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/);
 String d = DOMUtil.createText(b);
 /xsp:logic

 Only for test I used, and it gets the values I need.

 xsp:exprb/xsp:expr

 After it returns I saw in the generated HTML that there is only one
 context.

 myhandler
 authentication
 ID1/ID
 rolemyrole/role
 data
   usernameMy name/username
   birthday/birthday
   .
 /data
 /authentication
 /myhandler

 I am also researching about how to get the authentication context because
 there are two attributes and the name of the handler can be diferent as
 long as I know. Then:

 A) adding imports
 xsp:includejava.util.ArrayList/xsp:include
 xsp:includejava.util.HashMap/xsp:include

 B) xsp:logic

 ArrayList al =
 ((ArrayList)xsp:exprxsp-session:get-attribute-names//xsp:expr);

 String al0 = ((String)al.get(0));
 String al1 = ((String)al.get(1));oot node, does anyone know how
 HashMap hs = ((HashMap)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.Handlers//xsp:expr);

 With al. I can make use of the attributesnames of the session, after that I
 can get the names using the variables al0 and al1.

 al0 is org.apache.cocoon.webapps.authentication.Handlers
 and
 al1 is org.apache.cocoon.webapps.authentication.SessionContext

 About al1 is above a litlle explain that can helps to get directly the
 authentication ID using the Strings:

 xsp:logic
 SimpleSessionContext a =
 ((SimpleSessionContext)xsp:exprxsp-session:get-attribute
 name=org.apache.cocoon.webapps.authentication.SessionContext//xsp:expr
); DocumentFragment b = a.getXML(/myhandler/authentication/ID);
 /xsp:logic

 After this, the variable b has the value of /authentication/ID.

 About al0 (org.apache.cocoon.webapps.authentication.Handlers) it is a
 ArrayList that contains the names of the attributes.

 Some examples using

 pKey: xsp:exprhs.keySet()/xsp:expr/p
 pValue: xsp:exprhs.values()/xsp:expr/p
 pAttribute: xsp:exprhs.values()/xsp:expr/p

 But I cannot take the Session Context. I was thinking in a get how to get
 away the context and just write a tag like:

 xsp-session:getxml path=/myhandler/authentication/

 Another question: Can we add this new function to the already xsp-session
 logicsheet?

 Comments are welcome :)

 Antonio Gallardo








 -
 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: shared session-objects : cocoon/jsp

2002-09-26 Thread Vadim Gritsenko

Dirk Reiss wrote:

Hello all,

our problem is that we would like to get information from a cocoon-application 
whose content is displayed in on frame to some jsp which would be displayed 
in another frame. or first attempt would be to use the session-object to set 
some attributes in it and read them from the jsp (and vice-versa). 

unfortuately this doesn't work as not even the session-ids are equal...


...which means that you have two applications deployed but not one. 
Deploy JSPs together with Cocoon in one app, and everything will work.

Vadim


any ideas? some code-examples would be great and very appreciated...

btw: we use cocoon 2.0.2...

many thanks in advance,
dirk
  





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




Plz help with this - error the requested uri /cocoon-dev/xmldb not found

2002-09-26 Thread Chuck Amadi

Hi there , I'm still in the dog house as I can't seem to figure out why 
Cocoon 2 want serve up any Xindice data.

I have started Xindice   run Tomcat 4  I get the Cocoon Welcome page 
 (http://172.**.*.**:/cocoon-dev/status and the others) .
Except when I attempt http://172.**.*.**:/cocoon-dev/xmldb/addressbook/

I get the follwing error the requested uri  /cocoon-dev/xmldb not found

I have tried the match tag in sitemap.xmap ie localhost , ipAddress 
still no joy.
ensured it reads src=xml:xindice:/172.**.*.**:4080/db/ {..1}# {1} / 
 the other map:generate - src=xml:xindice:/172.**.*.**:4080/db/ {1} /

Cheers chuck

-- 
Regards 
Chuck Amadi
ICT Dept Systems Programmer
Rhaglenydd Systemau Adran ICT




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




AW: AW: FOP In Latest Cocoon Releases

2002-09-26 Thread Skladovs, Victor

Dear J.Pietschmann!

What would you suggest in this situation?
How could I improve the Cocoon work as pdf concerns?
Updating fop.jar doesn't help.

Regards,
Viktor

-Ursprungliche Nachricht-
Von: J.Pietschmann [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. September 2002 22:08
An: [EMAIL PROTECTED]
Betreff: Re: AW: FOP In Latest Cocoon Releases


Skladovs, Victor wrote:
 Frank, I don't believe it is a fop bug!
 I had been tested all the variants from the command line and I have
 assessed that it is xalan bug!
 The bug appears ONLY by transforming XML and XSL files.
 While working only with, say, FO documents, everything's works fine,
but
 when I tried to transform my xml file with a xml2fo.xsl:
 
fop -xml table.xml -xsl xml2fo.xsl -pdf table.pdf
 
 I've got a bad pdf!

Xalan 2.3.1 still has bugs, in particular it accepts buggy
style sheets. This is not exposed if the transformation
result is serialized but causes trouble if the result is
consumed via SAX events by something else, as it happens
in Cocoon and the FOP command above. Try *upgrading* to
Xalan  2.4, and you'll probably see an error message.

J.Pietschmann


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




C2 2.0.3 docbook pdf transformation problem

2002-09-26 Thread Gabriele Domenichini

Please tell me if I'm wrong but I think there is something wrong in cocoon 
transformation with Norman Walsh Docbook Stylesheet.
I have tried wiith xalan and it transform perfectly from the commandline but 
When you use the actual version in cocoon it produces wrong xmlfo (it doesn't 
even close the markup!).
I have tried with Saxon and it produces the pdf but without the title of the 
sect1 (sect1/title).
I have done many experiments one of which is to turn incremental processing 
off and it doesn't seem to help.
Has somebody the same problem?
I begin to think that is a matter of cocoon version.
OS: windows NT 4.0 SP5
Tomcat: 4.0.4
cocoon 2.0.3
Xalan 2.4.0 | saxon 6.5.2



-
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: sunRise: How do I display failure information to a user when Aut hentication fails

2002-09-26 Thread Carsten Ziegeler

Hi,

if you use 2.0.x the information is not stored in the temporary context
but in a request attribute named
org.apache.cocoon.sunshine.sunrise.LoginFailedFor
appended by the handler name.

This changed for the real version in C2.1, where the information
is stored in the temporary context.

HTH
Carsten

 -Original Message-
 From: Ritter, Tony G [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 8:28 PM
 To: '[EMAIL PROTECTED]'
 Subject: sunRise: How do I display failure information to a user when
 Aut hentication fails


 Hello all,

  Has anyone successfully implemented a clean solution on passing data
 from a failed authentication back to the client.  All of the documentation
 refers to the ability to do it but I have not found an example on how to
 pick up the context temp informtion in a XML or XSP form.
 There is a lot
 of references to possibilities but no concrete explanation.  Any
 help would
 be appreciated.  Any ideas ??

 Cocoon Version:  2.0.3
  Session Namespace:  http://cocoon.apache.org/session/1.0
 Sunshine Namespace:  http://cocoon.apache.org/sunshine/1.0


 -SITEMAP snippet: --

   map:match pattern=view/html/ras-login
 map:act type=create-session/
 map:act type=sunRise-login
map:parameter name=handler value=ras-handler/
map:parameter name=parameter_name value=request:name/
map:parameter name=parameter_password
 value=request:password/
!-- If the authentication is successfull then this
 redirect will
 be performed --
map:redirect-to uri=ras-portal/
 /map:act

 !-- authentication failed: --
   map:generate src=authen/loginFailed.xml /
   map:transform type=sunShine /
   map:serialize type=xml /
   /map:match



 -   loginFailed.xml   --

 ?xml version=1.0?
 page xmlns:session=http://cocoon.apache.org/session/1.0;
   xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0; 

 sunshinesunshine:getxml context=temp
 path=/authentication/dataempty set/sunshine:getxml/sunshine

 /page



 -   Form Output   --

 ?xml version=1.0 encoding=UTF-8 ?
 page xmlns:session=http://cocoon.apache.org/session/1.0;
 xmlns:sunshine=http://cocoon.apache.org/sunshine/1.0;
 sunshine:actionempty set/sunshine:action
 /page


 -   Sitemap trace information   --

 DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: end invoking auth resource
 DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: BEGIN
 isValidAuthenticationFragment fragment=[#document-fragment: null]
 DEBUG   (2002-09-26) 11:21.59:206   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: END
 isValidAuthenticationFragment valid=false
 INFO(2002-09-26) 11:21.59:206   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: sunRise: Failed
 authentication
 using handler 'ras-handler'
 DEBUG   (2002-09-26) 11:21.59:226   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: end authentication
 DEBUG   (2002-09-26) 11:21.59:226   [core.sunrise]
 (/ras/view/html/ras-login) Thread-10/SunRise: END authenticate
 fragment=[#document-fragment: null]
 DEBUG   (2002-09-26) 11:21.59:246   [core.event-pipeline]
 (/ras/view/html/ras-login) Thread-10/CachingEventPipeline: Caching content
 for further requests of 'view/html/ras-login'.
 DEBUG   (2002-09-26) 11:21.59:267   [core.sunshine]
 (/ras/view/html/ras-login) Thread-10/SunShine: BEGIN setup
 objectModel={httpresponse=org.apache.coyote.tomcat4.CoyoteResponse
 Facade@6e8
 f94, response=org.apache.cocoon.environment.http.HttpResponse@143dc4,
 notifying-object=org.apache.cocoon.components.notification.SimpleN
 otifyingBe
 an@633d51, context=org.apache.cocoon.environment.http.HttpContext@4eaec9,
 request=org.apache.cocoon.environment.http.HttpRequest@3533b8,
 httprequest=org.apache.coyote.tomcat4.CoyoteRequestFacade@569c60,
 httpservletcontext=org.apache.catalina.core.ApplicationContextFaca
 de@3468f4}
 DEBUG   [core.sunshine] (/ras/view/html/ras-login)
 Thread-10/SunShine: BEGIN
 processInputFields
 DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
 processInputFields
 DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
 setup
 DEBUG   [core.sunshine] (/ras/view/html/ras-login)
 Thread-10/SunShine: BEGIN
 streamContextFragment name=temp, path=/authentication/data,
 consumerorg.apache.cocoon.sunshine.transformation.SunShineTransfor
 mer@4ffc79
 DEBUG   [core.sunshine] (/ras/view/html/ras-login) Thread-10/SunShine: END
 streamContextFragment streamed=false
 DEBUG   [core.sunshine] (/ras/view/html/ras-login)
 Thread-10/SunShine: BEGIN
 streamContextFragment name=sunRise, path=/authentication/data,
 consumerorg.apache.cocoon.sunshine.transformation.SunShineTransfor
 mer@4ffc79
 DEBUG   [core.xslt-processor] (/ras/view/html/ras-login)