RE: how to implement a dynamic sitemap?

2001-10-25 Thread Liam Morley









Like many have said, actions work. Also,
I usually do the processing in the XSL, so when dealing with "what request
gets what what XSL", it's possible to have ALL
requests go to the SAME xsl. Of course it depends on
your demands.

 

Liam Morley

 

-Original Message-
From: Christer Lindh
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 24, 2001
6:03 PM
To: [EMAIL PROTECTED]
Subject: how to implement a
dynamic sitemap?

 



As far as I've understood C2, there
is now a quite static sitemap which tells what request gets what XSL. This
is too static for my needs, I would like to do a bunch of
calculations and then decide on what XSL to use. Is there any way I can accomplish
this with C2?





 





I have my own producer today with
Cocoon 1 which creates Documents from data in my database, and these are
then assigned an XSL depending on a bunch of parameters (from the database and
user environment as well), ie I add PI:s to the Document DOM dynamically.





 





So - is it possible to use
"classic" cocoon1.8 processing instructions with cocoon2, instead of
specifying processing stages in the sitemap?





 





If not, can I do my own implement of
the Sitemap interfaces and get C2 to use those instead?  My classes would
act just like a sitemap (as the interfaces are the same) but get it's daata
from database instead of a XML file in the filesystem.





 





 





 










Re: AW: Help! How can I call my xsp page from HTML document?

2001-10-25 Thread Jeremy Aston
 Victor,
Thats correct.  The documentation (in the FAQ) and cTwIG both say how you can get C2 requests served via an apache-tomcat-cocoon route.  The documentation adds some stuff about how to do things like http://locahost/myc2app etc although there have been a number of questions about this on the list recently - perhaps an addition to cTwIG is needed!
One point is that if you go the whole hog and move your app to something like d:\myc2app you need to have a sitemap file in that folder.  This seems to be the big thing that people forget especially when starting out since they tend to alter the main c2 sitemap.  Of course it may just be that I can't configure my own site map properly but that's the way I had to do it to get it to work.
Jez
  "Skladov, Victor" <[EMAIL PROTECTED]> wrote: 
Hi Jeremy!Thanks for the suggestion.I've done so and it runs although there's a modul mod_jk under Apachethat can take this task (I mean communication between Apache and Tomcat)and I'm going to test it.Thanks one more time!Regards,Viktor-Ursprüngliche Nachricht-Von: Jeremy Aston [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 24. Oktober 2001 18:27An: [EMAIL PROTECTED]Betreff: Re: Help! How can I call my xsp page from HTML document?Hi Victor, Do you mean something like the following anchor tag in your html page? call xsp Or is it something else? Regards Jeremy "Skladov, Victor" <[EMAIL PROTECTED]>wrote: Hi, people!My Apache Server runs on port 8080, Cocoon2 on port 8091. How can Icall my xsp page from a HTML document?Must Apache and Cocoon have one root?Regards,Viktor-Please check that your question has not already been answered in theFAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: _ Nokia Game is on again. Click here to join the new all mediaadventure before November 3rd. Nokia Game is on again.  Click here  to join the new all media adventure before November 3rd. 


Struts And Cocoon

2001-10-25 Thread Harden ZHU

Hi,

I am new to cocoon. Is there possible to intergate cocoon and strust
together?

thanks

Harden


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

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




C2 and mysql

2001-10-25 Thread Olivier MOUGEL



Hi all,
I'm using mysql with php without great problem but 
I want to investigate the power of XML et Cocoon.
My problem is that my data is stored under an DBMS 
!!!
 
I want to get a connection between cocoon and mysql 
using xsp.
Is somebody using this to explain in few steps what 
I have to configure.
 
Sorry for the newbie's questions but the using 
database part in C2 doc is very short and it don't explain very well 
the problem with mysql
 
Thank's for all
I'm sure it will be interesting for others cocoon 
users
 
Olivier 
from Bordeaux - France
 


SQLException - please help

2001-10-25 Thread chris yeung



 
I am a new user to Cocoon 2.0.
Here are what I have:
-
Cocoon-2.0rc1a
Tomcat-4.0.1
jdk1.3.1
Windows 2000 Professional

 
- I have installed Cocoon perfectly including 
hsql
- Starting http://localhost:8080/cocoon and I can 
run all examples without problems
- I added a couple of employees/companies under 
"Sample Forms", it
  worked perfect as well
- now if I shutdown tomcat, restart, I've got the 
following errors in the DOS window

Starting service Tomcat-StandaloneApache 
Tomcat/4.0.1Starting service Tomcat-ApacheApache 
Tomcat/4.0.1Server.run/init: java.sql.SQLException: File input/output error: 
C:\tg\jakarta-tomcat-4.0.1\webapps\cocoon\WEB-INF\db\cocoondb.backupjava.sql.SQLException: 
File input/output error: 
C:\tg\jakarta-tomcat-4.0.1\webapps\cocoon\WEB-INF\db\cocoondb.backup    
at 
org.hsqldb.Trace.getError(Trace.java:180)    
at 
org.hsqldb.Trace.getError(Trace.java:144)    
at 
org.hsqldb.Trace.error(Trace.java:205)    
at 
org.hsqldb.Log.restoreBackup(Log.java:731)    
at 
org.hsqldb.Log.open(Log.java:212)    
at 
org.hsqldb.Database.(Database.java:96)    
at 
org.hsqldb.Server.run(Server.java:137)    
at 
org.hsqldb.Server.main(Server.java:78)    
at 
org.apache.cocoon.components.hsqldb.ServerImpl.run(ServerImpl.java:102)    
at java.lang.Thread.run(Thread.java:484)Loading catalog: 
/path/to/local/catalogLoading catalog: 
c:\tg\jakarta-tomcat-4.0.1\webapps\cocoon\resources\entities\catalog

 
I've taken a look at the "cocoondb.backup" 
file and I don't see any unusual.
 
Please advise and many thanks.
 
Chris Yeung
XML Asia Ltd.


[c2]hooking a generator to transformer pipeline?

2001-10-25 Thread Bob Phillips

I'm making a generator extending ComposerGenerator that parses a text file
and emits sax events using a contentHandler driven
by a custom parser.

The generator spits the xml ok, but dies when I add a
 stage to the pipeline, saying
problem in getTransformer - error in creating Transform Handler

I've clearly failed to setup the transformer but am not
sure how to specify the transformer from my generator.

Any advice would be appreciated.

regards
bob phillps


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

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




[C2] using HTML "nowrap" in a

2001-10-25 Thread Mark S. Kent

This is weird.

I just tried putting a "nowrap" param to my  tag in my XSL file like
this:
  

to prevent the table cell in HTML from wrapping and got this error on the
screen:
  Error creating the resource
Failed to execute pipeline.

and in the log:
   org.xml.sax.SAXParseException: Attribute name "td" must be followed by
the '=' character.

I was able to get "around" this by changing my tag to this:
  

While obviously not valid HTML, the browser still takes it (IE anyway --
haven't tested with NetScrape)

Comments?
-Mark


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

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




Re: Help needed Passing Parameters

2001-10-25 Thread Christian Schmitt

Phil,
I would change your XSP to this:
http://apache.org/xsp";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
   xmlns:xsp-response="http://apache.org/xsp/response/2.0";>
 
 String person = null;
 

The favorite colour page - Yay"

person = ;
 
 person has a favorite colour! It is 
person



And then in your stylesheet do this:








This is untested (of course ;-)


Hth,
Christian



On Thu, Oct 25, 2001 at 09:57:26AM +1000, Phil Blake wrote:
> I am missing something when it comes to getting and passing request 
> arguments. I've looked at the cocoon examples, and although my test 
> example appears to match the cocoon one in every way there is obviously 
> something fundamental missing.
> 
> I think I'm pretty close. :) If anyone could help me get past this 
> misunderstanding it would be much appreciated.
> 
> My example scenario allows the user to enter a URL like the following: 
> http://hostname/example/colour.html?person=Phil%20Blake
> The result would be a HTML page with the person's favorite colour.
> 
> In the sitemap I added a generic matcher that matches anything .html and 
> returns the corresponding xsp. I figured (as opposed to read anywhere in 
> documentation) that I needed to include the use-request-parameters and 
> use-browser-capabilities-db parameters - I don't know why I want them, 
> just that they appeared in the cocoon sitemap.
>   
>   
>   
>   
>   name="use-request-parameters" value="true"/>
>   name="use-browser-capabilities-db" value="true"/>
>   
>   
>   
> 
> The requested xsp page looks like this. (colour.xsp)
> language="java"
>xmlns:xsp="http://apache.org/xsp";
>xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>xmlns:xsp-response="http://apache.org/xsp/response/2.0";>
>  
>  String person = null;
>  
>   
>   The favorite colour page - Yay"
>   
>   person = ;
>
>person has a favorite colour! It is 
> 
>   
> 
> 
> I then have a half/broken stylesheet that is supposed to select the 
> person named in the URL person path arg. Then return their favorite 
> colour. However, as you'll notice, I can't see how to get from the first 
> line, to the second one. I assume the variable selectedPerson contains a 
> person node. (I don't know 'cause I can't make it work).
> However, I have no idea how to use that variable to retrieve the colour.
> XSL Stylesheet:
> 
>   
>select="document('people.xml',.)/people/person[name='$person']"/>
>   
>   
> 
> 
> 
> 
> XML External Content (people.xml)
> 
>   
>   Phil
>   blue
>   
>   
>   Arthur
>   yellow
>   
> 
> 
> 
> Thanks for your help. Have fun,
> 
> Phil
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




SQL-Statment with two (or more) "where" statments

2001-10-25 Thread Schroeter Christian

Hi,

i use cocoon1.8.2. Now i have a little problem:

i want to query my db like this:


...

...
  SELECT
   a.name
FROM
   a, b
WHERE
b.fk2 = a.pk
AND 
b.fk1 =  
 
...



But i get the errormessage:

Error executed prepared statement: SELECT a.name FROM a, b WHERE b.fk2 = a.pk 
AND b.fk1 = ?

When i only use one where statment it works, but with 2 it wount

What must i change ?


cu
Christian

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

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




RE: C2: esql:if-null

2001-10-25 Thread Mark S. Kent

Well, to reply to my own message, I didn't find any mention of additional
"is-null" commands like "is-null-true" or "is-null-false" in the esql.xsl
page, but I was able to get my code to use the "is-null" returned Java
boolean value in an  block to determine whether I should concat
the LocationNumber to LocationName if the LocationNumber was not null and
was not "blank".


  String locNbr = "";
  if( !() && !.equals( "" ) )
  {
   locNbr = " #" + ;


locNbr

Are there any plans to add the "is-null-true" or "is-null-false" commands?
(actually the previous message in the archives described them as
"when-null-true" and "when-null-false" [ref:
http://www2.real-time.com/pipermail/cocoon-devel/2001-May/007585.html]

Just curious... I suppose I could add them to the esql.xsl myself, but I'm
leery of adding a "hack" that will get overwritten with a later version of a
Cocoon install.

Mark

-Original Message-
From: Mark S. Kent [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 2:29 PM
To: [EMAIL PROTECTED]
Subject: C2: esql:if-null




Has anyone used this yet?  What is the exact syntax for the esql statement?
The ESQL Taglib page is rather sparse explaining it and the only message in
the archives was suggestions on how to implement it.

I have a Location name/nbr string that I want to create like this:
"{LocationName} #{LocationNumber}"
but sometimes the number is "null" so I want to just see this instead:
"{LocationName}"

TIA!
Mark

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

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


Re: how to implement a dynamic sitemap?

2001-10-25 Thread Sergio Carvalho

Christer Lindh wrote:

> As far as I've understood C2, there is now a quite static sitemap 
> which tells what request gets what XSL. This is too static for my 
> needs, I would like to do a bunch of calculations and then decide on 
> what XSL to use. Is there any way I can accomplish this with C2?
>
One possible way is to use an action to define a sitemap variable with 
the name of the chose stylesheet.
Your mathcer would then look like:
 
   
   ...



>  
>
> I have my own producer today with Cocoon 1 which creates Documents 
> from data in my database, and these are then assigned an XSL depending 
> on a bunch of parameters (from the database and user environment as 
> well), ie I add PI:s to the Document DOM dynamically.
>
>  
>
> So - is it possible to use "classic" cocoon1.8 processing instructions 
> with cocoon2, instead of specifying processing stages in the sitemap?
>
>  
>
> If not, can I do my own implement of the Sitemap interfaces and get C2 
> to use those instead?  My classes would act just like a sitemap (as 
> the interfaces are the same) but get it's daata from database instead 
> of a XML file in the filesystem.
>
>  
>
>  
>
>  
>




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

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




[C2] internal server error HELP!!!

2001-10-25 Thread sergi

i just added my action in cocoon, build it again, and restart server... and
got this message:

org.apache.cocoon.ProcessingException: Exception in
Handler:org.apache.avalon.framework.component.ComponentException: Could not
set up Component for hint: org\apache\cocoon\www\sitemap_xmap


i added action in sitemap, and after that, i used that action in my
sub-sitemap...

now i backupped my last version that works :( but i got same error message

what did i forget?


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

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




Delay in mailing list ???

2001-10-25 Thread Lajos Moczar

Hi folks,

I'm getting up to a 7-hour delay in receiving posts to this list. Is it 
just me or is everyone having problems?

Regards,

Lajos


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

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




RE: date-format in cocoon 1.8.2

2001-10-25 Thread Mark S. Kent

I was mistaken... the  and  do work (in C2) to
return a "empty" value if the date or time is null.  I found that my error I
was getting was because the column name I was referencing was not in my ESQL
query (DOH!).  Sorry about that.

Mark

-Original Message-
From: Faulkner, Perry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 4:55 PM
To: '[EMAIL PROTECTED]'
Subject: RE: date-format in cocoon 1.8.2


Hi Christian,

These comments apply to Cocoon 2, but the generated java code checks for a
null value and returns "", otherwise it uses the SimpleDateFormat to convert
the date. You might look at your generated code to see if it is doing the
same thing. Maybe this was added for Cocoon 2. Anyway, if it isn't doing the
right thing, you can get hold of the stuff from 2 and put that into your
code, either add it to your esql.xsl or simply use  in your xsp
file, within your  to fetch the date, test for null and
format, as required, just like the Cocoon 2 code! Look at the esql.xsl and
there should be some esql samples that do this sort of thing.

HTH, regards

  Perry

-Original Message-
From: Schroeter Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 24 October 2001 23:35
To: [EMAIL PROTECTED]
Subject: Re: date-format in cocoon 1.8.2


Now if the value in the db is null then i get an error-message.

Without the format - attribute i wouldnt get it.

What must i change, and how?

cu,
Christian

Am Dienstag, 23. Oktober 2001 19:01 schrieben Sie:
> Specify the format attribute using a Java SimpleDateFormat string.  For
> instance,
> 
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  date-format in cocoon 1.8.2
>
>
> Hi,
>
> what must i do to change the format of the date i get with
> 
>
> i am using cocoon1.8.2
>
> cu,
> christian
>
>
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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

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

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


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

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




Re: Help needed Passing Parameters

2001-10-25 Thread Martin Man

hi,
your example is not going to work at all, ..., i suggest you to take a
look at java source code generated from xsp page, this code is located
somewhere in tomcat/work/localhost*/cocoon/org/apache/www/...your_xsp.java, 

you'll find there that element  and Java variable person are
cmpletely unrelated, you might try in xsp something like





this way the XML output generated by XSP page will contain somewhere the
element

 // or whatever your request parameter was

then you can match in your XSL the element person-colour and use its attribute
@person to take a value from external xml file, ...


cheers,
martin

On Thu, Oct 25, 2001 at 09:57:26AM +1000, Phil Blake wrote:
> I am missing something when it comes to getting and passing request 
> arguments. I've looked at the cocoon examples, and although my test 
> example appears to match the cocoon one in every way there is obviously 
> something fundamental missing.
> 
> I think I'm pretty close. :) If anyone could help me get past this 
> misunderstanding it would be much appreciated.
> 
> My example scenario allows the user to enter a URL like the following: 
> http://hostname/example/colour.html?person=Phil%20Blake
> The result would be a HTML page with the person's favorite colour.
> 
> In the sitemap I added a generic matcher that matches anything .html and 
> returns the corresponding xsp. I figured (as opposed to read anywhere in 
> documentation) that I needed to include the use-request-parameters and 
> use-browser-capabilities-db parameters - I don't know why I want them, 
> just that they appeared in the cocoon sitemap.
>   
>   
>   
>   
>  name="use-request-parameters" value="true"/>
>  name="use-browser-capabilities-db" value="true"/>
>   
>   
>   
> 
> The requested xsp page looks like this. (colour.xsp)
>language="java"
>   xmlns:xsp="http://apache.org/xsp";
>   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>   xmlns:xsp-response="http://apache.org/xsp/response/2.0";>
> 
> String person = null;
> 
>   
>   The favorite colour page - Yay"
>   
>   person = ;
>
>person has a favorite colour! It is 
> 
>   
> 
> 
> I then have a half/broken stylesheet that is supposed to select the 
> person named in the URL person path arg. Then return their favorite 
> colour. However, as you'll notice, I can't see how to get from the first 
> line, to the second one. I assume the variable selectedPerson contains a 
> person node. (I don't know 'cause I can't make it work).
> However, I have no idea how to use that variable to retrieve the colour.
> XSL Stylesheet:
> 
>   
>select="document('people.xml',.)/people/person[name='$person']"/>
>   
>   
> 
> 
> 
> 
> XML External Content (people.xml)
> 
>   
>   Phil
>   blue
>   
>   
>   Arthur
>   yellow
>   
> 
> 
> 
> Thanks for your help. Have fun,
> 
> Phil
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 

-- 
2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223
http://mman.dyndns.org/mman.gpg

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

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




Re: Cocoon2 Release Candidate?

2001-10-25 Thread Lajos Moczar

Brent,

In my experience, anything over and including 2.0rc1a works better with 
JDK 1.3.0/1. I don't know what your exceptions are, but I run Cocoon2 
rc1a with Jdk 1.3 in production on several different OSs without problems.

Lajos
galatea.com


Brent L Johnson wrote:

> I've been using Cocoon 1.8.2 in a production/live environment - and had some
> problems with some strange exceptions being thrown when using a FreeBSD
> virtual machine with JDK1.2.2.
> 
> Is Cocoon2 RC1a ready for production use?  I realize RC is a "Release
> Candidate" - but would it be beneficial (and would it cause any problems)
> switching over to Cocoon2 instead, to see if it fixes my problems?
> 
> Thanks,
> 
> - Brent
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 



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

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




RE: Help needed Passing Parameters

2001-10-25 Thread Valdas Rapsevicius

sorry, but can't help You.
This trick with




didn't work for me too.
You took to selectedPerson just a value of
document('people.xml',.)/people/person[name='$person'] node, but not entire
node...

As I noticed nobody succeded in passing a node as variable or param.
If somebody did - please tell us how?

Good luck,
Valdo
---
mailto:[EMAIL PROTECTED]


-Original Message-
From: Phil Blake [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 1:57 AM
To: [EMAIL PROTECTED]
Subject: Help needed Passing Parameters


I am missing something when it comes to getting and passing request
arguments. I've looked at the cocoon examples, and although my test
example appears to match the cocoon one in every way there is obviously
something fundamental missing.

I think I'm pretty close. :) If anyone could help me get past this
misunderstanding it would be much appreciated.

My example scenario allows the user to enter a URL like the following:
http://hostname/example/colour.html?person=Phil%20Blake
The result would be a HTML page with the person's favorite colour.

In the sitemap I added a generic matcher that matches anything .html and
returns the corresponding xsp. I figured (as opposed to read anywhere in
documentation) that I needed to include the use-request-parameters and
use-browser-capabilities-db parameters - I don't know why I want them,
just that they appeared in the cocoon sitemap.




 
 




The requested xsp page looks like this. (colour.xsp)
http://apache.org/xsp";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
   xmlns:xsp-response="http://apache.org/xsp/response/2.0";>
 
 String person = null;
 

The favorite colour page - Yay"

person = ;
 
 person has a favorite colour! It is




I then have a half/broken stylesheet that is supposed to select the
person named in the URL person path arg. Then return their favorite
colour. However, as you'll notice, I can't see how to get from the first
line, to the second one. I assume the variable selectedPerson contains a
person node. (I don't know 'cause I can't make it work).
However, I have no idea how to use that variable to retrieve the colour.
XSL Stylesheet:









XML External Content (people.xml)


Phil
blue


Arthur
yellow




Thanks for your help. Have fun,

Phil


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

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





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

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




Re: How to deploy my cocoon project ?

2001-10-25 Thread Lajos Moczar



in server.xml. Works for me. Then use Apache on top of Tomcat, if you 
want to remove the Tomcat port from your URL.


Lajos
galatea.com


Eduardo Godoy Vega wrote:

> OK,
> but I don't want to put my project inside %TOMCAT_HOME% tree ... 'cause I
> delete it from time to time ... (re-build the lastest version of cocoon2)
> ...
> 
> to me, the best solution is to put my project in
> 
> D:\Myproj
> 
> I was searching the FAQ and the archives ... but I didn't find a solution...
> 
> Eduardo.
> 
> -Original Message-
> From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 5:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to deploy my cocoon project ?
> 
> 
> If you're not using %TOMCAT_HOME%\webapp\ROOT, you could either rename
> "cocoon" to "ROOT", and restart Tomcat, or edit
> %TOMCAT_HOME%\conf\server.xml and point the docBase for the "" context
> to webapps/cocoon.
> 
> Either way, you remove the offending "cocoon" from the URL.
> 
> Lajos
> galatea.com
> 
> 
> Eduardo Godoy Vega wrote:
> 
> 
>>Hi,
>>  I wrote and test my "cocoon project" ... right now is on
>>  %TOMCAT_HOME%\webapps\cocoon\myproj
>>
>>  is it possible to deploy it in a different path ?
>>  for example:
>>  %TOMCAT_HOME%\webapps\myproj
>>
>>  or
>>  D:\myproj
>>
>>Eduardo.
>>
>>-
>>Please check that your question has not already been answered in the
>>FAQ before posting. 
>>
>>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>>For additional commands, e-mail: <[EMAIL PROTECTED]>
>>
>>
> 
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 



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

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




esql logicsheet get-column-name column=?

2001-10-25 Thread Roger I Martin PhD



Hello,
 
I am new to Cocoon. Using version 2.
 
I am trying to use the esql:get-column-name 
template and am having difficulty supplying the numerical index.
 

 
causes
 
java.lang.NumberFormatException: sun.tools.javac.Main has been 
deprecated.
 
Also I want to supply an index variable like
 

for(int 
_esql_i=1;_esql_i<=;_esql_i++)
{
  
    
  
    
  
    
  
}

 
How?
 
Thanks.  I want to get my stuff going and also want to build some 
examples to put with the http://xml.apache.org/cocoon2/logicsheet-esql.html page.
 
Roger


Re: how to implement a dynamic sitemap?

2001-10-25 Thread Piroumian, Konstantin



Simply use an "action" to do your calculations then return the 
result to the sitemap:
 


    
    
          
    
    


 
Syntax is not exact, but you can easily understand what I mean 
if you take a look at the sample sitemap.
 
Regards,
    Konstantin Piroumian

  - Original Message - 
  From: 
  Christer Lindh 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, October 25, 2001 2:03 
  AM
  Subject: how to implement a dynamic 
  sitemap?
  
  As far as I've understood C2, there is now a 
  quite static sitemap which tells what request gets what XSL. This is too 
  static for my needs, I would like to do a bunch of calculations and then 
  decide on what XSL to use. Is there any way I can accomplish this with 
  C2?
   
  I have my own producer today with Cocoon 
  1 which creates Documents from data in my database, and these are then 
  assigned an XSL depending on a bunch of parameters (from the database and user 
  environment as well), ie I add PI:s to the Document DOM 
  dynamically.
   
  So - is it possible to use "classic" cocoon1.8 processing instructions 
  with cocoon2, instead of specifying processing stages in the 
  sitemap?
   
  If not, can I do my own implement of the Sitemap 
  interfaces and get C2 to use those instead?  My classes would act just 
  like a sitemap (as the interfaces are the same) but get it's daata from 
  database instead of a XML file in the filesystem.
   
   
   


C2 and Xfrom

2001-10-25 Thread Max Larsson

Hi,

has anyone expierence with xforms and c2 ??

Max

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

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




trying to access session object

2001-10-25 Thread Henrik Hofmann








 

Hi ,

I’m trying to access the session object under cocoon2
rc1.

 

My xsp code looks like this,

 


version="1.0" encoding="ISO-8859-1"?>

 



   

    org.apache.cocoon.environment.*xsp:include>

   xsp:structure>

 

  

  

  

    Session session = request.getSession(true);

    

  xsp:logic>

  

  

xsp:page>

 

 

It compiles fine but every time I try to access it I get
this error message.

 

Exception in ServerPagesGenerator.generate()

java.lang.IllegalStateException: Cannot
create a session after the response has been committed

 

 

bye








Re: how to implement a dynamic sitemap?

2001-10-25 Thread Martin Man

On Thu, Oct 25, 2001 at 12:03:06AM +0200, Christer Lindh wrote:
> As far as I've understood C2, there is now a quite static sitemap which tells what 
>request gets what XSL. This is too static for my needs, I would like to do a bunch of 
>calculations and then decide on what XSL to use. Is there any way I can accomplish 
>this with C2?
> 
> I have my own producer today with Cocoon 1 which creates Documents from data in my 
>database, and these are then assigned an XSL depending on a bunch of parameters (from 
>the database and user environment as well), ie I add PI:s to the Document DOM 
>dynamically.
> 
> So - is it possible to use "classic" cocoon1.8 processing instructions with cocoon2, 
>instead of specifying processing stages in the sitemap?
> 
> If not, can I do my own implement of the Sitemap interfaces and get C2 to use those 
>instead?  My classes would act just like a sitemap (as the interfaces are the same) 
>but get it's daata from database instead of a XML file in the filesystem.
> 
> 
> 


take a look at actions, they perfectly suit your case IMO, there is a bunch of
thm in the distro along with the documentation...


rgds,
martin
-- 
2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223
http://mman.dyndns.org/mman.gpg

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

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




Re: how to implement a dynamic sitemap?

2001-10-25 Thread Mario Muja



You can write your own actions, which return a 
value to the sitemap. This value can be used within the sitemap to decide, which 
XSL to use. In C2 you do not have to change your XML files to assign a 
stylesheet. This is handled dynamically by the stylesheet. From this point of 
view, I would say that the C1 approach is more static than the C2 sitemap. To 
get data from a database, I would use the ESQL logicsheet within an 
XSP.
 
Hint: I am not a C2 nor a Java expert. The above 
is, what I got from the documentation and from my own first C2 
samples.
 
Regards, Mario
 

  - Original Message - 
  From: 
  Christer Lindh 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, October 25, 2001 12:03 
  AM
  Subject: how to implement a dynamic 
  sitemap?
  
  As far as I've understood C2, there is now a 
  quite static sitemap which tells what request gets what XSL. This is too 
  static for my needs, I would like to do a bunch of calculations and then 
  decide on what XSL to use. Is there any way I can accomplish this with 
  C2?
   
  I have my own producer today with Cocoon 
  1 which creates Documents from data in my database, and these are then 
  assigned an XSL depending on a bunch of parameters (from the database and user 
  environment as well), ie I add PI:s to the Document DOM 
  dynamically.
   
  So - is it possible to use "classic" cocoon1.8 processing instructions 
  with cocoon2, instead of specifying processing stages in the 
  sitemap?
   
  If not, can I do my own implement of the Sitemap 
  interfaces and get C2 to use those instead?  My classes would act just 
  like a sitemap (as the interfaces are the same) but get it's daata from 
  database instead of a XML file in the filesystem.
   
   
   


Re: date-format in cocoon 1.8.2

2001-10-25 Thread Mario Muja

I can see your earlier mail but it has not arrived completely. The mail body
is empty. Anyway: I don't know a solution to your problem.

Mario

- Original Message -
From: "Mark S. Kent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 11:34 PM
Subject: RE: date-format in cocoon 1.8.2


Christian,

I'm trying the same thing and tried to wrap the  call with an
.  If that is the only command:
none
it works just fine when the value is null, but I can't find the correct
"syntax" to use for the command if the value is NOT null.  Because otherwise
I want to get the time value...


I sent an email about the esql:if-null earlier today (14:29 PM CDT) and
never saw it come through the list.  Has anyone else been having trouble
seeing their replies?

Mark

-Original Message-
From: Schroeter Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 8:35 AM
To: [EMAIL PROTECTED]
Subject: Re: date-format in cocoon 1.8.2


Now if the value in the db is null then i get an error-message.

Without the format - attribute i wouldnt get it.

What must i change, and how?

cu,
Christian

Am Dienstag, 23. Oktober 2001 19:01 schrieben Sie:
> Specify the format attribute using a Java SimpleDateFormat string.  For
> instance,
> 
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  date-format in cocoon 1.8.2
>
>
> Hi,
>
> what must i do to change the format of the date i get with
> 
>
> i am using cocoon1.8.2
>
> cu,
> christian
>
>
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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


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

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



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

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




[C2.0rc1] Exception when redirecting during pipeline processing

2001-10-25 Thread Adrian Geissel



Hi,
 
My question relates to breaking out of a 
pipeline after the generate stage has completed. Specifically, the generate 
stage performs some processing as XSP, and based on the success/failure of this 
processing, the pipeline is allowed to continue, or 'breaks-out' using a 
redirect. When I configure my sitemap to do this, an exception is thrown, and 
looking at the stacktrace, it appears that this is not legal. 
 
Has someone configured something similar, or 
alternatively, what is the recommended approach? In reference to suggestions, I 
would really like to be able to perform my processing (database updating) using 
XSP, as this needs to be flexible in a multi-customer environment and currently 
uses logicsheets to achieve this. Also, if the processing fails, the XSP returns 
valid XML to re-populate the original form.
 
Many thanks,
Adrian
 
== Begin: sitemap fragment 
=
 
           
  
  
  
  
    
      
        
            
  
        
    
   

 
== End: sitemap fragment 
=
 
== Begin: logfile extract 

 
 
DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/DefaultPool: Retrieving a 
org.apache.cocoon.components.pipeline.CachingEventPipeline from the 
poolDEBUG   (2001-10-25) 09:32.55:829   [cocoon  ] 
(/zdam/update_asset.html) Thread-13/DefaultPool: Retrieving a 
org.apache.cocoon.components.pipeline.CachingStreamPipeline from the 
poolDEBUG   (2001-10-25) 09:32.55:829   [cocoon  ] 
(/zdam/update_asset.html) Thread-13/sitemap_xmap: Matched 
wildcardmatcher_wildcard_N400296 pattern:update_*.htmlDEBUG   
(2001-10-25) 09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/LocaleAction: org.apache.cocoon.acting.LocaleAction: obtained locale 
information, locale = en_IEDEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/LocaleAction: org.apache.cocoon.acting.LocaleAction: language = en, 
country = IE, variant = DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/LocaleAction: org.apache.cocoon.acting.LocaleAction: checking for 
local overrides, language-attribute = lang, country-attribute = country, 
variant-attribute = variant, locale-attribute = locale, store-in-request = 
false, store-in-session = false, create-session = false, store-in-cookie = 
falseDEBUG   (2001-10-25) 09:32.55:829   [cocoon  ] 
(/zdam/update_asset.html) Thread-13/LocaleAction: 
org.apache.cocoon.acting.LocaleAction: returning map for XPath 
substitutionsDEBUG   (2001-10-25) 09:32.55:829   
[cocoon  ] (/zdam/update_asset.html) Thread-13/DefaultComponentFactory: 
ComponentFactory creating new instance of 
com.zenark.zdam.cocoon.action.CheckLoginAction.DEBUG   
(2001-10-25) 09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/sitemap_xmap: Action check-loginDEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/DefaultComponentFactory: ComponentFactory creating new instance of 
com.zenark.zdam.cocoon.action.GetUpdateMode.DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/DefaultComponentFactory: no logger attribute available, using standard 
loggerDEBUG   (2001-10-25) 09:32.55:829   [cocoon  
] (/zdam/update_asset.html) Thread-13/sitemap_xmap: Action 
get-update-modeDEBUG   (2001-10-25) 09:32.55:829   
[cocoon  ] (/zdam/update_asset.html) Thread-13/sitemap_xmap: Component 
generator:!content-aggregator!(emptyParam)DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/DefaultPool: Retrieving a org.apache.cocoon.sitemap.ContentAggregator 
from the poolDEBUG   (2001-10-25) 09:32.55:829   
[cocoon  ] (/zdam/update_asset.html) Thread-13/ContentAggregator: 
ContentAggregator: root element='page' ns='zenark.com/zdam' 
prefix='zdam'DEBUG   (2001-10-25) 09:32.55:829   
[cocoon  ] (/zdam/update_asset.html) Thread-13/ContentAggregator: 
ContentAggregator: part uri='cocoon:/banner.xml' element='' ns='' 
stripRootElement='' prefix=''DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/ContentAggregator: ContentAggregator: part uri='cocoon:/sidebar.xml' 
element='' ns='' stripRootElement='' prefix=''DEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/AbstractSitemap: Substitute evaluated value for 1 as 
assetDEBUG   (2001-10-25) 09:32.55:829   [cocoon  ] 
(/zdam/update_asset.html) Thread-13/AbstractSitemap: Substitute evaluated value 
for update-mode as NEWDEBUG   (2001-10-25) 
09:32.55:829   [cocoon  ] (/zdam/update_asset.html) 
Thread-13/ContentAggregator: ContentAggregator: part 
uri='cocoon:/asset.form?mode=NEW' element='' ns='' stripRootElement='' 
prefix=''DEBUG   (2001-10-25) 09:32.55:829   
[cocoon  ] (/zdam/update_asset.html) Thread-13/AbstractSitemap: Substitute 
evaluated value for 1 as assetDE

Re: Choosing XSL dynamically

2001-10-25 Thread Mario Muja

What about using xsl:include to include a calculation template in both of
the other stylesheets?
Mario

- Original Message -
From: "Mark S. Kent" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 5:44 PM
Subject: C2: Choosing XSL dynamically


I noticed a message previously about choosing an XSL file using actions
depending on some "external input" (in this case a value in the database --
ref:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=99806349922890&w=2 ).

I have reports that I am using Cocoon2 to render with two (maybe more later)
different stylesheets, one for HTML and one for PDF.  I am performing some
calculations in the XSL stylesheets to sum up totals from the XML data
before outputting the results using each stylesheet.  Since the XSL
calculations are held separately in each version of the stylesheet depending
on the report format the user wants, I must maintain the XSL calculations
separately in each file.  I'd prefer to include the calc's in one stylesheet
that then uses the appropriate "output" lines to either render using the
HTML commands (...etc) or FOP-PDF commands
(...etc).

If I include these commands in the same file with the use of some XSL
decision statement (xsl:if/choose/when) then the C2 sitemap won't know what
to really do with the commands it finds.  Is this possible to same different
"output" command reside in the same XSL page under C2?  Or is there a way to
perform the calculations in a "shared" file that I can "call" from each of
my two separate stylesheet files?

Mark


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

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



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

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




Re: VerifyError?

2001-10-25 Thread jose . camacho


we had the same problem yesterday.
 We think we were using new libs instead of old ones. We got these libs
again and all went ok. We change it to use directly FOP. Try to use the
same libs getting them from cocoon web-inf/lib.

  Regards. José Blas.


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

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




AW: Help! How can I call my xsp page from HTML document?

2001-10-25 Thread Skladov, Victor

Hi Jeremy!
 
Thanks for the suggestion.
I've done so and it runs although there's a modul mod_jk under Apache
that can take this task (I mean communication between Apache and Tomcat)
and I'm going to test it.
Thanks one more time!
 
Regards,
Viktor

-Ursprüngliche Nachricht-
Von: Jeremy Aston [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 24. Oktober 2001 18:27
An: [EMAIL PROTECTED]
Betreff: Re: Help! How can I call my xsp page from HTML document?



Hi Victor, 


Do you mean something like the following anchor tag in your html page? 


http://server:8091/cocoon/mypage.xsp";>call xsp 


Or is it something else? 


Regards 


Jeremy 


  "Skladov, Victor" <[EMAIL PROTECTED]> wrote: 


Hi, people!

My Apache Server runs on port 8080, Cocoon2 on port 8091. How can I
call my xsp page from a HTML document?
Must Apache and Cocoon have one root?

Regards,
Viktor

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

To unsubscribe, e-mail: 
For additional commands, e-mail: 





  _  

Nokia Game is on again. 
Click here   to join the new all media
adventure before November 3rd. 



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

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




probleme cocoon2 tomcat4

2001-10-25 Thread Alexandre Bauer
Title: Message




Cocoon 2 - Internal server error


type 
internal-server-error
message 
The sitemap handler's sitemap is not available.
description org.apache.cocoon.ProcessingException: 
The sitemap handler's sitemap is not available.
sender 
org.apache.cocoon.servlet.CocoonServlet
source 
Cocoon servlet
request-uri/cocoon/

exceptionorg.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not available.

path-info

stacktraceorg.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not available.
	at org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:179)
	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:93)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:293)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:471)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
	at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
	at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
	at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
	at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
	at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
	at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
	at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
	at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
	at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
	at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
	at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
	at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Source)
	at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:484)






Re: xml-schema / validate forms

2001-10-25 Thread Martin Man

On Wed, Oct 24, 2001 at 10:40:07AM +0200, Kenneth Petersen wrote:
> Hi all!
> 
> I was wondering why efforts have been made to generate and maintain the 
>FormValidatorAction. Why not just use xml-schemas and xml-validation to validate 
>input from froms?
> 
the effort was put there (by me as the author and others) becuse at the time
of writing I was not that failiar with XML schema, and actually I never
thought about it, ..., but as I'm actually almost rewriting the validator I'm
immediately going to take a look at it ang possibly give it a chance (in case
it will save me coding and will make the things simpler)...


> The only problem I can see in using xml-schemas is that it does not support I18N. On 
>the other hand neither does FormValidatorAction. The lack of I18N can be solved with 
>xml-schemas when generation the xml-file from parameters from the Request.
> 
> If it is already possible to use xml-schemas in Cocoon2, I would very much like to 
>know.
> 
> 
> Best Regards
> KP

thanx,
martin

p.s. you might check archives for recent discussion about "[RT] New Validator
Infrastructure" or how it was called :)

-- 
2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223
http://mman.dyndns.org/mman.gpg

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

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




JNI panic: JNI received a null string

2001-10-25 Thread Andrés Padilla


i have just intalled my cocoon 2 with tomcat 3.X, following all the steps
form de installing document and when i type in my browser: localhost:8080/cocoon
tomcat fails throwing this menssage: any idea?
JNI panic: JNI received a null string
    at java.lang.ClassLoader.findLoadedClass(Native
Method)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Unknown
Source)
    at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Unknown
Source)
    at org.apache.cocoon.sitemap.AbstractSitemap.compose(AbstractSitemap.java:122)
    at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(Unknown
Source)
    at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(Unknown
Source)
    at org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:143)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:348)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:183)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
    at java.lang.Thread.run(Thread.java:484)
 


Re: Cocoon 1.8.2 and jakarta-tomcat-4.0.1

2001-10-25 Thread Truong,Hoang C.

I did copy all the cocoon jars to $TOMCAT_HOME/common/lib.  
I changed the text conf/cocoon.properties to WEB-INF/cocoon.properties
in $TOMCAT_HOME/webapps/cocoon/WEB-INF/web.xml by Installing
instruction.  
In tomcat-3.2.x, there is mod_jk.conf which we can add these lines to
serve cocoon.  How can I do the same thing in tomcat-4.0.1 since there
is no mod_jk.conf in tomcat-4.0.1?

Alias /cocoon $TOMCAT_HOME/webapps/cocoon

Options Indexes FollowSymLinks

JkMount /cocoon/*.xml ajp13
AddType text/xml .xml

AllowOverride None
deny from all



I can't access cocoon via
http://localhost:8080/cocoon/samples/index.xml.
Thanks for your help.

Hoang 


This is the error:
Apache Tomcat/4.0.1 - HTTP Status 404 - /cocoon/samples/index.xml



type Status report

message /cocoon/samples/index.xml

description The requested resource (/cocoon/samples/index.xml) is not
available.


Lajos Moczar wrote:
> 
> Sure it does. What configuration is causing you problems? You still need
> to copy the cocoon 1.8.2 jars (xeres, xalan, cocoon, fop, servlet) to
> $TOMCAT_HOME/common/lib, and edit the web.xml of whatever web app you
> want to cocoonize, but it is still a straightforward process.
> 
> Regards,
> 
> Lajos
> 
> Truong,Hoang C. wrote:
> 
> > Hello everyone,
> > Does Cocoon-1.8.2 work with tomcat-4.0.1?  I noticed that tomcat-4.0.1
> > have changed the configuration files.  How do I make it to work with
> > cocoon-1.8.2?  Thanks.
> >
> > Hoang
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> >
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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




Upload file... working exemple?

2001-10-25 Thread Tiberiu Dondera

Does anybody has a working exemple of a file upload with cocoon2 using
com.oreilly.servlet.MultipartRequest?

I'm getting
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
upload_xsp:
Line 288, column 31:  Class javax.servlet.ServletRequest not found in new.
Line 352, column 44:  Undefined variable or class name: multi

with these lines...

   try {
  MultipartRequest multi = new MultipartRequest(request, tempUploadDir,
10*1024*1024);
   }catch (Exception e){
   }

Going one step forward, must I download the javax.servlet package and put it
in the WEB-INF/lib directory? Somehow that doesn't seem logic...

Any help (maybe this is not the right way to do file upload) will be much
appreciated...

Thanks in advance.
Tibi Dondera

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

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




Help needed Passing Parameters

2001-10-25 Thread Phil Blake

I am missing something when it comes to getting and passing request 
arguments. I've looked at the cocoon examples, and although my test 
example appears to match the cocoon one in every way there is obviously 
something fundamental missing.

I think I'm pretty close. :) If anyone could help me get past this 
misunderstanding it would be much appreciated.

My example scenario allows the user to enter a URL like the following: 
http://hostname/example/colour.html?person=Phil%20Blake
The result would be a HTML page with the person's favorite colour.

In the sitemap I added a generic matcher that matches anything .html and 
returns the corresponding xsp. I figured (as opposed to read anywhere in 
documentation) that I needed to include the use-request-parameters and 
use-browser-capabilities-db parameters - I don't know why I want them, 
just that they appeared in the cocoon sitemap.




 
 




The requested xsp page looks like this. (colour.xsp)
http://apache.org/xsp";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
   xmlns:xsp-response="http://apache.org/xsp/response/2.0";>
 
 String person = null;
 

The favorite colour page - Yay"

person = ;
 
 person has a favorite colour! It is 




I then have a half/broken stylesheet that is supposed to select the 
person named in the URL person path arg. Then return their favorite 
colour. However, as you'll notice, I can't see how to get from the first 
line, to the second one. I assume the variable selectedPerson contains a 
person node. (I don't know 'cause I can't make it work).
However, I have no idea how to use that variable to retrieve the colour.
XSL Stylesheet:









XML External Content (people.xml)


Phil
blue


Arthur
yellow




Thanks for your help. Have fun,

Phil


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

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




how to implement a dynamic sitemap?

2001-10-25 Thread Christer Lindh



As far as I've understood C2, there is now a quite 
static sitemap which tells what request gets what XSL. This is too 
static for my needs, I would like to do a bunch of calculations and then 
decide on what XSL to use. Is there any way I can accomplish this with 
C2?
 
I have my own producer today with Cocoon 
1 which creates Documents from data in my database, and these are then 
assigned an XSL depending on a bunch of parameters (from the database and user 
environment as well), ie I add PI:s to the Document DOM 
dynamically.
 
So - is it possible to use "classic" cocoon1.8 processing instructions with 
cocoon2, instead of specifying processing stages in the sitemap?
 
If not, can I do my own implement of the Sitemap 
interfaces and get C2 to use those instead?  My classes would act just like 
a sitemap (as the interfaces are the same) but get it's daata from database 
instead of a XML file in the filesystem.
 
 
 


RE: date-format in cocoon 1.8.2

2001-10-25 Thread Faulkner, Perry

Hi Christian,

These comments apply to Cocoon 2, but the generated java code checks for a
null value and returns "", otherwise it uses the SimpleDateFormat to convert
the date. You might look at your generated code to see if it is doing the
same thing. Maybe this was added for Cocoon 2. Anyway, if it isn't doing the
right thing, you can get hold of the stuff from 2 and put that into your
code, either add it to your esql.xsl or simply use  in your xsp
file, within your  to fetch the date, test for null and
format, as required, just like the Cocoon 2 code! Look at the esql.xsl and
there should be some esql samples that do this sort of thing.

HTH, regards

  Perry

-Original Message-
From: Schroeter Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 24 October 2001 23:35
To: [EMAIL PROTECTED]
Subject: Re: date-format in cocoon 1.8.2


Now if the value in the db is null then i get an error-message.

Without the format - attribute i wouldnt get it.

What must i change, and how?

cu,
Christian

Am Dienstag, 23. Oktober 2001 19:01 schrieben Sie:
> Specify the format attribute using a Java SimpleDateFormat string.  For
> instance,
> 
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  date-format in cocoon 1.8.2
>
>
> Hi,
>
> what must i do to change the format of the date i get with
> 
>
> i am using cocoon1.8.2
>
> cu,
> christian
>
>
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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

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

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




xalan2 and cocoon 1.8?

2001-10-25 Thread Christer Lindh



I bet this is a "faq"...
 
Is it possible to use Cocoon 1.8.3(?) with 
Xalan2?


RE: date-format in cocoon 1.8.2

2001-10-25 Thread Mark S. Kent

Christian,

I'm trying the same thing and tried to wrap the  call with an
.  If that is the only command:
none
it works just fine when the value is null, but I can't find the correct
"syntax" to use for the command if the value is NOT null.  Because otherwise
I want to get the time value...


I sent an email about the esql:if-null earlier today (14:29 PM CDT) and
never saw it come through the list.  Has anyone else been having trouble
seeing their replies?

Mark

-Original Message-
From: Schroeter Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 8:35 AM
To: [EMAIL PROTECTED]
Subject: Re: date-format in cocoon 1.8.2


Now if the value in the db is null then i get an error-message.

Without the format - attribute i wouldnt get it.

What must i change, and how?

cu,
Christian

Am Dienstag, 23. Oktober 2001 19:01 schrieben Sie:
> Specify the format attribute using a Java SimpleDateFormat string.  For
> instance,
> 
>
> -Christopher
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  date-format in cocoon 1.8.2
>
>
> Hi,
>
> what must i do to change the format of the date i get with
> 
>
> i am using cocoon1.8.2
>
> cu,
> christian
>
>
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

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

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


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

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




RE: How to deploy my cocoon project ?

2001-10-25 Thread Luca Morandini

Eduardo,

provided you use Apache, you can hide "cocoon" as much as you like with
mod_rewrite. This solution is the one which lets your configuration
unchanged.

There is a FAQ entry on it.

Best regards.

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


> -Original Message-
> From: Eduardo Godoy Vega [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 4:29 PM
> To: [EMAIL PROTECTED]
> Subject: RE: How to deploy my cocoon project ?
>
>
> OK,
> but I don't want to put my project inside %TOMCAT_HOME% tree ... 'cause I
> delete it from time to time ... (re-build the lastest version of cocoon2)
> ...
>
> to me, the best solution is to put my project in
>
> D:\Myproj
>
> I was searching the FAQ and the archives ... but I didn't find a
> solution...
>
> Eduardo.
>
> -Original Message-
> From: Lajos Moczar [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 5:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to deploy my cocoon project ?
>
>
> If you're not using %TOMCAT_HOME%\webapp\ROOT, you could either rename
> "cocoon" to "ROOT", and restart Tomcat, or edit
> %TOMCAT_HOME%\conf\server.xml and point the docBase for the "" context
> to webapps/cocoon.
>
> Either way, you remove the offending "cocoon" from the URL.
>
> Lajos
> galatea.com
>
>
> Eduardo Godoy Vega wrote:
>
> > Hi,
> > I wrote and test my "cocoon project" ... right now is on
> > %TOMCAT_HOME%\webapps\cocoon\myproj
> >
> > is it possible to deploy it in a different path ?
> > for example:
> > %TOMCAT_HOME%\webapps\myproj
> >
> > or
> > D:\myproj
> >
> > Eduardo.
> >
> > -
> > Please check that your question has not already been answered in the
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> >
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>


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

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




VerifyError? (continued)

2001-10-25 Thread Ben Young

My jdk version is 1.3.0_02.

Thanks,
Ben

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

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




VerifyError?

2001-10-25 Thread Ben Young

I saw a similar problem to the one I'm having in one of the posts a
few days ago.

I'm running RedHat 7.1, Tomcat 3.2.2, Apache 1.3.20, and Cocoon
2.0rc1.

Here's the error I'm getting:

ERROR   (2001-10-23) 17:02.58:684   [cocoon  ] (/cocoon/)
Thread-39/Handler: Error compiling sitemap
java.lang.VerifyError: (class: org/apache/fop/render/ps/PSRenderer,
method: renderImageArea signature:
(Lorg/apache/fop/image/ImageArea;)V)
Incompatible object argument for function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
org.apache.cocoon.components.renderer.ExtendableRendererFactory.class$(ExtendableRendererFactory.java:26)
at
org.apache.cocoon.components.renderer.ExtendableRendererFactory.(ExtendableRendererFactory.java:35)
at
org.apache.cocoon.components.renderer.ExtendableRendererFactory.(ExtendableRendererFactory.java:30)
at
org.apache.cocoon.serialization.FOPSerializer.(FOPSerializer.java:52)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(Unknown
Source)
at
org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(Unknown
Source)
at
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(Unknown
Source)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(Unknown
Source)
at
org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(Unknown
Source)
at
org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(Unknown
Source)
at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(Unknown
Source)
at
org.apache.cocoon.sitemap.SitemapComponentSelector.addSitemapComponent(SitemapComponentSelector.java:91)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:231)
at
org.apache.cocoon.www.sitemap_xmap$Configurer.configSerializers(sitemap_xmap.java:1440)
at
org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:829)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(Unknown
Source)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(Unknown
Source)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:143)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addCompiledComponent(ProgramGeneratorImpl.java:348)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:183)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
at java.lang.Thread.run(Thread.java:484)


Thanks for any help you have,
Ben

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

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