Re: Mount vs File for logicsheets inside cocoon.xconf

2003-07-01 Thread Vadim Gritsenko
Derek Hohls wrote:

I'd appreciate a brief explanation (or pointer
to such) as to why:
parameter name=href value=file:///my-path-to-cocoon/logic/my-taglib.xsl/

works (placed inside the builtin-logicsheet section of 
cocoon.xconf)

and why:

parameter name=href value=resource://logic/my-taglib.xsl/

gives an error (the file could not be located).  I have seen both
forms of referencing used in examples, but cannot get the latter
to work...  can someone suggest why??
 

You know that resources are loaded by class loader, right? Which means that

 parameter name=href value=resource://logic/my-taglib.xsl/

translates to

 parameter name=href 
value=file:///my-path-to-cocoon/WEB-INF/classes/logic/my-taglib.xsl/

I guess that was the missing piece.

PS Due to the above (class loader) resources can be reloaded only 
together with all the classes. Redeploy of the whole webapp will pick up 
changes in the logicsheet but then you will have to manually delete all 
compiled XSPs because Cocoon will not know that it was changed.

Vadim



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


Re: implementing Cacheable

2003-06-12 Thread Vadim Gritsenko
Jorg Heymans wrote:

Hi all,

How can I add caching to my custom written serializer? On average my
serializer takes 3 seconds to complete (regardless whether I implement the
cacheable interface or not)
My serializer implements 2 interfaces : Serializer and Cacheable. 

Implementation of the caching interface :

 public long generateKey() {
   //cachekey is long var
   //note that the svgserializer returns 1 here 
   return cacheKey++;
You should read cacheable.xsp and after reading in also return 1 here.

(Otherwise you will return cahced response only on 2^64 request to the 
same resource)

Vadim

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


Re: implementing Cacheable

2003-06-12 Thread Vadim Gritsenko
Jorg Heymans wrote:

Good pointer thanks Vladim :-)

The difference with the xsp page ofcourse is that I cannot access the
requestparameters from within the serializer.
And you should not.


As a matter of fact the
generatekey and cachevalidity gets called before anything else in the
serializer, so I can't generate a key based on the content that is being
processed.
And you should not.


This would be the solution though. 

On a different note, if I put in a DeltaTimeCacheValidity(0, 5); and
generate 1 as key this does not affect the performance of my serializer.
It keeps executing at a steady uncached 3 seconds.
Any ideas on how to access request parameters within the serializer,

You don't need request parameters there. The only thing which must 
affect cache key generated by serializer is *serializer's state.*

Suppose you have one serializer and it's behavior is different in AM and 
PM (it's got two states). Then, you have to generate the key depending 
on time of the day:

   if (isAM) { return 1 } else { return 2 };

That's it. No request parameters. No content. Only component's state 
matters here. Request parameters, session attributes, etc, all taken 
care of well before seializer is called.


maybe I
can use a map:param on the serializer in the sitemap maybe?
 

No. serialize/ tag can't have params.

Vadim



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


Re: conditions in xsl

2003-06-10 Thread Vadim Gritsenko
Conal Tuohy wrote:

Hi Tim

This question is best asked on the XSL List, rather than Cocoon Users, but here's an answer anyway:

Completely agree with this

Test to see if the report has any preceding reports. Perhaps something like:

div id=sw{normalize-space(report-name)}
xsl:if test=not(preceding-sibling::report)
test=position() = 1 also should work

Vadim


xsl:attribute name=classdlgSwitchSelected/xsl:attribute
/xsl:if
...

/div
 





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


Re: Orcale-XML-Parser in Coccon2

2003-03-26 Thread Vadim Gritsenko
Uwe Gerger wrote:

Hello,
I change the cocoon.xconf to use the Oracel-parser:
xml-parser class=oracle.xml.jaxp.JXSAXParser
You shouldn't touch this line. This specifies Avalon XML Parser 
component. JXSAXParser is neither Component, nor has anything to do with 
Avalon.

Vadim

logger=core.xml-parser

   parameter name=sax-parser-factory
value=oracle.xml.jaxp.JXSAXParserFactory/
   parameter name=document-builder-factory
value=oracle.xml.jaxp.JXDocumentBuilderFactory/
/xml-parser
When starting the web-server an loading a cocoon-application I get the
following error messages in core.log:
 

...



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


Re: Error deploying to WLS 6.1sp2... Help!

2003-03-15 Thread Vadim Gritsenko
Howard, Gary wrote:

Does anyone have any ideas?  Any help is appreciated.

Thanks,
Gary
Mar 14, 2003 4:22:06 PM EST Error J2EE Error deploying application
cocoon
: Could not load cocoon
Mar 14, 2003 4:22:06 PM EST Error Management ApplicationManager
starting
Config caught throwable
java.lang.reflect.UndeclaredThrowableException:
java.lang.StringIndexOutOfBounds
Exception: String index out of range: -1
Upgrade to SP4 or get a patch from bea support. This is known issue.

Vadim



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


Re: FOP, inline SVG, fonts

2003-03-12 Thread Vadim Gritsenko
Joerg Heinicke wrote:

Hello Vadim,

Vadim Gritsenko wrote:
 Frank made a mistake... New configuration syntax which supports Cocoon
 protocols looks like:

 user-configcontext://webapps/ROOT/doc/fop/config.xml/user-config

 Old configuration (with src attribute) does not support protocols, 
works
 only with file name (see FOPSerializer.java).

I tested the new configuration of the pdf serializer, but no luck. The 
userconfig file is found as before (but yeah, I use the new 
configuration ;-), but there is still a null in the path to the fonts:

Failed to read font metrics file 
nullwebapps/ROOT/doc/fop/fonts/Verdana.xml: 
/home/jheinicke/development/IUPB/iupb/nullwebapps/ROOT/doc/fop/fonts/Verdana.xml 

-- 


Don't know; was working for me last time I tested.


FOP supports only links to the fonts in absolute file format, 
starting with C:/, because currently there is no way to tell FOP 
current context. No support for Cocoon URIs, for now. See 
http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html.


Why must it be absolute paths now? In Cocoon 2.0.3 with Fop 0.20.3 the 
relative paths worked without any problems. But no longer in Cocoon 
2.0.4 with Fop 0.20.4? 


Not that it *must*... Yes it should work with relative path. But these 
paths will be relative to the current working directory of JVM - not 
relative to webapp context or sitemap. Because of this, it is easier to 
say that paths to the fonts must be absolute paths.

Vadim



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


Re: FOP, inline SVG, fonts

2003-03-12 Thread Vadim Gritsenko
Joerg Heinicke wrote:

Why must it be absolute paths now? In Cocoon 2.0.3 with Fop 0.20.3 
the relative paths worked without any problems. But no longer in 
Cocoon 2.0.4 with Fop 0.20.4? 


Not that it *must*... Yes it should work with relative path. But 
these paths will be relative to the current working directory of JVM 
- not relative to webapp context or sitemap. Because of this, it is 
easier to say that paths to the fonts must be absolute paths.


Hmm, maybe because we use JBoss + Tomcat + Cocoon. Do you know what 
changed between Fop 0.20.3 and 0.20.4, that prevents my old stuff from 
working? Or is it deep Fop interna?


No, I don't know what has been changed.

Vadim





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


Re: FOP, inline SVG, fonts

2003-03-11 Thread Vadim Gritsenko
Joerg Heinicke wrote:

Hello Frank,

sorry, but this doesn't work in both Cocoon versions. I tested it some 
time ago with Cocoon 2.0.3 and now with with 2.0.4:


Frank made a mistake... New configuration syntax which supports Cocoon 
protocols looks like:

user-configcontext://webapps/ROOT/doc/fop/config.xml/user-config

Old configuration (with src attribute) does not support protocols, works 
only with file name (see FOPSerializer.java).

...

And when changing only the links to the font files in config.xml using 
context:// protocol:


FOP supports only links to the fonts in absolute file format, starting 
with C:/, because currently there is no way to tell FOP current 
context. No support for Cocoon URIs, for now. See 
http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html.


2003-03-11 18:23:22,125 INFO  [org.jboss.web.localhost.Engine] ERROR 
(2003-03-11) 18:23.22:124   [manager.] (/conweb/stream.secure.pdf) 
Thread-7/MessageHandler: Failed to read font metrics file 
nullcontext://webapps/ROOT/doc/fop/fonts/Verdana.xml : unknown 
protocol: nullcontext

And with Batik: it's one of the most simplest SVG possible: basic 
shapes, rect in SVG spec. Furthermore (again the stacktrace) the NPE 
happens in a Fop class:

javax.xml.transform.TransformerException: java.lang.NullPointerException
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1226) 

at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3135) 

at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NullPointerException
at 
org.apache.fop.render.pdf.fonts.LazyFont.getAscender(Unknown Source)
at org.apache.fop.layout.FontState.getAscender(Unknown Source)


Don't know solution for this one, but try disabling incremental processing.

Vadim


Even it brought no solution, thanks for your help.

Joerg




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


Re: FOP, inline SVG, fonts

2003-03-11 Thread Vadim Gritsenko
Joerg Heinicke wrote:

Vadim, can you please add the changed configuration of pdf serializer 
to the documentation? There is only the src-attribute mentioned. 


Not only documentation is outdated... Javadoc is missing too!

Care to provide a patch? ;-)

Vadim



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


Re: Possible threading issues with xsltc + BCEL ???

2003-02-06 Thread Vadim Gritsenko
Michael Melhem wrote:


Hi Cocooners,

Are their any other Cocoon users having Threading Issues with xsltc?

Its seems that if you have a translat being compiled at the same time by two 
or more threads (instances of TraxTransformer) you will get issues because 
BCEL is not (by design) threadsafe as it users static methods and 
variables which seem to be overwriting each other???

Once the Translets get compiled however, such threading issues disappear.

Does anyone have expirence with this?

Regards,
Michael Melhem

Ps After locally patching org.apache.xalan.xsltc.trax.TemplatesHandlerImpl.java
with some synch code around the compile block, all seems OK.
 


Can you notify Xalan guys about this issue? Or may be sent'em a patch?


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: 2.1 ? Release date and stabiltiy?

2003-02-01 Thread Vadim Gritsenko
Geoff Howard wrote:


A lot of people (myself included) use 2.1 live.  The only sense in which it
is not stable yet (and therefore not yet even at alpha stage) is the API
of some of the features.  Flow, for instance, is still under modification.
In fact several deadlines have come and gone while that and several other
API level issues have been worked out.

That said, it is getting very close to alpha release and at that point it
wouldn't be too long before things are beta and then released.  That's just
my gut feeling.

Geoff

-Original Message-
From: Robert Simmons [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 7:49 AM
To: Cocoon Users
Subject: 2.1 ? Release date and stabiltiy?


I was wondering if there has been a target release date set for 2.1.
Additionally what experiences have people had with the current CVS builds of
2.1 ? Is it stable in core functionality ?



YMMV. Not all bugs are ironed out, and some regression test fail ATM. 
These will be addressed before beta, and if it does not affect your 
project (core functionality is different for everybody ;) - then you 
are in luck and can start looking at 2.1 right now.

Vadim


-- Robert
 




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




[POLL] JDK 1.2 Support

2003-02-01 Thread Vadim Gritsenko
Hi all:

To better understand how you are using Cocoon product and serve your 
needs better ;-)
Cocoon developers would like to know how many of our currect users are 
deploying Cocoon on JDK 1.2 and why they did not switch to JDK1.3 (or 
better).

This information will help Cocoon developers community to decide on 
wether we should switch to JDK1.3 or continue JDK1.2 support for some 
more time. Thanks for the feedback :)

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]



Cocoon 2.0.5-Dev snapshot, Was: Sitemap-Engine for 2.0.5

2003-02-01 Thread Vadim Gritsenko
Timothy Larson wrote:


Any chance snapshots of the CVS 2.0.5-dev could be made
just like the snapshots of CVS HEAD so mere mortals such
as myself could get easy access to the fixes going into stable
branch?



Here it is, for temporary consumption:
   http://www.apache.org/~vgritsenko/xml-cocoon-205-dev-20030201.tar.gz



 (Carrot: it would get more testing before release :)
 


(Now, when I went so far and made it, you just *have to* do more testing ;)

Vadim


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: .Net port of Cocoon

2003-01-23 Thread Vadim Gritsenko
Luca Morandini wrote:


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:55 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: .Net port of Cocoon
   


 

Hi Luca,

   

Hmm I never restart the Servlet container (not the VM) for debugging.
 

Could you explain how you debug your Cocoon app?
   


By looking at the log files (you can easily configure them via logkit.xconf) and by using views (meaning: looking at the output of
intermediate steps in the pipeline).

Granted, there is no debugger in Cocoon,



... and shoud not be: all IDEs as well as JDK has debuggers. Use them 
remotely or start your servlet engine from under it - in either case you 
can put breakpoints and debug your Java.

/me goes back to lurking
Vadim


but no need to re-start the container either.

Regards,

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




-
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: .Net port of Cocoon

2003-01-23 Thread Vadim Gritsenko
[EMAIL PROTECTED] wrote:


Hi Vadim,

 

... and shoud not be: all IDEs as well as JDK has debuggers. Use them 
remotely or start your servlet engine from under it - in either case you 
can put breakpoints and debug your Java.
   


Do you include Eclipse?



I'm using IDEA, and have not worked with Eclipse yet, so I'm not sure 
what do you mean here.


Vadim



Sylvain


-Message d'origine-
De: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Date: jeudi, 23. janvier 2003 17:05
À: [EMAIL PROTECTED]
Objet: Re: .Net port of Cocoon


Luca Morandini wrote:

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:55 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: .Net port of Cocoon
  

 



   

Hi Luca,

  

 

Hmm I never restart the Servlet container (not the VM) for debugging.


   

Could you explain how you debug your Cocoon app?
  

 

By looking at the log files (you can easily configure them via logkit.xconf) and by using views (meaning: looking at the output of
intermediate steps in the pipeline).

Granted, there is no debugger in Cocoon,

   


... and shoud not be: all IDEs as well as JDK has debuggers. Use them 
remotely or start your servlet engine from under it - in either case you 
can put breakpoints and debug your Java.

/me goes back to lurking
Vadim


 

but no need to re-start the container either.

Regards,

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


   




-
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: .Net port of Cocoon

2003-01-23 Thread Vadim Gritsenko
Luca Morandini wrote:


-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 5:05 PM
To: [EMAIL PROTECTED]
Subject: Re: .Net port of Cocoon
   


 

Granted, there is no debugger in Cocoon,

 

... and shoud not be: all IDEs as well as JDK has debuggers. Use them
remotely or start your servlet engine from under it - in either case you
can put breakpoints and debug your Java.

/me goes back to lurking
Vadim
   


Vadim,

let's get this straight: since Cocoon is composed of many technologies, a Java debugger alone cannot do the work.
 


Of course not, all other (listed here and not) ways to debug pipelines 
are useful and needed too (and IIRC 2.1 has some improvements there). 
Just reminding that good 'ol java debuggers are still applicable when 
you want to debug java ;)

Vadim


I'd like to debug my XSLT, see the parameters' values as they flow from the sitemap to the XSLT, check every stage's XML output, set
breakpoints in Actions... and more: this is what an ideal Cocoon debugger should do.

AFAIK, there is no single debugger like this, only a patchwork of debuggers, one for XSLT, one for Java...


Regards,

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




-
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: Possible with XSPs?

2002-10-18 Thread Vadim Gritsenko
Sonny Sukumar wrote:


Aha! That fixed it.  I'd love to know why one can only use xsp-request elements inside the document (root element).  Anyone know?



Class scope vs method scope.

Code inside root element goes into the method, code above root element 
goes to class scope. Thus, NPE: request is null when you load the class.

Vadim


--- Katzigas Dimitris [EMAIL PROTECTED] wrote:
 

I think that your code is OK.

   

xsp:logic
String productId = xsp-request:get-parameter name=productid/;
/xsp:logic

This code is right above my root document element
 

But i think that you have to put the whole xsp:logic fragment inside your
root element. I think that in order to use the xsp-request:xx tag it
has to be inside your root element.

I Hope that will help.

Dimitris Katzigas
   





-
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: Xindice logicsheet - initial success

2002-10-11 Thread Vadim Gritsenko

Josema Alonso wrote:

I've sent email. Why do you need xsp logicsheet and why don't you use
xmldb protocol with cinclude? This works out of the box, with no effort.



I'm sorry Vadim, I've just browsed through the archives and I saw your
reply. I do not know why I haven't got it. It seems I have some problem with
my email box, cause now I'm getting today's messages from the list twice...

Anyway, I have read some of your previous replies regarding this subject.
Have tried the util logicsheet and it's working out of the box, even for
XPath queries. Great feature, thanks!
But what I would like to do is to edit, remove, update...documents in
Xindice.


Try also XMLDBTransformer. It is located in the scratchpad, and can 
create / delete resources in the xindice. xupdate is also supported but 
I had no time to hunt all the bugs out of it.


 Since I'm still not so good at Java, I see very difficult to me to
write the proper action or generator needed to do it. So, I found the eXist
logicsheet documentation:
http://exist.sourceforge.net/xmldb.xsl.html

and I thought it was the best for me. Everything in a logicsheet. And it
lets me remove and add documents and collections, great. I couldn't test it
more but at least the get-collection and get-document are working for me
nicely.

Btw, where should I start looking if I want to create a new action or
generator for XUpdate as you suggested? Maybe at 'XMLDBGenerator.java' or
'XMLDBTransformer.java' better?

Oh, and currently I refer to my Xindice collections in the XSP like this:
xmldb:collection uri=xmldb:xindice://localhost:4080/db/addressbook/

But I'm not completely satisfied, cause it depends on my setup. What
if someone doesn't have Xindice running on port 4080, for example? So, is
there any way of referring to them through the pipeline matcher? Something
like: cocoon://xmldb/addressbook/


You will need pipeline to process such request.  Then it should work.

Vadim


I've tried the later and it doesn't work for me.

Thank you very much.
  



-
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: Writing a custom transformer

2002-10-11 Thread Vadim Gritsenko

simo kauranen wrote:

Now I've written and compiled a transformer. I put the
.class file where I found the other transformer .class
files (not under tomcat) and defined the transformer
in the sitemap (and restarted tomcat). I got
ClassNotFoundException. 

Could someone tell where I should put the .class file
that cocoon would find it?


tomcat/webapps/cocoon/WEB-INF/classes/my/package/MyTransformer.class

Vadim


Simo K.
  





-
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: Cocoon on Headless Linux with JDK1.4

2002-10-09 Thread Vadim Gritsenko

Ilya A. Kriveshko wrote:

 This seems to be the magic key -- a JVM 1.4 option to enable headless AWT:

  -Djava.awt.headless=true


FYI: http://xml.apache.org/cocoon/installing/index.html has:

*UNIX with X server
...
*/Sun JDK 1.4 does not require graphics display anymore, but Java has to 
be started with the argument |-Djava.awt.headless=true|, and X libraries 
still must be installed./
*...*

Vadim


 Ilya A. Kriveshko wrote:

 quote from=JDK-1-4-release-notes
   strongHeadless support/strong is now enabled by new graphics
   environment methods that indicate whether a display, keyboard, and
   mouse can be supported in a graphics environment.
 /quote

 I wonder what they are talking about? Are you sure it doesn't work as 
 is with JDK 1.4?
 Read more at:
 http://java.sun.com/j2se/1.4/docs/guide/awt/AWTChanges.html#headless

 Hope this helps
 -- 
 Ilya


 Jeff Turner wrote:

 On Wed, Oct 02, 2002 at 01:04:29PM +0200, Bert Van Kets wrote:
  

 Doesn't Xvfb need the X libraries too?
   



 I don't think so; at least Debian doesn't list any X packages as a
 dependencies, and says Xvfb can be used as an aid to porting the X
 server to a new platform.

 --Jeff

  

 Bert



-
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: Servlet-Ouput as Cocoon-Input

2002-10-09 Thread Vadim Gritsenko

Dario Liberman wrote:

What is the correct way of doing it?
I am new to cocoon too, but I see here serialization and deserialization
done perhaps unnecessary.


Servlet API is stream-based, thus if you want to use servlet's output, 
you have to parse XML again.


If the servlet used a DOMXML object to represent the outermost data, and
then serialized it to give it to cocoon, it is a waste.
Is there anyway to have the servlet give an XMLobject to the cocoon pipeline
instead of a character-stream?


You can store DOM as request attribute and then forward request 
processing to the Cocoon. In cocoon, you can pick up this DOM object and 
generate SAX out of this into the pipeline, using something similar to 
SessionDOMGenerator.

Instead of forward() in the Servlet it is also possible to write a 
ServletFilter.
Instead of DOM, it is possible to use Cocoon's XMLizable interface.


In my case, I am used to WebMacro, that is similar to Velocity from apache.
In this architecture (more or less), the servlet receives a request, and
then processes an action (like searching something in the database) and then
puts objects in a hashtable (like a collection of javabeans representing the
query result) and then invokes a template. The template can use the objects
passed to the hashtable by specifying $keyname.method() for example. It has
primitive logic directives as iteration, if-then-else, and a set statement
in order to modify variables (this way you are forced to code well, since
most of the logic must be in a java class, not in the template). This output
then can be sent to the response stream, or to a file or to wherever you
like (but 99% of the time you set it to the response).

I like this architecture, and I would like to mix it with cocoon. So I
suppose that instead of WebMacro, I should be doing similar things with an
xsp, so that instead of a stream of characters I get as output an XMLobject
to introduce into the pipeline.

Does anybody have a simple starter example of how to do this? Because I like
to decide the final pipeline (decide the template) from the servlet. As far
as I could see, the usual way is to have a fixed pipeline map.

Also, I need to get hold of the final xmlobject from the pipeline (instead
of serializing it to the response) since I have to put this xml in a SOAP
message as the final result (not a webbrowser).


Is it SOAP request to other server? Cocoon can do this. Or, you can use 
SourceWritingTransformer, or write own transformer or serializer.


So what I need cocoon to be, is an invisible module that I put objects to it
in some hashtable as input


Use request's attributes to pass input data.


 and a template name (or map ref, as you like),


URI is a template name.


and gives me magically as output (after a pipeline of transformations with
automatic-caching, etc) a nice XMLobject.


SessionDOMTransformer can do this. Also, see SourceWritingTransformer.

Vadim


 Then with it I do what I like (for
example put it in a soap message response/request or even put it back in a
cocoon-pipeline of transformations get yet another xmlobject).


Perhaps I am lost, since I managed to make cocoon2 work just today, on my
tomcat 4.1.2 container on jdk1.4 I was told to look for a manifest file
entry problem or rather unpack the war (I went with the second choice and
was just fine). Thanks to Vadim!!
http://www.mail-archive.com/cocoon-users@xml.apache.org/msg18532.html

Well, I hope someone did this style of programming.

Salutes,
Dario.

  

...



-
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: multiple webapps sharing XSPs

2002-10-09 Thread Vadim Gritsenko

Ryan Agler wrote:

Can a guru out there give me a hand?


The problem with loggin comes from the fact that in your setup 
org.apache.log classes are loaded once and shared among contexts, and 
from the fact that logging uses some static methods/variables. Example 
(from CocoonServlet):

final Logger logger = 
Hierarchy.getDefaultHierarchy().getLoggerFor();

Thus, all instances will share same instance of the log - all instances 
will write to same log file.

Cannot comment on XSP problem right now. But try latest 2.0.4-dev 
version: it has one patch for XSP reloading problem.

Vadim



I recently installed Tomcat 4.1.12 with the latest Cocoon CVS.  I have 4
Cocoon webapps which share the cocoon jars, are all in
$TOMCAT_HOME/shared/lib.  When I fire up Tomcat, the webapps get
initialized and the normal log files appear under each one's
WEB-INF/logs.  

It starts getting crazy here -- All 4 webapps seem to write their logs
to ONE of the webpps' WEB-INF/logs when I start accessing pages.  On top
of that, say webapp1 has a page called test.xsp. I access test.xsp,
it compiles just fine and the .class file appears in $TOMCAT_HOME/work,
etc.  However, if the sitemap for webapp2 matches test.xsp, the page
from webapp1 gets pulled from webapp1's cache and used!?  No .class file
gets compiled for webapp2, unless I explicitly go in and touch
webapp2's test.xsp so cocoon thinks it has been modified.

I found that this only happens if the cocoon jars are shared (i.e. in
$TOMCAT_HOME/shared/lib), as opposed to each webapp having copies of the
jars in WEB-INF/lib.  I have made the usual precautions of deleting the
work directory before starting Tomcat each time.

I suspect this has something to do with contexts?  I say that because
the log files for all 4 webapps are all being written to a single
${context-root} (from logkit.xconf).  Here is a snippet from my
server.xml if you can see anything wrong:

Host name=www.domain1.com debug=0 appBase=webapps
unpackWARs=true
   Context path= docBase=webapp1 debug=0/
   Realm className=org.apache.catalina.realm.MemoryRealm
pathname=webapps/webapp1/users.xml /
/Host

Host name=www.domain2.com debug=0 appBase=webapps
unpackWARs=true
   Context path= docBase=webapp2 debug=0/
   Realm className=org.apache.catalina.realm.MemoryRealm
pathname=webapps/webapp2/users.xml /
/Host

Thanks much,
Ryan Agler
  



-
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: Response status 207

2002-10-09 Thread Vadim Gritsenko

Michael Homeijer wrote:

Hi,

I need to send a response status 207 to the client. Is there a way to do
this in Cocoon? I expected this parameter to be in a serializer, but cant
find one.


map:serialize status-code=207/

Does this help?

Vadim

TIA,
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: General questions about caching in Cocoon

2002-10-09 Thread Vadim Gritsenko

Lenz, Evan wrote:

Does Cocoon provide a mechanism by which all pages on the site can be cached
(perhaps via a crawler)?


You can try indexer (see docs search demo).


 I'm aware of the command-line interface (and had
trouble getting the crawler to get past the first page, but that's another
story). Ultimately, I would like to use Cocoon as a servlet but have as many
pages cached as possible at the click of a button, as opposed to waiting
for each page to be requested. I suppose this could be done externally (with
my own crawler) but I was wondering if Cocoon had some built-in mechanism
for doing this.

Also, I am building a site that has three versions per page (Flash,
non-Flash, etc.) and that uses cookies to set a user's preference. All of my
cookie logic is specified in sitemap.xmap, so I am already committed to
using Cocoon as a servlet. Are there caching issues with such an approach?


No. If done properly, every page will have then three cache entries: 
flash, non-flash, ...


If performance ultimately becomes a problem, I suppose I could statically
generate most of the pages and just use readers for each version of each
page, but that wouldn't be ideal, as certain portions of the site are indeed
dynamic.


Better yet, try cache like Squid in front of Cocoon.


Finally, if anyone has any words of wisdom with respect to using Cocoon for
serving multiple versions of a page (from the same URL), I'd be happy to
hear them.


Study http headers (like Vary:) and use cache in front of cocoon - these 
together can make lots of requests serve from cache.

Vadim


Thanks,
Evan
  




-
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: URL caching in pipelines

2002-10-09 Thread Vadim Gritsenko

Miles Elam wrote:

 I want to put a Slashdot feed on my web page with the following (out 
 of context for brevity):

 pipeline
  map:match pattern=feeds/slashdot.org
map:generate src=http://slashdot.org/slashdot.xml/
map:serialize type=xml/
  /map:match
 /pipeline

 This works fine, but the server opens a socket to Slashdot on every 
 request to my page.  If my site gets some traffic, Slashdot will not 
 be happy with me.  Further, my bandwidth usage goes up.  And when 
 Slashdot (and others) become slow, my site will become slow right 
 along with them.  None is particularly appealing.

 From the Slashdot syndication page (slashcode): Do whatever you want, 
 but *don't* access the file more than once every 30 minutes.

 I went hunting in the mail archives for user and dev and came up with 
 the following:

 pipeline expires=now plus 30 minutes
  map:match pattern=feeds/slashdot.org
map:generate src=http://slashdot.org/slashdot.xml/
map:serialize type=xml/
  /map:match
 /pipeline

 No difference.  My server's still hitting Slashdot over and over.  I 
 tried telnet-ing to the port to at least check for expires headers. 
 No dice.  I looked at HttpHeaderAction but that doesn't seem to touch 
 Cocoon's cache at all (so of limited use to me).  I've used both 2.0.3 
 and 2.1 CVS (as of two weeks ago).

 A part of me smiles when I think that if Slashdot ever slashdotted 
 me, they would be somewhat slashdotted themselves, but this is not my 
 intent and I very much want to be a decent feed client.

 Anyone have any ideas?  ...preferably with little stress on my server.


If you have not found solution yet... Extend FileGenerator and override 
generateKey() and generateValidity() methods.
generateKey() may return something like HashUtil.hash(this.source), and 
generateValidity() can return new DeltaTimeCacheValidity(30) to cache 
response for 30 minutes.

See cacheable.xsp for sample code.

Vadim



 - Miles Elam




-
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: + character in source filename

2002-10-09 Thread Vadim Gritsenko

Upayavira wrote:

Dear All,

I'm using Cocoon to apply a new style to an existing site, i.e. HTML-XML-HTML. So 
far, it is working very well, however:

In the original site, there are a few HTML files that have + characters in the 
filename, 
e.g. mind+body.html. When used as the source for a pipeline, I get:

A name contained an invalid character. Error processing resource 
'http://localhost:8080/cocoon/mind+body.xml' Line 1, Position 410


Try %2B instead of '+':

http://localhost:8080/cocoon/mind%2Bbody.xml


Vadim


The sitemap fragment is simple:
  map:match pattern=**.xml
  map:generate type=html src=html/{1}.html/
  map:transform src=xsl/tidy/tidy.xsl/ 
  map:serialize type=xml/
   /map:match

Any ideas how I can get around having to rename the source files, and thus break 
compatability with the existing site?

Regards,

Upayavira
  



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

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




Re: Pipeline...

2002-10-09 Thread Vadim Gritsenko

Mauro Daniel Ardolino wrote:

Thanks a lot!!  It works fine.


Although it works fine that's not what you really need.

To get best out of Cocoon, you need to make logicsheet (read more on 
logicsheets in the cocoon docs) out of your

logic/prueba.xsl and use this logicsheet. See XSP sample which uses custom logicsheet 
in logicsheet.xsp file - it's good place to start.


Vadim



-- Mauro

On Mon, 7 Oct 2002, Joerg Heinicke wrote:

  

Hello Mauro,

you need two matches:

map:match pattern=prueba.xsp
   map:generate type=file src=content/prueba.xml/
   map:transform src=logic/prueba.xsl /
   map:serialize type=xml/
/map:match

map:match pattern=prueba.xml
   map:generate type=xsp src=cocoon://prueba.xsp/
   map:transform src=style/prueba_to_html.xsl/
   map:serialize type=html/
/map:match

Hope that's what you you want. At least it's that what I understand from 
your two mails ;-)

Regards,

Joerg

Mauro Daniel Ardolino wrote:


Hello!
I cannot understand how to configure a pipeline for this:
I have a xml-file and a xsl-file(logic).  Applying them I want to obtain a
xsp page and then apply another xsl-file(style) to obtain a html-file.

Well, I've made this pipeline in my sitemap.xmap:

   map:match pattern=prueba.xml
map:generate  type=file src=content/prueba.xml/
map:transform src=logic/prueba.xsl /
map:transform src=style/prueba_to_html.xsl/
map:serialize type=html/
   /map:match

If I comment this line:
map:transform src=style/prueba_to_html.xsl/
...I obtain the xsp page.
But it doesn't transform to a xml-file to after apply the other 
xsl-style-file.

How can I do that?

Thanks in advance.

Mauro
  





-
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: XIndice inside XSP (using eXist logicsheet), how?

2002-10-09 Thread Vadim Gritsenko

Josema Alonso wrote:

Hello.

I have XIndice working with Cocoon. I followed the directions at
Cocooncenter and everything is going fine when requesting XMLDB URIs. Now
I'd want to have a XSP querying the database so I could encapsulate the DB
calls and pass parameters easily.


Why don't you use cinclude?

Vadim



 I searched trough the archives and found
posts about the use of eXist logicsheet with XIndice inside Cocoon, but none
of them say anything about how to configure it.

I'm trying it but can't make it work. Has anybody tried and suceeded?

Oh, if you have any other solution or idea on how to make XIndice work
inside XSP, please let me know. I hope I could finally make it and write a
How-To. I really miss it.

Thanks.
  





-
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: Looking for most stable versions of JDK+Tomcat+Cocoon

2002-10-09 Thread Vadim Gritsenko

exta zi wrote:

Whats the most stable configuration of
JDK+Tomcat+Cocoon?

I using next binaries:
JDK 1.4.1FCS
+ tomcat-4.1.12-LE-jdk14
+ cocoon-2.0.3-vm14-bin

sometimes it works and sometime I get exception:

Cocoon 2 - Internal server error



type fatal

message Language Exception

description org.apache.cocoon.ProcessingException:
Language Exception:
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap: Line 0, column 0: error:
java.io.IOException: read error 1 error 


You can get this with 2.0.3 if you make an error in the sitemap.xmap. 
2.0.4-dev has better error reporting in this particular case.


Vadim



sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Language
Exception:
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap:
Line 0, column 0: 
error: java.io.IOException: read error
1 error

   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:340)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:292)
   at
org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
   at java.lang.Thread.run(Thread.java:536)
Caused by:
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap:
Line 0, column 0: 
error: java.io.IOException: read error
1 error

   at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:243)
   at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:207)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:388)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:333)
   ... 3 more
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap:
Line 0, column 0: 
error: java.io.IOException: read error
1 error

   at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:243)
   at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:207)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:388)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:333)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:292)
   at
org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
   at java.lang.Thread.run(Thread.java:536)


request-uri

/cocoon/

path-info

#

Please advice me about most stable configuration of
JDK,TomcatCocoon.

Thanks in advance!
  





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

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




Re: problem with NT

2002-10-09 Thread Vadim Gritsenko

Robert Siqueira wrote:

Iam installing cocoon 2.0.1 + tomcat 4.0.3 in winnt 4.0... So, when I


Advice: Upgrade tomcat 4.0.3 as soon as possible, to at least version 
4.0.4 (known to be stable).

If you can not, read cocoon install guide: it goes in deep details on 
how to make 4.0.3 work.

Vadim


start
the cocoon I get the follow error:

==
type Exception report

message Internal Server Error

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

exception

javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw
exception
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)

 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

 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:2343)

 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:1012)

 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)

 at java.lang.Thread.run(Unknown Source)


root cause

java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1631)

 at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:926)

 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)

 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.configure(ExcaliburComponentManager.java:408)

 at org.apache.cocoon.Cocoon.configure(Cocoon.java:406)
 at org.apache.cocoon.Cocoon.initialize(Cocoon.java:267)
 at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:991)

 at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:308)

 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)

 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

 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:2343)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at

Re: Sitemap wildcards

2002-10-09 Thread Vadim Gritsenko

Robin Wyles wrote:

Hi All,

I am familiar with the user of wildcards in matchers, and the use of the
resulting sitemap variables {1}, {../1} etc. But my question is this:

Is there a sitemap variable that corresponds to the matched pattern for the
current matcher? For example in the following matcher:

map:match pattern=home
map:generate type=file src=docs/home.xml /
map:call resource=XHTML /
/map:match


is there a variable I can use this will return home as the value?


All Wildcard/Regexp matchers (IIRC) should return whole pattern string 
in the {0} variable.

Vadim


 I would
like to have an action-set/resource that uses the matched pattern as a
parameter. I can then use this in all my matchers without having to set the
parameter manually for each one.

Thanks in advance,

Robin Wyles
  



-
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: saxon as default transformer + xalan also available?

2002-10-09 Thread Vadim Gritsenko

gv wrote:

Hello,

Because of some quirks in both Saxon  Xalan, I would
like to set Saxon to be my default XSLT transformer,
then add Xalan to be available when I need it (in the
sitemap: map:transformer type=xslt-xalan...)

I have the first part working fine (Saxon as default).
To get Xalan working too, I'm vaguely aware that I
have to add another transformer to my sitemap, and
maybe add a component into cocoon.xconf. Anyone know
how to do this? I'm using Cocoon 2.0.3.


Read: http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html

Should help


Vadim




Thanks,
John
  





-
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: Xindice logicsheet - initial success

2002-10-09 Thread Vadim Gritsenko

Josema Alonso wrote:

Dear Friends,

Since I got no response to my previous email message,


I've sent email. Why do you need xsp logicsheet and why don't you use 
xmldb protocol with cinclude? This works out of the box, with no effort.

Vadim


 I tried it hard and I
finally could make a xmldb logicsheet to work with Cocoon. It's the eXist
logicsheet. I could only try it for retrieving documents by now but it works
as expected.
I'm too tired now. It's been a lot of hours to make Xindice and the
logicsheet work with Cocoon and I need some rest. I'll test more tomorrow
and I'll try to make a How-To. Now that Isee it running I must say it
shoudn't be so hard...
I hope I could understand better the whole Cocon Wiki thing and make it
available there...if someone can help me a bit here...

Best.

ps: I've browsed carefully the archives and I read the mailing list
frequently. I know there are still some people who can't make Xindice work
with Cocoon. I understand you all... and I must say to all of you...it can
be done! Don't give up! :-)
  




-
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: displaying values in a browser from xsp:logic

2002-09-30 Thread Vadim Gritsenko

Matt MacDougall wrote:

Hello,

I'm having a problem getting the results of a Java function wrapped in
xsp:logic tags to display on my page.  All I would like to do is display
the value of the variables prevurl and nexturl on the page.  This code below
is in an xsl file outside of the main template.  I'm calling this template
within my main one with xsl:apply-templates select=prevnext/

I have the following in an xsl file:

xsl:template match=prevnext


Matt,

Is this a logicsheet? How does relevant portions of your XSP file look 
like? How does pipeline look like?


   xsp:logic
   String next_move_string = 1;
   String prev_move_string = -1;

   String uri = request.getRequestURI();

   xsp-request:set-paramter
name=movenext_move_string/xsp-request:set-paramter;
   String nextquery = request.getQueryString();

   xsp-request:set-paramter
name=moveprev_move_string/xsp-request:set-paramter;
   String prevquery = request.getQueryString();

   String nexturl = uri + nextquery;
   String prevurl = uri + prevquery;
   nexturl = Next;
// just for testing
   prevurl = Prev;
// just for testing
  /xsp:logic
xsp:exprprevurl/xsp:expr
xsp:exprnexturl/xsp:expr
/xsl:template


###

Shouldn't I be seeing the values between those xsp:expr tags?  This is
compiling fine but I only receive an empty output for the prevresult and
nextresult tags.  I've tried several things including xsp:value-of ...


IIRC, there is no xsp:value-of tag exist.

Vadim


but I haven't had any luck.  Does anyone catch any glaring errors here?

Thanks much,

-Matt
  



-
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: Error compiling sitemap_xmap / problems Installing cocoon-2.0.3on fresh jwsdp1_0_01 and j2sdk1.4_0_01

2002-09-30 Thread Vadim Gritsenko

Dario Liberman wrote:

Hello,

I am having problems Installing cocoon-2.0.3 on top of a fresh jwsdp1_0_01
and j2sdk1.4_0_01 installation running on a winNT4.0 SP6a


Is it cocoon binary dist or source dist? Are you trying to deploy 
cocoon.war or unpacked webapp? If it is war file, see recent emails 
about manifest file: it must have some additional entries in order to 
deploy Cocoon as a war archive. Try unpacking webapp and deploying it as 
a directory.

Vadim



At the page the error shows:

Cocoon 2 - Internal server error


type fatal
message Language Exception
description :
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap:
Line 22, column 49: cannot access class Component; file
org\apache\avalon\framework\component\Component.class not found Line 23,
column 53: cannot access class Configurable; file
... more description here...

I send attached the logs.


I tried to solve the problem deleting the following files from the war, but
it seems that it has nothing to do with it:
xml-apis.jar
xercesImpl-2.0.0.jar
xalan-2.3.1.jar
Since I was afraid it would interfere somehow with the same libs in the
jwsdp installation that in fact had the same versions.

Any ideas?


Thanks a lot,
Dario Liberman.


jwsdp is the Java Web Services Development Pack from SUN.
http://java.sun.com/webservices/downloads/webservicespack.html
The Java Web Services Developer Pack v1.0_01 includes the following:
Java XML Pack which includes the following:
Java API for XML Messaging (JAXM) v1.1_01
Java API for XML Processing (JAXP) v1.2_01 (with XML Schema support)
Java API for XML Registries (JAXR) v1.0_02
Java API for XML-based RPC (JAX-RPC) v1.0_01
SOAP with Attachments API for Java (SAAJ) v1.1_02
JavaServer PagesTM Standard Tag Library (JSTL) v1.0.1
Java WSDP Registry Server v1.0_02
Web Application Deployment Tool
Ant Build Tool 1.4.1
Apache Tomcat 4.1.2 container
  





-
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: Cocoon 2, Docbook and Norman Walsh's Stylesheets

2002-09-30 Thread Vadim Gritsenko

Gabriele,

Some comments.

1. Saxon does *not* support incremental processing, thus:
parameter name=incremental-processing value=false/
effectively does nothing.

2. Saxon works with XSP. I do have an app with Saxon only (no Xalan) and 
XSPs. Never had any problem. The only problem is you still need 
Xalan.jar if you are using XPath component.

3. I might be mistaken, but I do not see why Saxon needs to be modified. 
Cocoon  by default will use Xerces parser, not Aelfred, and from Saxon 
only XSLT engine will be used.


Vadim




Gabriele Domenichini wrote:

I have succeded in transforming Docbook to pdf and to html on cocoon 2.0.3 
using the stylesheet by Norman Walsh on the official docbook repository 
(http://docbook.sourceforge.net/projects/xsl/index.html). 
Cocoon has some weakness in doing this and I spent 15 days to make it work 
properly, so if you want save some time and you want to do something similar 
you are interested in this mail.
What I learned is that:

1. While xalan can do docbook transformation to xslfo correctly from the 
command line, on cocoon it can't.

2. If you use Saxon instead of xalan the transformation is almost successful 
but not completly: ie. I lost all the sect1/title.

3. If you use Saxon you loose all the xsp capabilities in cocoon (I want to 
make sql transformation with as400 and Oracle)

4. Incremental processing is not suggested for docbook to pdf transformation

The solutions I have found to this problems thanks to all I have read on the 
mailing lists and on the official site is:
1. Setting up cocoon to use xalan and saxon in alternative (defult: xalan) and 
set incremental processing to false in Saxon

2. Renaming saxon.jar to z-saxon.jar (I am not sure if is necessary but in 
this way works)

3. Modifying Saxon to make it use the parser xerces instead of aelfred 

Let'see theese points in detail

1. Setting up cocoon to use xalan and saxon in alternative (defult: xalan) and 
set incremental processing to false in Saxon.
To do this:
1.1 Put saxon652.jar WEB-INF/lib ( in the cocoon directory of course)

1.2 Here are extracts of  what you have to add in cocoon.xconf and 
sitemap.xmap:

# cocoon.xconf 
component
role=org.apache.cocoon.components.xslt.XSLTProcessor/Saxon
class=org.apache.cocoon.components.xslt.XSLTProcessorImpl
logger=core.xslt-processor
  parameter name=use-store value=true/
  parameter name=incremental-processing value=false/
  parameter name=transformer-factory
value=com.icl.saxon.TransformerFactoryImpl/
/component

# sitemap.xmap
map:transformer name=xslt-saxon pool-grow=2 pool-max=32 pool-min=8
   src=org.apache.cocoon.transformation.TraxTransformer
use-request-parametersfalse/use-request-parameters
use-browser-capabilities-dbfalse/use-browser-capabilities-db

xslt-processor-roleorg.apache.cocoon.components.xslt.XSLTProcessor/Saxon/xslt-processor-role

  /map:transformer

/citationFromAMail.SeeTheReferences

in yor pipeline when you do a transformation from docbook to pdf you will use 
something similar:

map:match pattern=*.pdf
   map:generate src={1}.docbook/
   map:tranform type=xslt-saxon src=WhereverYouPutIt/fo/docbook.xsl/
   map:serialize type=fo2pdf/
/map:match
map:match pattern=*.html
   map:generate src={1}.docbook/
   map:tranform type=xslt-saxon src=WhereverYouPutIt/html/docbook.xsl/
   map:serialize type=fo2pdf/
/map:match

In this way if you will leave xslt as the default type of transformation, you 
will use use xalan and all his xsp capabilities for all the the other cocoon 
functions.

2. Renaming saxon.jar z-saxon.jar (I am not sure that is necessary but in this 
way works)

3. Modifying Saxon to make it use xerces instead of aelfred as parser

Change the content of
META-INF/services/javax.xml.parsers.SAXParserFactory from
com.icl.saxon.aelfred.SAXParserFactoryImpl to
org.apache.xerces.jaxp.SAXParserFactoryImpl. That tells
Saxon to use xerces instead of aelfred as parser.

Don't be worried it is not so complicated: you have to extract the file 
(javax.xml.parsers.SAXParserFactory) from saxon.jar edit it (is a text file) 
and to put it again in the same place in saxon.jar

Conclusion:
I must say that the Saxon and xalan problems in using Norman Walsh's 
stylesheets should be addressed inside cocoon developing activity. It 
shouldn't be so hard to make docbook to pdf transformation work.
Comments are welcome.

Gabriele Domenichini

References:
To use different xslt processors or different behaviour of the same:
http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html

To use saxon in alternative the mail from which I took the solution is: 
(http://www.mail-archive.com/cocoon-users@xml.apache.org/msg15968.html) which 
tell exactly what to do:

To change the behavior of saxon there's a mail 
(http://sources.redhat.com/ml/docbook-apps/2002-q2/msg00397.html) which 
explain three workaround. I have choosen the third
  






Re: Source Writing Transformer: Adding namespaces

2002-09-30 Thread Vadim Gritsenko

Alex Romayev wrote:

--- Vadim Gritsenko [EMAIL PROTECTED]
wrote:
  

Alex Romayev wrote:



I'm still struggling with this problem.  Let me try
  

to state it more clearly:

I would like to write XML to a file.  My XML
  

contain


namespaces.  I declare the namespaces in the root
element, just the way I would like it to be in the
file and surround my XML with source:write tag. 
However, SourceWritingTransformer seems to be
  

dropping


the namespace declarations and writing everything
else!

Is this is a bug within the transformer or is there
another way of getting the namespace declarations
written out?

  

Could be a bug. Try moving ns declaration into the
root tag of the 
document you are writing, i.e. moving declaration
inside the write tag.

Vadim



I have, still the same result...  Any other ideas?


Nope. You can start debugging.
:)

Vadim


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: Cocoon 2.0.3 Tomcat 4.1.10 sub sitemap problem - failed sitemap'inheritance' - anyone seen this and have any ideas?

2002-09-30 Thread Vadim Gritsenko

Christopher Watson wrote:

Hello

I'm having problems with a sub-sitemap

I'm on 2.0.3 release. It works on tomcat 4.0.1 and 4.0.4 but doesn't with
4.1.10 or 4.1.12

The example subsitemap http://10.1.1.2:8080/cocoon203/sub/ shows the same
problem.
It's a problem of sitemap 'inheritance' as far as I can tell.

The error I get from the example URL above is as follows ..

Description:org.apache.avalon.framework.configuration.ConfigurationException
: Type 'wildcard' is not defined for 'match' at
file:/F:/jakarta-tomcat/webapps/cocoon203/sub/sitemap.xmap:21:26

True, the wildcard matcher component is not declared in the subsitemap, but
used to 'inherit' it from the 'root' sitemap
at file:/F:/jakarta-tomcat/webapps/cocoon203/sitemap.xmap in the above
example.

If I declare the lost wildcard matcher component in the subsitemap then it
works, or at least, I get the next error caused by the failed 'inheritance'

So I guess I have a workaround in declaring everything in the subsitemap,
but this kind of defeats the object !?

I've just done a clean install on tomcat 4.0.1 (works) and 4.1.10 (doesn't)
to check my sanity on this!
It's weird that the version of Tomcat should create this different
behaviour.
Does anyone have any idea what's going on?


Seems you have switched to interpreted sitemap which (IIRC) in 2.0.3 
release had some bugs. These were fixed later on, in 2.0.4-dev.

Vadim


Christopher
  





-
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: Cocoon 2.0.3 Tomcat 4.1.10 sub sitemap problem - failed sitemap'inheritance' - anyone seen this and have any ideas?

2002-09-30 Thread Vadim Gritsenko

Christopher Watson wrote:
...

These were fixed later on, in 2.0.4-dev.



I'd rather use the interpreted sitemap. It seems to improve reload
dramatically!

Could you tell me what files I would have to update, and how to get them?
I looked at http://cvs.apache.org/viewcvs.cgi but don't see a 2.0.4-dev
branch ...
How would I get 2.0.4-dev ?


It's in cocoon_2_0_3_branch

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

2002-09-30 Thread Vadim Gritsenko

Zein wrote:

Thank you! map:handle-errors works fine!

Just one more question:

Is it possible to use map:select-tag in map:handle-errors to prepare the
thrown exception
for html or wml whichever device the query came from?


Yes. map:select, map:match, map:action - all are allowed.

Vadim



regards,
Zein


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 2:26 PM
Subject: Re: [newbie] ESQL Error Handling


  

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: displaying values in a browser from xsp:logic

2002-09-30 Thread Vadim Gritsenko

Hey Matt,

I see that you have:
?xml version=1.0?
?cocoon-process type=xsp?
?cocoon-process type=xslt?
?xml-stylesheet href=xsl/report.xsl type=text/xsl?

in your xml file. This makes me think that you use Cocoon 1. You should 
be stating this from the very beginning - I was assuming that you have 
Cocoon 2.


Regarding your problem... This bit seems Ok to me:
  prevresult
xsp:exprprevurl/xsp:expr
  /prevresult
  nextresult   
xsp:exprnexturl/xsp:expr
  /nextresult
  /page
/xsp:page

I can recommend you to check generated Java code and see what happens 
there, do you get desired result or not. You can try also run you XSP 
page without XSLT transform first, just to check that it procuces 
desired output:

?xml version=1.0?
?cocoon-process type=xsp?
!-- xslt process removed  --

xsp:page
  xmlns:xsp=http://www.apache.org/1999/XSP/Core;
  xmlns:xsp-request=http://apache.org/xsp/request/2.0;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;



I won't be able to help more, I don't remember Cocoon 1 much.

Vadim



Matt MacDougall wrote:

Here's the full xsl page (minus a little html to save space).  I've attached
the full report.xml file as well in case it is needed ... thanks again for
the help, this stuff was dumped in my lap and I'm obviously a newbie ;-)

-Matt
  

... attached files go here ...



-
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: How to create db conn in action to use in esql or sql?

2002-09-27 Thread Vadim Gritsenko

Timothy Larson wrote:

Each session needs to be logged into the database with a
different username and password.


Do you think it's a good idea?


How can I do this using a database pool?


There is no way unless you know SQL command to do it. The hole purpose 
of a pool is to connect once, and avoid a lot of costly connects in a run.

Vadim


Tim

  

[EMAIL PROTECTED] 09/26/02 04:33PM 
  

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

2002-09-27 Thread Vadim Gritsenko

Alex Romayev wrote:

I'm still struggling with this problem.  Let me try to
state it more clearly:

I would like to write XML to a file.  My XML contain
namespaces.  I declare the namespaces in the root
element, just the way I would like it to be in the
file and surround my XML with source:write tag. 
However, SourceWritingTransformer seems to be dropping
the namespace declarations and writing everything
else!

Is this is a bug within the transformer or is there
another way of getting the namespace declarations
written out?


Could be a bug. Try moving ns declaration into the root tag of the 
document you are writing, i.e. moving declaration inside the write tag.

Vadim



I would appreciate any help.

-Alex

--- Alex Romayev [EMAIL PROTECTED] wrote:
  

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]




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

2002-09-27 Thread Vadim Gritsenko

Timothy Larson wrote:

I am interfacing to an established system
and cannot change the security model.

It works like this:
1) Login as specific user with rights to public objects only
2) Run a report
3) Report does key exchange to prove its authenticity to the db
4) Database yields key to upgraded security role
5) Report uses key to switch to the new role
6) Report accesses secured objects
7) Report switches back to role with public access only
8) Repeat from step 2 or proceed to step 8
8) Logout now or when session expires or is invalidated

The access rights granted are based on a combination of the
logged-in user and the specific report being run.

To interface with this system I wrote some working java code to
do the key exchange with the db and change the security role.

How can I integrate this with the reports I wrote in xsp/esql and xsl?


There were an ability to create connection for one request in ESQL. You 
can try to use it.

Vadim



Tim

  

[EMAIL PROTECTED] 09/27/02 08:34AM 


Timothy Larson wrote:


Each session needs to be logged into the database with a
different username and password.
  

Do you think it's a good idea?



How can I do this using a database pool?
  

There is no way unless you know SQL command to do it. The hole purpose 
of a pool is to connect once, and avoid a lot of costly connects in a run.

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




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




Re: [AUTH-FRAMEWORK] Session in xsp.

2002-09-25 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

Can I use session variables into a XSP? I cannot reach it only trought a 
transformation. How I must declare the name space to use it in XSP since


Antonio,



xsp:page
xmlns:xsp-session=http://apache.org/xsp/session/2.0; 
create-session=true
xmlns:xsp=http://apache.org/xsp;

does not work.


This is to access Cocoon session object using session logicsheet. Read 
more on:
http://xml.apache.org/cocoon/userdocs/xsp/session.html


Currently I need to use:

   xmlns:session=http://cocoon.apache.org/session/1.0; 


This one allows you to work with /session framework, /also known as 
/sunShine, and has nothing to do with sessions above. This sunShine 
sessions are available via transformer. Read more on:
/http://xml.apache.org/cocoon/developing/webapps/sunshine.html
/
Please go through examples also.


Regards,
Vadim/


and then make a transformation before the use: for example (sitemap):

!-- Welcome page - Protected --
  map:match pattern=welcome
map:act type=auth-protect
   map:parameter name=handler value=myhandler/
map:generate src=docs/welcome.xsp type=serverpages/
map:transform type=session/
  ^^
   - The transform needed currently :(
/map:act
map:transform src=stylesheets/mystyle.xsl/
map:serialize/
  /map:match

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: action as input for a generator ??

2002-09-25 Thread Vadim Gritsenko

Barbara Post wrote:

just an idea : you have your xml file, you transform it with xslt, and your
stylesheet calls some java beans you use through xalan java extension. have
a look on Apache's xalan-j page.
Globally : you have a namespace for java,
you use your beans this way :
xsl:variable name=mybeanxsl:value-of
select=java:package.MyBean.new()//xsl:variable

then to call a function :

xsl:value-of select=myfunction($mybean,$arg0,$arg1)/

given that the parameters (arguments) are defined as xsl variables.

HTH but this is sometimes VERY useful because java is roughly quicker to
execute that xslt...


It worth considering writing own transformer then. By example of session 
transformer, SQL, LDAP, etc.

Vadim


My 2 cents ;-)

Babs
--
website : www.babsfrance.fr.st
ICQ : 135868405
- Original Message -
From: Daniel Pfuhl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 7:11 PM
Subject: action as input for a generator ??


  

hi

imagine the following scenario:

i have an xml-src which i have to enrich with
different
elements depending on the input document. with other
words the input xml will scale my process. in this
process i have to call different methods not driven
by cocoon but another underlaying system.
so i was thinking of using an action which will take
the input src and after processing it, it will return
the final document for transformation and
serialization
controled by the sitemap.

now my question(s):

is it possible to use an action as the input for
a generator or do i have to write my own generator?

i also thought of xsp, but i think it is to complex
to do it this way. i want to separate the logic which
processes the input as an autonomic module.

fyi: before i only used actions to manage formdata,
e.g.
manipulating xml-files depending on formdata. but now
i have no real file i can write to - so i have to
manipulate it to transform and serialize it directly
afterwards.

it would be very nice if somebody could give me an
advice how a solution can look like!!

thanks in advance !!

daniel






-
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: The DataSourceComponent which returning OtherConnection

2002-09-25 Thread Vadim Gritsenko

Geoff Howard wrote:

I think components have to be declared in cocoon.xconf
in order for the container to initialize them, or even
to find them.


If I'm not mistaken, container *can* create and return you a component 
which is not declared in cocoon.xconf, but it must be declared with 
default class name in the reoles file.


  There are currently two ways of doing
this: creating an entry in .roles, or declaring it
using generic syntax in cocoon.xconf.  Since I think
the first requires rebuilding cocoon,


There is some way to specify custom (user) roles file. Not sure of 
syntax though.


 I'd recommend
trying the second.  I think you'll need either a
component-instance/ or component/ declaration
depending on your need.  Components are Avalon
components, defined by the project at
http://jakarta.apache.org/avalon which I can't access
right now. (Seems to be their webserver).  I also
don't have easy access to the component declaration I
did right now or I'd send you an example.  There are
examples of generic declarations in cocoon.xconf which
should be all you need, except to note that your
declaration needs to be a child of the root cocoon
element, whereas the examples I'm seeing in
cocoon.xconf have custom named parent elements which
you won't have (unless you go the .roles route).


There is example of component/ also on:
http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html


Disclaimer - I'm not a guru on this - only did it
once. 

Hope I haven't misunderstood your issue.


All you told is correct.

Vadim


Geoff Howard
  



-
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-25 Thread Vadim Gritsenko

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?

Vadim



 Deployment succeeds and the application runs ... until I try to hit an 
 XSP page. This is the exception I get:

 Description:org.apache.cocoon.ProcessingException: Language Exception: 
 org.apache.cocoon.components.language.LanguageException: Error 
 compiling login_xsp:
 Line 14, column 23:  cannot access class InputSource; file 
 org/xml/sax/InputSource.class not found
 Line 15, column 23:  cannot access class SAXException; file 
 org/xml/sax/SAXException.class not found
 Line 16, column 31:  cannot access class AttributesImpl; file 
 org/xml/sax/helpers/AttributesImpl.class not found

 ... and so on for lots of classes.

 I have noticed the following: when a webapp is deployed this way, 
 Tomcat does not unpack the war file. Cocoon's work directory is 
 however created under $TOMCAT_HOME/work.

 Maybe this is a FAQ, but currently xml.apache.org seems to be 
 unreachable from here.

 Ugo



-
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: Transforming question

2002-09-25 Thread Vadim Gritsenko

Luca Morandini wrote:

Ganael,

AFAIK, the possibility of outputting XSL results to more than one document is not a 
standard XSLT 1.0 feature (in XSLT 2.0 it will
be included, though), hence, I suppose you should redesign that stylesheet.


Yes, you need to split it up on several pieces.


You could have five different pipelines (one for every page section) and then a sixth 
one to aggregate those documents into a final HTML page.


It's still possible to use frames though: just have several pipelines 
(or two: one for frameset, another for frames).

Vadim


If you look at the Cocoon docs there are some samples on aggregating; moreover, this 
issue has been discussed many times on this
mailing list, just search for map:aggregate.

Best regards,

P.S.
Next time, use plain text for your messages to this mailing list, please.

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

-Original Message-
From: Ganael LAPLANCHE [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 5:39 PM
To: [EMAIL PROTECTED]
Subject: Transforming question


Hi all,

I am modifying a web site that used php/saxon calls to generate html, to be presented 
via cocoon instead.
The web site was using an xsl page that produced 5 html documents from a single xml 
one (the html generated is the TOC, the frames,
etc...). The user could view the page by clicking on a link to the main document (the 
one that declared the frames and included the
other documents). Since I'm new to cocoon, I was wondering how I could view my 
document using tansformers/serializers. Is my xsl
page re-usable ? How can I generate the five documents in memory and view the main 
one ??? Is it possible ???

I'm a bit lost with cocoon,
if someone could help me...

Thank you very much.
Gan.
  





-
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: [AUTH-FRAMEWORK] Session in xsp.

2002-09-25 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

Thanks for the info Vadim.

I am using 2.1-CVS. I read it and currently I am working on the 
auth-framework. The question is that we cannot access to 

session:getxml from the called session transformer using XSP. IT does not 
work. I know there is a bug that prevent the use of 2 pipelines to make a 
little workaround. Then is Cocoon will continue featuring XSP, we need a way 
to use the session:getxml to get the values we stored there from a XSP.

I am just trying to help in this XSP issue. All your comments are welcome. I 
am juat a newbie trying to make use of Cocoon. Like a Cocoon guru all your 
comments are always welcome to me. Thanks for help me to understand the 
Cocoon way. I believe in Cocoon. But currently I dont know if I get the right 
way using XSP. :-/ What do you think?


I'm aware of this limitation of XSP / session transformer. In Cocoon, we 
have xscript logicsheet and session transformer which provide somewhat 
similar functionality but do not allow sharing of data between them. It 
is on TODO list to make these two parts play well together. It involves 
changes in how xscript's variables are represented in memory, and may be 
some changes to sessions transformer on way how it stores session 
contexts.

I'm confident we will fix this issue, sooner or later, it just always 
matter of time.

Vadim


Regards,

Antonio Gallardo.



El Miércoles, 25 de Septiembre de 2002 12:21, Vadim Gritsenko escribió:
  

Antonio Gallardo Rivera wrote:


Can I use session variables into a XSP? I cannot reach it only trought a
transformation. How I must declare the name space to use it in XSP since
  

Antonio,



xsp:page
   xmlns:xsp-session=http://apache.org/xsp/session/2.0;
create-session=true
   xmlns:xsp=http://apache.org/xsp;

does not work.
  

This is to access Cocoon session object using session logicsheet. Read
more on:
http://xml.apache.org/cocoon/userdocs/xsp/session.html



Currently I need to use:

 xmlns:session=http://cocoon.apache.org/session/1.0;
  

This one allows you to work with /session framework, /also known as
/sunShine, and has nothing to do with sessions above. This sunShine
sessions are available via transformer. Read more on:
/http://xml.apache.org/cocoon/developing/webapps/sunshine.html
/
Please go through examples also.


Regards,
Vadim/



and then make a transformation before the use: for example (sitemap):

!-- Welcome page - Protected --
 map:match pattern=welcome
   map:act type=auth-protect
 map:parameter name=handler value=myhandler/
   map:generate src=docs/welcome.xsp type=serverpages/
   map:transform type=session/
^^
 - The transform needed currently :(
   /map:act
   map:transform src=stylesheets/mystyle.xsl/
   map:serialize/
 /map:match

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

2002-09-25 Thread Vadim Gritsenko

J.Pietschmann wrote:

 Przybilla, Frank wrote:

 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.


 Ah, the problem with parts of hyphenated word jumping around
 is actually a FOP bug. Yes, it depends on the parser, more
 specific, it depends on how the parser passes text up.
 The bug is fixed in CVS (maintenance branch).


Can you clarify - is it Cocoon's, Xalan's, or FOP's CVS?


PS How can I better call you; J. sounds strange :)

Vadim


 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: Problem with homemade logicsheet

2002-09-25 Thread Vadim Gritsenko

Alan Hodgkinson wrote:

Jeff Turner wrote:

Alan Hodgkinson wrote:
...


  xsp:styesheet version=1.0
  

 ^^^


  ^
  |
Arrrg!+--  'styesheet' != 'stylesheet'

That solved part of the problem. As you pointed out, I also 
had 'xsp' instead of 'xsl'. It came from copying an XSP 
page in order to get the correct namespaces. Oops! 

Jeff: many thanks for you help!

..but unfortunately it doesn't solve the entire problem.

That is, I cannot make the technique described in Matthew and 
Carston's book (and the Cocoon web site) work where you use 
the 'context:' protocol to define the location of xsl file. 

  builtin-logicsheet
parameter name=prefix value=lop/
parameter name=uri
value=http://softxs.ch/cocoon/logicalOutput/1.0/
parameter name=href value=context://logicsheets/lop.xsl/
  /builtin-logicsheet

I've tried the following variations in cocoon.xconf for the 
logicsheet href. All of them fail:

  context://lop.xsl
  context://logicsheets/lop.xsl
  file:///lop.xsl
  file:///logicsheets/lop.xsl

..they all cause a resource not found error in the logs.

As a last resort I tried:

  logicsheets/lop.xsl

E.g. with no protocol in the href. This appears to work, but 
don't ask me why! For now it's an acceptible work-around, but it 
definitely does not seem to be working as documented. Strange.

Note that I can also make the logic sheet work if I configure my 
cocoon.xconf as follows:

  builtin-logicsheet
parameter name=prefix value=lop/
parameter name=uri
value=http://softxs.ch/cocoon/logicalOutput/1.0/
parameter name=href value=resource://ch/softxs/cocoon/lop.xsl/
  /builtin-logicsheet

but this requires me to create a jar file with the appropriate
structure that I place in WEB-INF/lib. And then you have to bounce
Tomcat, makeing the developement cycle much slower.

I'd appreciate any feedback on the way the href in cocoon.xconf
is supposed to function.


Is this the same bug?
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10473

Vadim


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: [FYI] Article on JavaWorld

2002-09-24 Thread Vadim Gritsenko

Justin wrote:

 Is it me, or are there some errors in his sitemap examples?


Yes, it should have matcher instead of pipeline.

Vadim



 Justin

 On Tuesday, September 24, 2002, at 07:24  AM, Stephan Michels wrote:


 Transform data into Web applications with Cocoon

 http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon.html

 Have fun...





-
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: Sun vs. PC

2002-09-24 Thread Vadim Gritsenko

Christopher Painter-Wakefield wrote:

The most obvious thing that jumps out here other than raw MHz is that you
are running C2.1-dev on the Sun and C2.0.3 on the PC, so you aren't really
comparing apples to apples.  Maybe that isn't a factor,


It is a factor. Of course not x10, but could be close to x2.

Vadim


but I would
certainly want to check it out before anything else.  Especially with that
-dev dangling on the end.  Ditto with JDK versions - you could have a
quirky JDK1.4 release or something.  And ditto again with Tomcat versions;
you can run the full Tomcat 4.0.4 (not LE) under JDK1.4, works just fine.
You should also check that you have a level playing field in every other
way, e.g., make sure your Sun isn't running something else (like a database
server), make sure the Sun is on the same piece of network (instead of
across a slow T1 to another building), etc.

It appears you have an older Sun workstation, while your PC's are very,
very new technology.  If you are planning to deploy to a newer Sun server,
like a Sun Fire 280R with 900 MHz UltraSparc III Cu and 1 GB of memory, I
imagine you'll get better results.

FWIW, we deploy on one of Sun's cheapest servers, which has a single 500
MHz UltraSparc IIe and 1GB of memory.  The server is dedicated only for our
application.  On the other hand, we develop on older PC's with 500 MHz and
1 HGz PIII's and 256 MB of memory.  Performance on the servers is quite a
bit better than on our PC's :)

-Christopher



Hi all

We're developing a cocoon-application (so far only xslt pipelines,
no apps) on a SunOS server.
Everything works out well, but we're experiencing heavy
performance problems. To make sure our application could
be running fast, we tested it on a PC, which resulted in more
than ten times faster response times. Which would be perfect,
only SUN is our target platform.

Are there any known issues about different jdk-versions?
tomcat-versions? cocoon-versions? SunOS?, pitfalls? any
tips to boost performance OR is our Sun Machine simply to slow?
(see technical spec details below)

Thanks in advance.
Thomas Brusa


below technical spec about our boxes:
==
SUN:
SunOS 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-60
400Mhz
512Mb Physical Memory
jakarta-tomcat-4.0.4-LE-jdk14
cocoon-2.1-dev (xml-cocoon2_20020822041959)
jdk 1.4.0_01-b03
==
PC:
W2k
2.4Ghz
512Mb Physical Memory
jakarta-tomcat-4.0.4
cocoon-2.0.3
jdk 1.3.1_04
==
  





-
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: form validator

2002-09-23 Thread Vadim Gritsenko

Gabor Bartha wrote:

 Hi,

 I've got a page with input parameters, I want to post it via 
 formvalidator.
 I've got the descriptor.xml, with the required parameters. eg:

 ?xml version=1.0?
 root
   parameter name=persons type=long min=2 default=9 
 nullable=yes/

   constraint-set name=car-reservation
   validate name=persons/
/constraint-set
 /root

 If I don't give value to the persons input parameter (at the site 
 into the textbox) the formvalidator drop the default page back, not 
 the next page.

 I don't understand Why? - I defined it with nullable=yes.

 So - I mean - if I define a parameter at the descriptor.xml I need to 
 post it with an exact value?


Do you have latest Cocoon release?

Vadim


 Thanks,
 Gabor





-
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: turning off storeJanitor

2002-09-23 Thread Vadim Gritsenko

kyle koss wrote:

I want to know if it's possible to disable the storeJanitor, as I would
like the JVM to manage the garbage collection itself. We are using
jdk1.4, and I have read that it is actually more efficient to do it this
way, and that calls to the gc in a program can actually slow it down.


Who told you that StoreJanitor calls gc? :)

Anyway, set cleanupthreadinterval high enough, freememory low enough, 
and it won't bother you. Just make sure you don't have large maxobjects 
(cache-transient's parameter) and you have enough memory.

Vadim



Please advise,
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]




Re: [HELP]Failed to execute pipeline.

2002-09-22 Thread Vadim Gritsenko

Braun wrote:

 I downloaded Cocoon 2.1 from CVS. I'am using Tomcat4 with Debian Linux 3.0
 and J2sdk1.3. When I tried to start the XMLForms-Example I got the 
 following message:
 Description:org.apache.cocoon.ProcessingException: Failed to execute 
 pipeline.: java.lang.ArrayIndexOutOfBoundsException
 What might be the reason ?


May be this:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12714
?


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: Cocoon 2.0.3 and CastorTransformer

2002-09-20 Thread Vadim Gritsenko

Werner Guttmann wrote:
...

PS Btw, the Castor sample shipped with Cocoon 2.0.3 has an error in the
namespace documentation of the test.xml file, iow it really reads

?xml version=1.0?
zoo xmlns:castor=http://castor.exolab.org/cocoontransfomer;


Actually, this is not error in demo; it's a typo in a transformer 
itself. Thanks for pointing this out.

This namespace typo can easily be fixed because this transformer is 
still in the scratchpad (== alpha).

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: Deploying Cocoon 2.0.3 in JBoss 3.0.2 with Embedded Catalina4.0. 4

2002-09-20 Thread Vadim Gritsenko

Klaus Richarz wrote:

Hello,

we are using cocoon with JBoss/Catalina. We have packed the cocoon.war file
into an .ear file to set the context-root to /cocoon.
Everything works fine with 3.0.0/4.0.3  JDK 1.3.1_03.

Now we have upgraded JBoss/Catalina from 3.0.0/4.0.3 to 3.0.2/4.0.4.
Result: we cannot deploy Cocoon 2.0.3 anymore - worse: we cannot deploy our
enterprise-application using cocoon anymore.

Stack Trace:
java.io.FileNotFoundException:
C:\MIDDLE_TIER\jboss-3.0.2_tomcat-4.0.4\bin\jndi:\localhost\sitemap.xmap
(Die Syntax für den Dateinamen, Verzeichnisnamen oder die
Datenträgerbezeichnung ist falsch)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.(FileInputStream.java:59)
   at java.io.FileInputStream.(FileInputStream.java:90)
   at
org.apache.cocoon.components.source.FileSource.getInputStream(FileSource.jav
a:140)
   at
org.apache.cocoon.components.source.AbstractStreamSource.getInputSource(Abst
ractStreamSource.java:161)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:367)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:333)
   at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:292)
   at org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
   at java.lang.Thread.run(Thread.java:479)

Any help would be appreciated.


Here is any help: Check how filename was created, why jndi: in here. 
See in the log files how sitemap name was resolved.


Vadim



mfg

Klaus Richarz  Andre Hegerath
Hamburger Berater Team GmbH
Hamburg, Germany
  



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

2002-09-20 Thread Vadim Gritsenko

Andrei Svirida wrote:

Hi all,

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)


How did you do this? i.e., what was the url to deploy the war?



After deployment the manager reports the Cocoon application as
running

whenn calling /cocoon on my Tomcat Server i get the following error:
--
Cocoon 2 - Internal server error:
description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException:
Error compiling sitemap_xmap: Line 22, column 49: cannot access class Component; file
org/apache/avalon/framework/component/Component.class not found Line 23, column 53:
cannot access class Configurable; file 
org/apache/avalon/framework/configuration/Configurable.class not found Line 24,
column 53: cannot access class Configuration; file 
org/apache/avalon/framework/configuration/Configuration.class not
found Line 25, column 53: cannot access class ConfigurationException; file 
org/apache/avalon/framework/configuration/ConfigurationException.class
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


Not Cocoon but compiler. Compiler did not get correct classpath.

Vadim


for org/apache/avalon/framework/component/Component.class.

When i manualy unpack cocoon.war into  Tomcat/webapps everything
works fine. Due to some circumstances this way of deployment is
unacceptable for the firm i work in.

Please cc your answer to [EMAIL PROTECTED]

Thanks in advance!



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




Re: Cocoon 2.0.3 under Enhydra 3.1

2002-09-20 Thread Vadim Gritsenko

Matthew Hailstone wrote:

Awesome! I changed the xsp file to declare a namespace of:

xmlns:session=http://apache.org/xsp/session/2.0;
  create-session=true

instead of 

xmlns:xsp-session=http://apache.org/xsp/session/2.0;
  create-session=true

and changed all the tags in the file (of course :)

Thank you Vadim.

It now compiles, but I have a new problem.

Forgive me for relentlessly inquiring, but I really have no clue. :)
I am excited that I am actually getting somewhere, which I haven't been
for some time.


...

java.lang.NullPointerException
   at
org.apache.cocoon.components.language.markup.xsp.XSPRequestHelper.setSes
sionAttribute(XSPRequestHelper.java:454)
   at
org.apache.cocoon.www.eval.logic.form_xsp.generate(form_xsp.java:265)
   at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe
nerator.java:226)
   at
  


...

Thoughts?


Bug in your XSP. 99 out of 100 that you are using request or response 
variables before they are initialized, or session before it is created 
(you have to explicitly create session).


Vadim



Matthew
  



-
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: how to prevent logging passwords in request and sessionparams?

2002-09-20 Thread Vadim Gritsenko

Barbara Post wrote:

second question : yes : see rotation tag in WEB-INF/logkit.xconf.


First question: use log categories. Change log level for category where 
username/pwd are logged.If this is sitemap component, you can even 
assign it separate log category.

Vadim


Babs
- Original Message - 
From: Timothy Larson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 6:17 PM
Subject: how to prevent logging passwords in request and sessionparams?


How do you prevent logging of passwords held in request parameters
and session attributes?  I do not want to turn off logging completely.

By the way, is there any sort of automated log rotation for cocoon
to prevent the logs getting too big?

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: how to merge a XML to a XSP ?

2002-09-20 Thread Vadim Gritsenko

funing wrote:

Hi! all:
I want to use upload.xsp to provide uploading service and provide
some other information got from a XML in the same page. 
How can I make it?


XSP is already an XML, so it already does it. Clarify what you want. If 
you need aggregation of two files, read on aggregation and inclusion 
techniques.

Vadim


best regards
  





-
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: Cocoon 2.0.3 and CastorTransformer

2002-09-20 Thread Vadim Gritsenko

Werner Guttmann wrote:

Thanks, Vadim, for pointing this out. I just changed this back to be in line
with the CASTOR_URI declaration in CastorTransformer.java, i.e. use a
namespace declaration of

xmlns:castor=http://castor.exolab.org/cocoontransfomer;

in my page. Though now I am facing the same problem as in my original email,
iow I am still getting a NPE. Any idea why ?


No, I don't; and I have not read your original email: I've not worked 
with Castor (yet).

Vadim



Werner

Vadim Gritsenko wrote:

  

Werner Guttmann wrote:
...



PS Btw, the Castor sample shipped with Cocoon 2.0.3 has an error in the
namespace documentation of the test.xml file, iow it really reads

?xml version=1.0?
zoo xmlns:castor=http://castor.exolab.org/cocoontransfomer;

  

Actually, this is not error in demo; it's a typo in a transformer
itself. Thanks for pointing this out.

This namespace typo can easily be fixed because this transformer is
still in the scratchpad (== alpha).

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: Cocoon 2.0.3 under Enhydra 3.1

2002-09-20 Thread Vadim Gritsenko

Matthew Hailstone wrote:

Vadim,
  How do I _explicitly_ create a session? Isn't the following supposed
to do that?

  xmlns:session=http://apache.org/xsp/session/2.0;
create-session=true


Yes, this will create the session. Other ways are get-session-id/, and 
request.getSession().

PS You might be using request or response variables before they are 
initialized. See also generated java code.

Vadim



I looked on the website for the short list of xsp-session tags to use,
but couldn't find anything to do this. I also have searched the mailing
list with no luck.

http://xml.apache.org/cocoon/userdocs/xsp/session.html


Matthew
  





-
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: german umlaut!

2002-09-20 Thread Vadim Gritsenko

Wolle,

I was trying to reproduce your issue but failed. Can you put together 
small test case with short XML file, sitemap snippet, actual text 
output, and desired text output, and send this as an (zip) attachement?


Thanks,
Vadim



Wolle wrote:

hi everybody!

thank you very much for the help. but i still have the problem.
the html and pdf output is ok. as soon as i produce text-output i get
UTF-8 code although i forced cocoon to produce iso 8859-1 by using:

map:serializer logger=sitemap.serializer.text mime-type=text/text
  name=text src=org.apache.cocoon.serialization.TextSerializer
 encodingiso-8859-1/encoding
 /map:serializer

the saved text-file is indeed  UTF-8 coded because the unix-command 'file'
confirms the result.

right now i am using a workaround by reencoding the saved file
via: 'recode UTF-8 file.txt'


i tested for quite a long time. this is a working solution without cocoon
2.0.3.

maybe there is more luck with cocoon 2.1.


wolfgang weigel
  





-
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: Cocoon 2.0.3 under Enhydra 3.1

2002-09-19 Thread Vadim Gritsenko

Matthew,

The code generated with 2.0.1 means that session logicsheet was not applied. Please 
look at 2.0.1 samples for session logicsheet usage. It might be that with 2.0.1 you 
have to use session namespace, not xsp-session. This bug was fixed, now (2.0.3) 
you can use any namespace prefix you want.


Vadim





Matthew Hailstone wrote:

oops. Yeah, I put the xsp:content elements in the 'if' condition to see
if it would help.

But, after comparing the working java file from 2.0.3 with the one
created with 2.0.1, I found the following commented below:


  

Matthew Hailstone wrote:



Vadim,

Here is a portion of my xsp file:

 if( xsp:contentxsp-session:get-attribute
name=test-name-wcart//xsp:content == null
 ||
 ((String)xsp:contentxsp-session:get-attribute
name=test-name-wcart//xsp:content).length() == 0
){
xsp:content

  

Oh no, not like this, but:

  if(xsp-session:get-attribute
name=test-name-wcart/ == null
  ||
  ((String)xsp-session:get-attribute
name=test-name-wcart/).length() == 0
 ){
 xsp:content
.
 /xsp:content
 }





  

Here is the java file that is created to be compiled:

   if (xspAttr.addAttribute(, name, name, CDATA,
test-name-wcart);
  




Notice here, though, how the code should be:

  XSPSessionHelper.getSessionAttribute(session,
  String.valueOf(test-name-wcart),
  null)



  

this.contentHandler.startElement(http://apache.org/xsp/session/2.0;,
get-attribute,
xsp-session:get-attribute,
xspAttr);
   xspAttr.clear();



this.contentHandler.endElement(http://apache.org/xsp/session/2.0;,
  get-attribute,
xsp-session:get-attribute);
   == null || ((String) xspAttr.addAttribute(, name, name,
   CDATA, test-name-wcart);


this.contentHandler.startElement(http://apache.org/xsp/session/2.0;,

  

get-attribute,


xsp-session:get-attribute,
xspAttr);
   xspAttr.clear();



this.contentHandler.endElement(http://apache.org/xsp/session/2.0;,
  get-attribute,
xsp-session:get-attribute);
  ).length() == 0) {


  



  

It seems that the xslt (I'm guessing) is not producing the
  

correct java


code from the xsp-session namespace tags.
  




The working java file created from 2.0.3 looks like this with the same
xsp:


  if( 

(
  XSPSessionHelper.getSessionAttribute(session,
  String.valueOf(test-name-wcart),
  null)
)
   == null
  || ((String)

(
  XSPSessionHelper.getSessionAttribute(session,
  String.valueOf(test-name-wcart),
  null)
)
  ).length() == 0){




Matthew
  





-
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: Tomcat's automatic reload of classes and Cocoon

2002-09-19 Thread Vadim Gritsenko

Barbara Post wrote:

It works fine if I compile my classes with JBuilder and Tomcat running, but
it says Cocoon was not initialized if I build my webapp with JBuilder and
Tomcat running : i.e : JBuilder copies all the jars to WEB-INF/lib again,
instead of only the classes to WEB-INF/classes.
So Tomcat messes up with so many changed jars to reload at once and has
problems with their order.


shameless plug So don't use JBuilder! Use IDEA. :) /shameless plug

Configure project output to WEB-INF/classes, and compile only modified 
classes in there.


another plug
With Resin, you don't have to even (re)compile: have .java and .class in 
WEB-INF/classes, and once you modify .java, Resin recompiles it and 
reloads app.
/another plug

Vadim



Tomcat 4.0.4 with reloadable=true for my webapp.
Cocoon 2.1 from several days ago CVS.
JBuilder 6 Enterprise.
JDK 1.3.1.
Win NT4.

Just my 2 cents, someone may forward to Tomcat users mailing-list...

Babs
  





-
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: Encoding problem

2002-09-18 Thread Vadim Gritsenko

Alex Romayev wrote:

Let me be more specific and also simplify the example:

...

Does not work:

xsl:param name=city select='Äåëè'/


Are these funny characters above in UTF-8? Does your XSL has 
encoding=UTF-8 on the top?


...

a href=city-detail=$cityxsl:value-of
select=$city//a

After transformation I get:
a
href=city-detail=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a


What's serializer configuration? Does it have proper encoding set?

Vadim



--- Alex Romayev [EMAIL PROTECTED] wrote:
  

Hello,

I'm having what seems to be an encoding problem --
not
sure it's related to Cocoon, but... ;)

xsl:for-each select=//city-name
 a href=city-detail?city-name={.}xsl:value-of
select=.//abr/
/xsl:for-each

All my xml is UTF-8, it work in English, but not in
Russian.  Any ideas?

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: Umlauts in cocoon 2.0.2

2002-09-18 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

First, Are you using some database?

Some old tips (from my friend Barbara):

1-Ensure that every XML is starting with:

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


2-In the site map check for your serializer:

map:serializer logger=sitemap.serializer.html mime-type=text/html 
name=html pool-grow=4 pool-max=32 pool-min=4 
src=org.apache.cocoon.serialization.HTMLSerializer
  doctype-public-//W3C//DTD HTML 4.01//ES/doctype-public
  doctype-systemhttp://www.w3.org/TR/html4/strict.dtd/doctype-system
  buffer-size1024/buffer-size
  encodingISO-8859-1/encoding  !-- West Europe --
/map:serializer

(Please, see the encoding tag above)



3-If you are using xml serializer you can do that too:

map:serializer logger=sitemap.serializer.xhtml mime-type=text/html 
name=xhtml pool-grow=2 pool-max=64 pool-min=2 
src=org.apache.cocoon.serialization.XMLSerializer
 doctype-public-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public
 
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system
 encodingISO-8859-1/encoding
   /map:serializer

(Please, see the encoding tag above)

4- If you are using some database check that it is working with the code you 
need, for example in PostgreSQL i created the databse using:

createdb -E LATIN1 -e my_database_name
  


5- Set encoding for the request: request.setCharacterEncoding() *before* 
your first call to request.getParameter (this is better done as the very 
first action in the sitemap)

Vadim



I hope it will helps you.

Regards,

Antonio Gallardo

El Miércoles, 18 de Septiembre de 2002 04:13, Kenneth Roper escribió:
  

Hi

I'm trying to set up my cocoon application to handle strings with
Umlauts in (e.g. ÄäÖöÜüß).  I'm using Cocoon 2.0.2.

Any string with an umlaut was being mangled between posting from the
browser, and appearing in my variable in an action when I used the
command:

String mangled= myCocoonRequest.getParameter(name);

The string I get from mangled is: ÄäÖöÜüß, whereas it should
be: ÄäÖöÜüß.

I've left all of cocoon's character encoding settings on the defaults.
Does anyone know what I'm doing wrong?

Thanks.
Kenneth






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

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




Re: SQL Connection throws exception

2002-09-18 Thread Vadim Gritsenko

[EMAIL PROTECTED] wrote:

Hi,

i need your help: when trying to execute an SQL Statement cocoon throws an
exception.
  


I bet on JDK mismatch,

Please use Cocoon with the JDK it is intended to use with. I.e.,

cocoon-2.0.3-vm14-bin.tar.gz 
http://xml.apache.org/cocoon/dist/cocoon-2.0.3-vm14-bin.tar.gz should be used with 
JDK1.4, and cocoon-2.0.3-bin.tar.gz 
http://xml.apache.org/cocoon/dist/cocoon-2.0.3-bin.tar.gz for all others (pre-1.4).
See http://xml.apache.org/cocoon/dist/

Vadim




The JDBC driver is working (i can see coocoon connect to the database and i
can access the database via JDBC from within other applications. Any hints
and thoughts about what i could try to get the connection to work are
welcome.

This is my JDBC definition:

 jdbc name=SQLBase
   pool-controller max=10 min=5/
   dburljdbc:sqlbase://xxx.xxx.xxx.xxx:2155/mydatabase/dburl
   usersysadm/user
   passwordx/password
 /jdbc

This is my map:match:

   map:match pattern=testdb
  map:generate src=testdb.xml/
  map:transform type=sql
map:parameter name=use-connection value=SQLBase/
  /map:transform
  map:serialize type=xml/
   /map:match

This is my file testdb.xml:

?xml version=1.0 encoding=UTF-8?
xml xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0;
  sql:query
 select name from user
  /sql:query
  /sql:execute-query
/xml

And this is the result:

HTTP Status 500 -


type Exception report

message

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

...

root cause

java.lang.AbstractMethodError
 at
org.apache.avalon.excalibur.datasource.Jdbc3Connection.prepareStatement(Jdbc3Connection.java:167)
 at
org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer.java:1096)

...

thank you
Joern
  





-
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: how to write data to the XML file which the data is read from?

2002-09-18 Thread Vadim Gritsenko

funing wrote:

Hi! all:
  I am a newbie on cocoon and xsp. I want to know if it is possible 
to  write data to the XML file which the data is read from. That means,
I can get some data from a xml file, and transform it to a html and
present it to a user. The user may change the data. How can I save the 
changes to the VERY xml which the data comes from?

  I think serializer may be the answer. But I don't know how to generate
a xml file dynamically without http response.


See slash-edit/ demo. It's under mount/edit in the scratchpad/webapp.

Vadim


best regards
  





-
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: applet, module, Class.forName() - ClassNotFoundException

2002-09-18 Thread Vadim Gritsenko

Gabor Bartha wrote:

 Hi,
 summarized:

 I have an applet in a jar with outer classes (java modules). There are 
 several classes in the jar and beside the jar.

 When the applet is running (from the jar) it finds the classes inside 
 the jar, but is unable to find the classes beside the jar.

 I have the jar file: /myApp/main.jar
 I have the classes: /myApp/outclasses/needed/req.class
 /myApp/outclasses/eq.class
   When Class.forName(outclasses/needed/req) is called, 
 ClassNotFoundExecption occures. I have pipeline for the jar, and for 
 class:



Try then:

 map:match pattern=*.jar
  map:read src={1}.jar mime-type=application/java-archive/
 /map:match
 map:match pattern=*.class
  map:read src={1}.class mime-type=application/java-class/
 /map:match

map:match pattern=**.class
 map:read src={1}.class mime-type=application/java-class/
/map:match


 If I use the map:match pattern=**.class pipeline, the classes 
 inside the jar cannot be loaded, and ClassNotFoundException occures.


I don't know what **class has to do with the jar, may be you have a 
problem somewhere else (i.e., in your APPLET tag).

Vadim



 Gabor



-
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: XSL troubles

2002-09-18 Thread Vadim Gritsenko

Barbara Post wrote:

Please provide your xsl code...


Hm. Why do you think the problem is in XSL and not in

 UMLV-2002-01-XML.xml? Seems like he has invalid processing instruction name in 
there.


Vadim



- Original Message -
From: Ganael LAPLANCHE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 11:52 AM
Subject: XSL troubles



Hi !

I'm new to cocoon. I'm trying to use an xsl page to allow users to view
the xml one...

I modified the sitemap to use the dynamic-page2html.xsl. It works. But
when I try to use another xsl page, I get this error :

***

type fatal

message org.xml.sax.SAXException: Invalid processing instruction name
(saxon:warning)

description org.apache.cocoon.ProcessingException: Could not read
resource
file:/var/tomcat4/webapps/cocoon/docs/test/indexedData/UMLV-2002-01/UMLV
-2002-01-XML.xml: javax.xml.transform.TransformerException:
org.xml.sax.SAXException: Invalid processing instruction name
(saxon:warning)

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

***

I don't understand what is invalid ? Could someone help me ?

Thank you very much,

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]




Re: Encoding problem

2002-09-18 Thread Vadim Gritsenko

Alex Romayev wrote:

--- Vadim Gritsenko [EMAIL PROTECTED]
wrote:
  

Alex Romayev wrote:



Let me be more specific and also simplify the
  

example:


...



Does not work:

xsl:param name=city select='Äåëè'/

  

Are these funny characters above in UTF-8? Does your
XSL has 
encoding=UTF-8 on the top?



Yes.  Also, note that this only happens to the href
attribute, the value of the a element comes out
correctly.


Then what do you want? It works correctly. See 
http://www.w3.org/Addressing/rfc1738.txt

Vadim



...

a href=city-detail=$cityxsl:value-of
select=$city//a

After transformation I get:
a
  

href=city-detail=%D0%94%D0%B5%D0%BB%D0%B8Äåëè/a


What's serializer configuration? Does it have proper
encoding set?



I'm using the default, i.e., I haven't changed
anything since installation.

  

Vadim





--- Alex Romayev [EMAIL PROTECTED] wrote:
 

  

Hello,

I'm having what seems to be an encoding problem --
not
sure it's related to Cocoon, but... ;)

xsl:for-each select=//city-name
a href=city-detail?city-name={.}xsl:value-of
select=.//abr/
/xsl:for-each

All my xml is UTF-8, it work in English, but not


in


Russian.  Any ideas?

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: XSL troubles

2002-09-18 Thread Vadim Gritsenko

Ganael LAPLANCHE wrote:

Hi Vadim,

I've got a very stupid question : what is a processing instruction ???


See: http://www.w3.org/TR/xml-c14n#ProcessingModel
Example:

xsp:logicsheet location=logicsheets/hello.xsl/


Vadim



Thank you for helping me...
Ganaël.


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 2:50 PM
Subject: Re: XSL troubles


Barbara Post wrote:

  

Please provide your xsl code...




Hm. Why do you think the problem is in XSL and not in

 UMLV-2002-01-XML.xml? Seems like he has invalid processing instruction
name in there.


Vadim



  

- Original Message -
From: Ganael LAPLANCHE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 11:52 AM
Subject: XSL troubles



Hi !

I'm new to cocoon. I'm trying to use an xsl page to allow users to view
the xml one...

I modified the sitemap to use the dynamic-page2html.xsl. It works. But
when I try to use another xsl page, I get this error :

***

type fatal

message org.xml.sax.SAXException: Invalid processing instruction name
(saxon:warning)

description org.apache.cocoon.ProcessingException: Could not read
resource
file:/var/tomcat4/webapps/cocoon/docs/test/indexedData/UMLV-2002-01/UML


V
  

-2002-01-XML.xml: javax.xml.transform.TransformerException:
org.xml.sax.SAXException: Invalid processing instruction name
(saxon:warning)

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

***

I don't understand what is invalid ? Could someone help me ?

Thank you very much,

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]




Re: Little problem in the documentation formatting of the Cocoonwebsite

2002-09-18 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

I saw that some pages of the documentation in the Cocon web site. are not 
handled well in the browser. It seems like they dont know where the browser 
window end in the right side and continue.

For example:

http://xml.apache.org/cocoon/developing/webapps/authentication.html

If you wish I can send the others pages with this problem.


Yes, sure...

1. Get the latest Cocoon 2.0.4-dev from the CVS, cocoon_2_0_3_branch
2. Do build docs
3. Browse generated docs (build/cocoon/docs) and send all comments you 
have, they are appreciated. Even better if you send patches to the xdocs.


I am using Red Hat 7.3, KDE 3.0.3, Konqueror 3.0.3.
BTW, I think in IE 6.0 on Windows is the same.

Please tell the web master about this little problem.


We are own webmasters.

Vadim


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: how is the base path determined for map:handle-errors?

2002-09-18 Thread Vadim Gritsenko

Timothy Larson wrote:

Looking at my last email and my log files, I think my problem is that the context
is not changing when I expect it to.
Could you give me a pointer to documentation on how the context is managed?


There is no documentation; all this is very internal stuff and supposed 
to work automagically.


Can you explicitly control the context from the sitemap?


No (see above).


Also, how would you get FOP to run in the same context as the current sitmap?
(so it could find external images, etc.)


Can't help with it.

Vadim


Thanks,
Tim

  

[EMAIL PROTECTED] 09/17/02 12:14PM 


Timothy Larson wrote:

  

In Cocoon 2.0.3, how is the base path determined for map:handle-errors?
I'm confused, because in different subsitemaps it either looks for files at the
same level as the current subsitemap or all the way out at the root sitemap.




It should be current sitemap. Have you tried 2.0.4-dev, does it have 
same problem?

Vadim


  

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: Cocoon 2.0.3 under Enhydra 3.1

2002-09-18 Thread Vadim Gritsenko

Matthew Hailstone wrote:

Vadim,

  

In the second email it was recommended to use Paranoid servlet which 
makes me to think that enhyndra has broken class loader. Issues with 
broken class loading can be endless and hard to trace.

In your install, however, you are trying to start with regular 
CocoonServlet (as far as I can tell). Have you tried paranoid servlet?


Yes. I have tried to use the ParanoidServlet servlet class also, and it
has the same problems. :(


I don't know why; as I said - some class loading issues. :-/


ok. Here is another scenario. I can actually run Cocoon 2.0.1, and get
the Cocoon welcome page, and go into all of the sample links. But, for
some reason, my sub-sitemap section doesn't work. Here are my findings.
  

...

org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
form_xsp:
Line 255, column 76:  ')' expected.


Look into java source; compiler must be right. If it works with Cocoon 
2.0.3, it just because some errors were fixed since 2.0.1


Line 360, column 6:  'else' without 'if'.
Line 363, column 92:  ')' expected.
Line 479, column 68:  ')' expected.
Line 694, column 8:  'else' without 'if'.
Line 869, column 80:  ')' expected.
Line 884, column 50:  ')' expected.
Line 1149, column 10:  'else' without 'if'.
Line 1335, column 44:  ')' expected.
Line 1351, column 61:  ')' expected.
Line 1603, column 12:  'else' without 'if'.
Line 1794, column 61:  ')' expected.
Line 0, column 0: 
12 errors
  

...

I see this exception repeatedly in the core.log.01 file:

WARN(2002-09-18) 08:41.12:584   [core] (/)
Thread-23/ExcaliburComponentManager: Looking up component on an
uninitialized ComponentManager:
org.apache.cocoon.generation.GeneratorSelector

DEBUG   (2002-09-18) 08:41.12:884   [core] (/) Thread-23/LogKitLogger:
org.apache.cocoon.generation.XMLDBGenerator: could not be instantiated.
org.apache.cocoon.ProcessingException: Problem setting up the
connection: org.dbxml.client.xmldb.DatabaseImpl


Don't worry about it. It means you have got no XML:DB database.
...


DEBUG   (2002-09-18) 08:41.12:904   [core] (/) Thread-23/LogKitLogger:
org.apache.cocoon.generation.XMLDBCollectionGenerator: could not be
instantiated.
org.apache.cocoon.ProcessingException: Problem setting up the
connection: org.dbxml.client.xmldb.DatabaseImpl


Ditto.
...

ERROR   (2002-09-18) 08:41.12:834   [sitemap.generator.velocity] (/)
Thread-23/VelocityGenerator: ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.

ERROR   (2002-09-18) 08:41.12:854   [sitemap.generator.velocity] (/)
Thread-23/VelocityGenerator: ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.

ERROR   (2002-09-18) 08:41.18:843   [sitemap.generator.velocity] (/)
Thread-23/VelocityGenerator: ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.


It could be important if you would use Velocity.


Here is a the portion of my form.xsp file that it's complaining it can't
compile:

xsp:logic
  String m_strFormAction = form;
  String m_query = ;
  String m_querySelect = ;
  if( xsp-session:get-attribute name=test-name/ == null
  ||
  ((String)xsp-session:get-attribute
name=test-name/).length() == 0
 ){


Try surrounding this with xsp:content:

xsp:content

xsp-session:set-attribute name=test-nameTest
Name/xsp-session:set-attribute
xsp-session:set-attribute name=query from info where id in
(select distinct id from another_info where id in (select distinct id
from results))/xsp-session:set-attribute
field id=test-name label=Test Name type=select
  value value=-1xsp-session:get-attribute
name=test-name//value
/field


/xsp:content


Vadim



  }
...

  

I hope my comments will give you perspective on possible ways of 
resolving this problem
(I'm merely helping you help yourself ;-)

Vadim



Yes. And in all honesty, every little suggestion is very helpful.
Thank you very much for lending me some of your time and insight,

Matthew
  



-
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: Little problem in the documentation formatting of the Cocoonwebsite

2002-09-18 Thread Vadim Gritsenko

Antonio Gallardo Rivera wrote:

I forgot that I am using the lastest CVS of 2.1. Builded after your last post.
I also stoped Cocoon delete the work directory and restarted.
I am using a 1024x768 resolution.


Same here, only Mozilla instead of

 Konqueror; page looks Ok. You can fix the page and send the patch if you want ;)


Vadim



I browse the doc after the build and there is the same problem. :(

Antonio Gallardo.


El Miércoles, 18 de Septiembre de 2002 08:36, Vadim Gritsenko escribió:
  

Antonio Gallardo Rivera wrote:


I saw that some pages of the documentation in the Cocon web site. are not
handled well in the browser. It seems like they dont know where the
browser window end in the right side and continue.

For example:

http://xml.apache.org/cocoon/developing/webapps/authentication.html

If you wish I can send the others pages with this problem.
  

Yes, sure...

1. Get the latest Cocoon 2.0.4-dev from the CVS, cocoon_2_0_3_branch
2. Do build docs
3. Browse generated docs (build/cocoon/docs) and send all comments you
have, they are appreciated. Even better if you send patches to the xdocs.



I am using Red Hat 7.3, KDE 3.0.3, Konqueror 3.0.3.
BTW, I think in IE 6.0 on Windows is the same.

Please tell the web master about this little problem.
  

We are own webmasters.

Vadim



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: how is the base path determined for map:handle-errors?

2002-09-18 Thread Vadim Gritsenko

Timothy Larson wrote:

Is the context supposed to always match the directory where the current
sitemap is stored?


Yes, in a sence that all relative paths in the sitemap should be 
relative to sitemap's directory. At any time, including exception handlers.

Vadim



Tim

  

[EMAIL PROTECTED] 09/18/02 01:36PM 


Timothy Larson wrote:
...
  

Can you explicitly control the context from the sitemap?




No (see above).
...
  





-
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: Invoking Cocoon actions via JavaScript

2002-09-18 Thread Vadim Gritsenko

Robert Koberg wrote:

Another thought:

var action_xxx = eval(document.formName.cocoon-action-xxx);


Won't something like 

document.formName['cocoon-action-xxx'] work? :-?


IIRC, javascript had syntax like this...

Vadim


-Rob

  

-Original Message-
From: Robert Koberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:58 AM
To: [EMAIL PROTECTED]
Subject: RE: Invoking Cocoon actions via JavaScript


Hi,

You could loop over the form's element array, use a switch statement
and use the
name string as a case match to set up your action input element objs in some
kind of body onload init function.

var action_xxx;
var action_yyy;
var elems = frmObj.elements;
for (var i=0; ielems.length; i++) {
switch (elems[i].name)
case cocoon-action-xxx:
  action_xxx = elems[i];
case cocoon-action-yyy:
  action_yyy = elems[i];
}
}

best,
-Rob



-Original Message-
From: Hunsberger, Peter [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 8:28 AM
To: '[EMAIL PROTECTED]'
Subject: Invoking Cocoon actions via JavaScript


One of our developers has run into an issue that I can't see an easy
solution to.  However, I also can't believe that no one else has run into
the problem.

We have a form where we are using IE 5.5 (and above) DHTML to enable drop
and drag editing to reorder fields.  As the result of a drop, we determine
some positional values, place these values into the form and then attempt to
submit the form to the server where the values will be placed in a database.
In order to submit the form, the JavaScript code has to invoke the proper
HTML action for the form, which is named using the Cocoon standard
cocoon-action- format.  Since JavaScript attempts to resolve the
action name as an JavaScript object it eventually turns a string of this
format into three object names separated by  two minus signs and
subsequently blows up trying to subtract non-existent JavaScript objects
from each other.

One obvious fix would be to change Cocoon to not use - in the action
names. Given that this would break just about every Cocoon implementation in
the world I'm hoping that someone has run into this before and found a work
around on the JavaScript side of the world?

Peter Hunsberger

Phone: 901-495-5252
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: XHTML Serilization instead of HTML S.

2002-09-18 Thread Vadim Gritsenko

Alexander Schatten wrote:

 Vadim Gritsenko wrote:

 Alexander Schatten wrote:

 I use Cocoon 2 to produce HTML. I use the HMTL serializer, but have 
 to detect, that the output is *not* HTML as expected, but XHTML, 
 which makes several problems, e.g. with Mozilla.



 I use HTML serializer and it outputs HTML. This can be confirmed by 
 W3C validator service. Serializer config looks like:

  map:serializer name=html   mime-type=text/html
 src=org.apache.cocoon.serialization.HTMLSerializer
buffer-size1024/buffer-size
indentno/indent
omit-xml-declarationyes/omit-xml-declaration
doctype-public-//W3C//DTD HTML 4.01 
 Transitional//EN/doctype-public

 doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system
  /map:serializer



 well, thank you for your configuration: I have edited the sitemap so 
 to precisely your settings, but the result still has XML header and IS 
 xhtl.

 e.g. a name=nnn /


Hm. XML:
  a name=test/Here will be some links

HTML:

a name=test/aHere will be some links


Works Ok for me.



Vadim



 whats wrong?


 alex


 p.s.:btw: the same thing under Windows XP and Linux



-
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: how to go from url in session attribute to url with session encoded?

2002-09-18 Thread Vadim Gritsenko

Timothy Larson wrote:

Anybody know how to take a url in a session attribute and encode the session onto it?
Non-working example to show what I am trying to do:
xsp:encode-urlxsp-session:get-attribute name=fruit//xsp:encode-url


You need xsp-response:encode-url

Vadim


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: Cocoon 2.0.3 under Enhydra 3.1

2002-09-18 Thread Vadim Gritsenko

Matthew Hailstone wrote:

Vadim,

Here is a portion of my xsp file:

  if( xsp:contentxsp-session:get-attribute
name=test-name-wcart//xsp:content == null
  ||
  ((String)xsp:contentxsp-session:get-attribute
name=test-name-wcart//xsp:content).length() == 0
 ){
 xsp:content


Oh no, not like this, but:

  if(xsp-session:get-attribute
name=test-name-wcart/ == null
  ||
  ((String)xsp-session:get-attribute
name=test-name-wcart/).length() == 0
 ){
 xsp:content
.
 /xsp:content
 }


Vadim



Here is the java file that is created to be compiled:

if (xspAttr.addAttribute(, name, name, CDATA,
test-name-wcart);

 
this.contentHandler.startElement(http://apache.org/xsp/session/2.0;,
 get-attribute,
xsp-session:get-attribute,
 xspAttr);
xspAttr.clear();


 
this.contentHandler.endElement(http://apache.org/xsp/session/2.0;,
   get-attribute,
xsp-session:get-attribute);
== null || ((String) xspAttr.addAttribute(, name, name,
CDATA, test-name-wcart);

 
this.contentHandler.startElement(http://apache.org/xsp/session/2.0;,
 get-attribute,
xsp-session:get-attribute,
 xspAttr);
xspAttr.clear();


 
this.contentHandler.endElement(http://apache.org/xsp/session/2.0;,
   get-attribute,
xsp-session:get-attribute);
   ).length() == 0) {


It seems that the xslt (I'm guessing) is not producing the correct java
code from the xsp-session namespace tags.

Any suggestion/assessment?

Matthew
  



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




  1   2   3   4   5   6   7   8   9   10   >