Re: Event-aware caching problem

2006-01-23 Thread Jean-Baptiste Quenot
* Jonas Lundberg:

> Nevermind... I solved  it by  implementing Event Caching  in the
> Xquery Generator, as described in the Event Caching block.

You have  to use sitemap parameter  « cache-validity » to activate
XQueryGenerator caching.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: Problems with JTidy and cocoon

2006-01-23 Thread Jean-Baptiste Quenot
* Johannes Michler:

> I think the namespaces should match, but i've attached the nekohtml and the
> tidyhtml output, or what do you mean by RAW-output?
>
> The raw-output of tidyhtml is
> 
> http://www.w3.org/1999/xhtml";>


So you see that Tidy is generating HTML in the xhtml namespace,
whereas Neko does not.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: Event-aware caching problem

2006-01-25 Thread Jean-Baptiste Quenot
* Jonas Lundberg:

> Yes, but I also had to change the xquery generator code.

Apart  from  event-aware stuff,  what  are  the required  changes?
Which revision  of XQueryGenerator  are you  using?  As  you know,
this component is not provided by Cocoon, it is part of eXist.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: Event-aware caching problem

2006-01-25 Thread Jean-Baptiste Quenot
* Jonas Lundberg:

> Without  these changes,  it *almost*  works. This is  why I  was
> confused at first.

Without  this  change,  caching  can   only  work  if  you  set  a
« cache-validity »  in the  sitemap.  But  of course  you wouldn't
have event-aware caching then.

I   wrote   an   EventAwareXQueryGenerator   that   just   extends
XQueryGenerator,  overriding  getValidity().   This is  perhaps  a
little more elegant than hacking the XQueryGenerator directly ;-)
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: Session null in jxtg

2006-01-25 Thread Jean-Baptiste Quenot
* Daniele Madama:

> Hola,

Hola,

> I want to get a session attribute from a JXTemplate without success.

Indeed the flow object model is different from the JXTemplate
object model, sadly.

You have to do:

${session}

Directly.
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: servlets & cocoon?

2006-04-03 Thread Jean-Baptiste Quenot
* [EMAIL PROTECTED]:

> How can I map some servlets next to the Cocoon stuff in the same
> context?

You can't.
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: running Cocoon CLI for with version 2.1.8

2006-04-18 Thread Jean-Baptiste Quenot
* Stephanie Zohner:

> I have  just updated my cocoon  version from 2.1.3 to  2.1.8 and
> wnt to run cocoon cli now

Hello,

CLI classpath problems have been fixed in Cocoon 2.1.9

Excerpt from http://cocoon.apache.org/2.1/changes.html:

Allow to run Cocoon CLI by adding servlet.jar in the classpath.
Turn off cli's debug messages by default. (Jean-Baptiste Quenot)
Fixes COCOON-1715

Best regards,
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: Upgrading Cocoon from 2.1.7 to 2.1.9

2006-04-18 Thread Jean-Baptiste Quenot
* Andreas Hochsteger:

> These are the most important things we are currently using:
> * FlowScript
> * JXTemplates

One thing great in Cocoon 2.1.9: to use the refactored
JXTemplateGenerator in the new template block, it is much more
efficient.
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: PCL serializer help

2006-04-18 Thread Jean-Baptiste Quenot
Hello,

Cocoon  does not  provide  this  feature yet,  but  is willing  to
incorporate good-enough user-submitted contributions.

Best regards,
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: Cocoon 2.1.9 / CForms - Values lost when switching union cases

2006-04-23 Thread Jean-Baptiste Quenot
* Ralph Rauscher:
> 
> after upgrading to cocoon 2.1.9 I'm having problems switching union cases. 
> With cocoon 2.1.8 I was able
> 
> 1. enter values for the widgets contained within one union case
> 2. then switch to another union case
> 3. switch back again to the first union case and those values I entered in 
> step 1 would still be there
> 
> With cocoon 2.1.9 all values previously entered within one union case are 
> lost upon switching union cases. This can be best 
> seen by comparing the datachooser sample in version 2.1.8 against 2.1.9.
> 
> Maybe I'm missing something, like are there any configuration changes 
> required to make this work again?

Hello,

Could you please submit a bug report with a simple testcase?
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: CFORMS: Double fi:styling problem in 2.1.9 and solve

2006-04-23 Thread Jean-Baptiste Quenot
* Yuri Kolesnikov:
>
> I have solved small problem with fi:styling elements.
> 
> The problem was: I had form template with action widget
>
>
>
>
> 
> And plus some xslt code to call confirm() when click on button.
> 
> In cocoon 2.1.7 it worked, in 2.1.9 - not.
> Form transformator now save only one fi:styling element.
> 
> Here is patch for EffectWidgetReplacingPipe.WidgetHandler

Hello,

Could you please submit a bug report with a simple testcase, and
if possible a patch obtained using "svn diff"?

-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: Antw: [2.1.9] cli logger exception

2006-04-23 Thread Jean-Baptiste Quenot
* Reinhard Haller:
>
> already done -- the exception disappears, but this was a known
> error in 2.1.8, why it's corrected and what is to do to get a working
> logging?

Hello,

Could you please submit a bug report with a simple testcase?
-- 
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: Need help with HTMLArea in Cforms

2006-04-23 Thread Jean-Baptiste Quenot
* Leszek Gawron:

> Mark Lundquist wrote:
>
> > The problem is  that when I submit the form,  the new value of
> > the widget  is not submitted.   I fired up  LiveHTTPHeaders in
> > Mozilla, and  I can see  that it's the  old value in  the POST
> > request, not the new one.
>
> cocoon  uses  forms_onsubmit()  and   handles  all  submits  not
> via  but  viaonclick="forms_onsubmit(...)"/>
>
> this does not trigger the  default form's onsubmit handler which
> htmlarea overrides.
>
> the most stupid way to fix that is:
>
> This  is just  a quick  fix. Probably the  way to  fix it  is to
> register this kind of handler for every htmlarea in the form.

Perhaps we shall fix something in  Cocoon to make it work?  I also
encountered  this annoying  problem, and  lost a  couple of  hours
trying to figure out what was going wrong... then switched to Dojo
Rich Text Editor that does not exhibit this problem except in Ajax
mode.
-- 
 Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

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



Re: Docbook stylesheets and jfor

2004-07-18 Thread Jean-Baptiste Quenot
* Katrin Schoenherr:

> Could anyone point me to what is going wrong?

Jfor has got some serious limitations that prevent Docbook FO results to
be  processed  for producing  RTF  documents.   Docbook is  particularly
complicated, and  Jfor is  particularly weak, it  only allows  simple FO
constructs.

The  only option  for  producing RTF  from  Docbook is  to  use Jade,  a
DSSSL processor.   DSSSL is  the equivalent  of XSL  in the  SGML world.
Stylesheets  for this  language  are provided  in  the standard  Docbook
distribution.  But of course you cannot integrate Jade into Cocoon.

HTH,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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



Re: using jython/python for cocoon cform flow

2004-07-22 Thread Jean-Baptiste Quenot
* Reinhard Poetz:

> Unfortunatly this is not that easy. First you (we) would need a Python
> interpreter that is able to  manage continuations which doesn't exist,
> AFAIK.

Yes it exists, it is called [1]Stackless.
-- 
Jean-Baptiste Quenot
Anyware Technologies
[1] http://www.stackless.com/spcpaper.htm

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



Re: Where to store a hibernate session in Flow?

2004-08-06 Thread Jean-Baptiste Quenot
* Mark Lundquist:

> Why do you need to close the factory?  Just leave it open.
>
> You might also  look at implementing the Thread  Local Session pattern
> (http://hibernate.bluemars.net/42.html).   I  implement  this  pattern
> with a class called HibernateFactory, which wraps the session factory

You're right,  no need  to close  the factory, just  use the  same every
time.  Your solution is good, but Sylvain suggested instead to implement
ThreadSafe in the  HibernateFactory Avalon component, to  ensure that it
is instantiated once.  Is that sufficient?
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Help ! General questions about Cforms and flowscript.

2004-09-16 Thread Jean-Baptiste Quenot
* David Verdin:

> 1-  In   "action"  widgets,  what  is   exactly  the  "action-command"
> attribute?

AFAICT its value is not meaningful.

> 2- More generally,  how can I make  a script happen on  some events on
> widgets ?  For example,  in a  simple HTML form,  I use  the "onClick"
> attribute of a button to make  a javascript to happen. I don't get how
> to do the same with Cforms widgets.

It is documented in the following pages:

http://cocoon.apache.org/2.1/userdocs/forms/widget_submit.html
http://cocoon.apache.org/2.1/userdocs/forms/widget_field.html
http://cocoon.apache.org/2.1/userdocs/forms/xslt.html

> 3- Is everything  in the cocoon framework compatible ?  Is it possible
> to make the binding framework work alongside JXtemplategenrator ? If I
> use repeaters, what happens to the binding file when I add a row ?

The binding  occurs before or  after displaying a  form, thus it  has no
correlation with displaying the form template.  The form template is for
user interaction, whereas binding is used to load from or save to an XML
document.

> 4-  Where can  I  find the  list of  cocoon  javascript functions  and
> objects ? Is it the API ? If so, is there something else, because most
> of the time, the API is poorly documented ?

Exactly, you have to read the API documentation.

> I feel that  Cocoon has a very big potential,  but it seems impossible
> for me to make it work properly.

Cocoon is  open-source: do  not hesitate  to take a  look inside  to the
forms  stylesheets, the  java classes,  and  so on.   Everything can  be
customized and adapted to taste.

Best regards,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: JXTemplate - HashMap

2004-09-20 Thread Jean-Baptiste Quenot
* Yves Hougardy:

> i need to get the keys and values out of an java.util.Map with jxpath.
> However, i'm not  supposed to know the  keys of the map. How  can i do
> that?

Try to iterate over the keys of the map:


  ${key}: ${map.get(key)}'/>


Best regards,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Resources from within XSLT

2004-09-20 Thread Jean-Baptiste Quenot
* Richard Lewis:

> How can  I get a transforming  XSLT stylesheet to complete  the URI of
> the image from the name given in the  element so that it points
> to the image correctly?

The best way to deal with resources path is to pass a parameter to the
transformation in the sitemap, and get that parameter in the stylesheet.

sitemap:


  


xsl:





HTH,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Resources from within XSLT

2004-09-21 Thread Jean-Baptiste Quenot
* Richard Lewis:

> * Jean-Baptiste Quenot:

> > 

> 

Shall I recommend not to omit the « map: » prefix?
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Problem accessing authentication session in portal sitemap

2004-09-23 Thread Jean-Baptiste Quenot
* Andrew MacDonald:

> How  can  I  set the  authentication  context  before
> matching on the CSS and images?

Could you please provide us with relevant parts of your
sitemap?

TIA,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: fd:repeater and paging

2004-09-24 Thread Jean-Baptiste Quenot
* Jennifer Yip:

> fd:repeater widget in cforms 
>
> I want to be able to page a list of items in the bound object.

It is not yet implemented.  You  may have to handle the paging yourself,
but apparently  a patch has  entered the  pipe yesterday, so  things may
change in a near future.

Best regards,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Problem accessing authentication session in portal sitemap

2004-09-24 Thread Jean-Baptiste Quenot
* Andrew MacDonald:
> Later on, in the main pipeline I have this:
> 
> 
> 
>value="portal-handler"/>
>src="skins/{skin}/css/{1}.css"/>
> 
> 

If the user is not logged in, how do you expect the CSS to be loaded?
You could maybe have an unprotected pipeline for anonymous user, or
match the skin name directly in the pattern.  AFAICT, auth-protect is
not appropriate for resources like CSS.  You could also use  to check whether the user is logged in before
reading the CSS.

HTH,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: XML not well formed after transformation - xmlns:%@$#^@#="%@$#^@#"

2004-10-12 Thread Jean-Baptiste Quenot
* Bart Molenkamp:

> What is  someone doing wrong  when, after  applying a stylesheet  to a
> document, the result document contains xmlns:[EMAIL PROTECTED]@#="[EMAIL 
> PROTECTED]@#".

Same problem here, with the Cocoon Forms stylesheets apparently.
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: XML not well formed after transformation - xmlns:%@$#^@#="%@$#^@#"

2004-10-12 Thread Jean-Baptiste Quenot
* Bart Molenkamp:

> Are you using the JXTemplateGenerator?

Indeed.

> This can happen e.g. by importing a JXTemplate using jx:import.

Exactly, that's what we do.

Please tell  us when JxTemplateGenerator.java has  revealed some secrets
to you ;)
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Newbie question about fd:multivaluefield

2004-11-09 Thread Jean-Baptiste Quenot
* angeloimm:

> How can i have the selction of the list of the form in my function? By
> using lookupWidget  i know that  folder_2 is a  MultiValueField... but
> how  can i  have  its  value? If i  use  folder_2.getValue(); i  have:
> [Ljava.lang.Object;@11067af

The last line means: list of objects.  In fact
MultiValueField.getValue() returns a Java array.
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Can cocoon be used for XML pipelining in a Java application?

2004-11-17 Thread Jean-Baptiste Quenot
* Juvvadi, Venugopal (ELS):

> I would  like to  know whether I  can use cocoon  XML pipelining  in a
> plain Java  application. I have found  that the CLI option  that comes
> with cocoon  is mainly targeted  for generating static  web sites. Are
> there any other applications built on this?

What you're looking for is the CocoonBean:

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/bean/CocoonBean.html
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: how 2 invalidate the cntinuation to prevent doubble db entries

2005-01-04 Thread Jean-Baptiste Quenot
Have you tried:

var cont = cocoon.sendPage("done")
cont.invalidate()
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Sitemap - Calling a resource from a sub-sitemap

2005-01-04 Thread Jean-Baptiste Quenot
* EXT / STAGIAIRE PLASSE Cédric (DSIT-EX/2i):

> I have defined  in the root sitemap a resource  and I would like
> to call it from a sub  sitemap.

This is not yet possible.
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: how 2 invalidate the cntinuation to prevent doubble db entries

2005-01-04 Thread Jean-Baptiste Quenot
* Carlos Chávez:

>   That  do   not  work  because  cocoon.sendPage   no  return  a
>   WebContinuation Object.

You're right I meant sendPageAndWait(), also used by showForm().
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

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



Re: Getting a comma in my numbers

2005-06-02 Thread Jean-Baptiste Quenot
* Bruce Atherton:

> I'm using  Cocoon forms,  and every  time I have  a number  in a
> field it  is coming back  formatted with commas embedded  in the
> number. [...] How do I turn off this behaviour?

First  you  can  set  the   "locale"  property  of  your  form  JS
object to  influence the number  formatting.  You can  also change
the  formatter  in  the   binding.   The  following  example  uses
PlainLongConvertor instead of the default FormattingLongConvertor:


  


HTH,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Coplet error-uri does not work

2005-07-13 Thread Jean-Baptiste Quenot
* Mathieu Garcia:
> My project is based on the portal block and coplets. When an error 
> occurs in a coplet, the error is displayed on the top and not in the 
> coplet that has thrown this error.
> I tried to add an error-uri attribute in my coplet, but the result is 
> the same. It seems that the cocoon handle-error is called instead of the 
> coplet error handling.

Have you tried to set coplet attribute « buffer » to « true »?

See « Output Buffering » in the portal documentation:

http://cocoon.apache.org/2.1/developing/portal/coplets.html#Output+Buffering
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Problem with Batik and Freebsd

2005-10-13 Thread Jean-Baptiste Quenot
* Jean-Claude Moissinac:
> Thank you for this help.
> Now, I will try to understand where I have to put the
> 
> -Djava.awt.headless=true
> option.
> 
> I'm not using Tomcat, but the basic direct way to install Cocoon 2.1.7.

Hello Jean-Claude,

You're right until now there was no way to change the java options with the
Cocoon port on FreeBSD.

Could you please save the attached path and try this:

# cd /usr/ports/www/cocoon
# patch < cocoonctl-patch
# make clean all deinstall install

If you would like to avoid reinstallation, just apply the patch
by hand against /usr/local/sbin/cocoonctl directly

Then edit /etc/rc.conf and set:

cocoon_flags="-Djava.awt.headless=true"

Then start Cocoon:

# env - /usr/local/etc/rc.d/cocoon.sh start

If everything is okay, you should have:

$ COLUMNS=1 ps aux | grep cocoon
www  66494  2.9  3.8 255740 58464  p9  R16:57 0:10.40 
/usr/local/jdk1.4.2/bin/java -Djava.awt.headless=true -cp 
/usr/local/cocoon/tools/loader 
-Djava.endorsed.dirs=/usr/local/cocoon/lib/endorsed 
-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port= 
-Dloader.jar.repositories=/usr/local/cocoon/tools/jetty/lib:/usr/local/cocoon/lib/endorsed
 -Dwebapp=/usr/local/cocoon/webapp -Dhome=/usr/local/cocoon 
-Dloader.main.class=org.mortbay.jetty.Server Loader 
/usr/local/cocoon/tools/jetty/conf/main.xml

Notice the -Djava.awt.headless=true in the command line.  If that
works for you, I will submit a PR to FreeBSD.

Best regards,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/
Index: files/cocoonctl
===
--- files/cocoonctl (revision 338)
+++ files/cocoonctl (working copy)
@@ -141,19 +141,20 @@
 APP_HOME = "%%APP_HOME%%"
 PID_FILE = "%%PID_FILE%%"
 COMMAND = "%%PREFIX%%/sbin/%%APP_NAME%%.sh"
+os.environ["JAVA_OPTIONS"] = " ".join(sys.argv[1:-1])
 ARGS = [COMMAND, "servlet"]
 
-if len(sys.argv) != 2:
+if len(sys.argv) < 2:
 usage()
 sys.exit(1)
 
-if sys.argv[1] == "start":
+if sys.argv[-1] == "start":
 start()
 
-elif sys.argv[1] == "stop":
+elif sys.argv[-1] == "stop":
 stop()
 
-elif sys.argv[1] == "restart":
+elif sys.argv[-1] == "restart":
 stop()
 start()
 

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

Re: WebDAV issue in 2.1.8

2005-10-13 Thread Jean-Baptiste Quenot
* Gavin Carothers:

> Hi, getting rather odd behavior from the webdav source.
> 
> Simplified pipeline:
> 
>  
>   
>

Hello,

What is xpathtraverse?
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: overriding the base sitemap

2005-10-13 Thread Jean-Baptiste Quenot
* Upayavira:

> Jason Dusek wrote:
>
> >what is the  'right way' to override the base  xslt and all the
> >rest? i take it that simply  rewriting the sitemap is not quite
> >correct, since it gets overwritten on rebuild.
>
> Or,  if  you are  using  the  built  in  Jetty, you  can  easily
> use  the   mount  table   matcher  to  do   it  for   you,  just
> copy  mount-table.xml.sample  (or  whatever  it  is  called)  to
> mount-table.xml, and edit it as  per the line above. Then you'll
> be able to edit your own sitemap as you require.

When wishing to customize  existing component declarations without
having to repeat them in every sub-sitemap, one can use the xpatch
Ant task:

http://wiki.apache.org/cocoon/XPatchTaskUsage

This will allow power-users to  update Cocoon without to merge all
changes by hand.  Just apply the xpatch...

Best regards,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: CForms: restoring multivaluefield widgets

2005-10-14 Thread Jean-Baptiste Quenot
* Stefan Warringa:

> How do I restore a multivaluefield widget?

With 
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Linking/including mutiple flowscript files

2005-10-14 Thread Jean-Baptiste Quenot
* Leszek Gawron:

> Derek Hohls wrote:
>
> >Is it possible to have one "master" flowscript file which links
> >or includes other "child" flowscript files,
>
> you can use  cocoon.load( scriptUri ) in your  main script e.g.:
> cocoon.load("...Form.js");
>
> I  have  a feeling  there  are  some  caching issues  with  this
> approach.

Not really  *caching* issues, but rather  *reloading* issues.  The
« child »  script will  only get  reloaded if  you touch  the main
script.  A bit boring when doing intense development.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Getting started (again)

2005-10-14 Thread Jean-Baptiste Quenot
* Jonas Lundberg:

> I  have a  blog/forum/website script  package for  Cocoon (using
> eXist/xQuery).   But I  thought that  there were  many of  these
> around already. Is there any interest in that?

Yes, I am interested.  Is the code available?
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Public sitemap 1.0 schema

2005-10-18 Thread Jean-Baptiste Quenot
* Heydenreich, Hendrike:

> does anybody know, if there is  a pulic schema definition of the
> sitemap.xmap version 1.0?

Have you seen src/webapp/WEB-INF/entities/sitemap-v06.rng?
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Accessing "authentication"-contex wthout actually protecting a pipeline?

2005-10-21 Thread Jean-Baptiste Quenot
* Christofer Dutz:

> I am  working on  some rather simple  problem. I want  the title
> Frame  of a  framed website  to  display the  users name  (which
> is  contained  inside  the  additional  login-data);  if  he  is
> logged-in. Unfortunately  I  don't seem  to  be  able to  access
> the authentication  information without actually  protecting the
> pipeline with the auth-protect action.

Why would you like to avoid the ?

If that's just for the sake of simplicity and conciseness of your
sitemap, you can protect all pipelines at once like below:


  
...
  

  
    ...
  

  
    ...
  

-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Cocoon 2.1.8 - namespaced xml binding failing.

2005-10-21 Thread Jean-Baptiste Quenot
* Suzan Foster:

> Correction to  my previous  post: when the  prefixes in  the xml
> file and xpath expressions match it does bind, But when f.i. the
> xml  file binds  the  namespace  to the  prefix  co: whilst  the
> binding  definition binds  the namespace  to the  prefix ab:  it
> fails.

That's interesting.  But can you provide a sample XML document and
your form binding?   It may be useful to see  how you declared the
namespaces.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Accessing "authentication"-contex wthout actually protecting a pipeline?

2005-10-21 Thread Jean-Baptiste Quenot
* Christofer Dutz:

> What about  the scenario of a  portal in which you  can access a
> page without login and have special features when you are logged
> in? That's what's happening in my case.

For this usecase we use a special account named « anon ».
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Accessing "authentication"-contex wthout actually protecting a pipeline?

2005-10-24 Thread Jean-Baptiste Quenot
* Armaz Mellati:

> Know  that wont   protect  any
> pipeline for your guest users.

Of course,  you're right, the name  « auth-protect » is misleading
because in  fact it  does not protect  anything.  It  just ensures
that  the user  is logged,  automatically (if  a guest  account is
available) or with due credentials.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Cocoon 2.1.8 - namespaced xml binding failing.

2005-10-24 Thread Jean-Baptiste Quenot
* Suzan Foster:

> After  looking  at  the  JXPath  code I  have  to  come  to  the
> conclusion that it doesn't try to normalize the prefixes.

OK, so binding seems to be  based on namespace prefix, rather than
namespace URI.

If you think this is a bug, you might want to file a bug report at
ASF Jira: http://issues.apache.org/jira/browse/COCOON

You will surely need to sign up before being able to
create a new entry.

Best regards,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: How to send parameters to a URL via http?

2005-10-25 Thread Jean-Baptiste Quenot
* Brian Burridge:
> Yes I understood that. Here is the flow I am using:
> 
> function post2requestUri{
> var queryString = "";
> for (var i in cocoon.getParameterNames){
> queryString += i + "=" + cocoon.request.getParameter(i) + "&";
> }
> cocoon.sendPage("http://localhost:8080/girscom/TestCocoon.jsp?"+queryString);
> }

be careful to encode the parameters using URLEncoder.encode().
And also you may encounter encoding problems with this code
depending on your settings in web.xml and the encoding used by
your servlet container.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Problem with xercesImpl.jar in XALAN 2.7.0

2005-10-25 Thread Jean-Baptiste Quenot
* Andrew Le Quesne:

> When I tried to upgrade to xalan 2.7.0 I am getting a NoSuchMethodError for
> org.apache.xerces.dom.NodeImpl.setUserData() when I try to access a forms
> page in my cocoon webapp.

What version of Cocoon are you using?  AFAICT the dependency on
Xerces has been removed from Cocoon Forms recently:

See http://svn.apache.org/viewcvs.cgi?rev=226344&view=rev

Why do you upgrade Xalan?
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: [ExceptionHandling] Catching "Content length exceeds maximum upload size"

2005-11-14 Thread Jean-Baptiste Quenot
See my reply on cocoon-dev
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=113162177804454&w=4

And please do not cross-post!
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: 2.1.8 and mail block

2005-11-14 Thread Jean-Baptiste Quenot
* Marc Salvetti:

> However, if i  just delete all geronimo-*  from web-inf/lib, the
> default cocoon fails  to launch, probably because  of some other
> block.

Please just delete  geronimo-spec-javamail-*.jar.  We also noticed
this problem, it has been very  tricky to find this out.  I'm just
filing a bug report at Cocoon in  the hope that this issue will be
adressed.

Cheers,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Is the cocoon portal redirection mandatory ?

2005-11-15 Thread Jean-Baptiste Quenot
* Jean-Christophe Kermagoret:

> When you try to connect to the portal when not connected : * the
> server sends you a new URL  to connect to through a 302 response
> with a new location that contains a cookie

Just to be sure, redirection from where to where?
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: How to reset profile information without restarting

2005-11-16 Thread Jean-Baptiste Quenot
* Jean-Christophe Kermagoret:

> When I use the profiler, I  presently need to restart the server
> if I don't  want any previous data collected.   Is there another
> way to reset profiler information ?

A bit off-topic, but I use another approach for profiling the
application: analyze the logs.  When Cocoon executes a pipeline
there's a line in the logs that looks like:

PARAM: '0' VALUE: 'my-pipeline'

I wrote a small python script to report measures:
http://svn.caraldi.com/trunk/bin/cocoontime
To use it, activate log4j in web.xml, and set the logging level to
DEBUG.  Then do:

$ tail -f log4j.log | cocoontime

Hit Control-C to interrupt the program, and cocoontime will dump
the results: first in order of execution, then in decreasing time
order.

The main problem with this script is when using « cocoon: » the
reported time is wrong.  But the sum of all times (line with TOTAL
time) is reliable.

Enjoy,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: capturing XML in forms

2005-12-22 Thread Jean-Baptiste Quenot
* Andre Juffer:

> Capturing XHTML content via forms is something I have never done
> before (and is of course  not specific to Cocoon).  Basically, I
> guess, one would have to parse the text and store the result for
> instance in a  DOM document which is subsequently  stored in the
> XML  database,  right? Or is  there  is  more simple  or  better
> solution, maybe cocoon can handle this already?

Integrated in Cocoon  there is the htmlarea  styling that displays
the  HTMLArea  editor, and  the  htmlarea  convertor in  forms  to
convert the text typed by the user to XHTML.  This is very similar
to what you intend to do, especially the convertor stuff.

See the HTMLArea forms samples at
http://cocoon.zones.apache.org/demos/release/samples/blocks/forms/htmlarea
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: Increasing Cocoon Portal speed at stat-up

2005-12-22 Thread Jean-Baptiste Quenot
* Angelo Immediata:

> ... so that i  can load only one time the  layout and use always
> them without to call getDefaultLayout  at every new request?  If
> i can do this... can you suggest how i can operate this change?

Now the loading of profiles can be cached:

See  Speedup portal loading
 http://issues.apache.org/jira/browse/COCOON-1709

Enjoy,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: force cocoon to reload web.xml and cocoon.xconf

2005-12-22 Thread Jean-Baptiste Quenot
* mgo:

> Can I force cocoon to reload this two files from perhaps another
> servlet or anything similar?
>
> At the moment it is necessary to restart whole tomcat.

Try this URL: http://yourwebapp/?cocoon-reload=1

"allow-reload" init parameter must be set to "true" in web.xml for
this to work.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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



Re: How to return xml from a flowscript?

2006-01-06 Thread Jean-Baptiste Quenot
* Jonas Lundberg:

> That might work, but it is  not a good solution for me, although
> it might work in other cases. My xqueries are very complex.  But
> this can't end here, can it? Is there really no way of returning
> XML in a parameter from a flowscript in Cocoon?

Sitemap parameters  are Strings, not  Objects.  You cannot  pass a
DOM.  However you can execute an XQuery without the
XQueryGenerator, Java snippet follows:

public static Node executeXQuery(Collection collection, Source 
inputSource, Map variables, Logger logger) throws XMLDBException {
XQueryService service = (XQueryService) collection.getService(
"XQueryService", "1.0");
service.setProperty(Serializer.GENERATE_DOC_EVENTS, "false");
if (variables != null) {
if (logger != null) logger.debug("Executing " + 
inputSource.getURI() + " with variables " + variables);
Iterator it = variables.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry)it.next();
service.declareVariable((String)entry.getKey(), 
entry.getValue());
}
} else {
if (logger != null) logger.debug("Executing " + 
inputSource.getURI());
}
ResourceSet result = service.execute(new 
CocoonSource(inputSource, true));
if (result == null) {
if (logger != null) logger.error("null result after 
executing XQuery!");
return null; // a DOM Node cannot be null so null can 
be used safely for signaling errors
}
if (result.getSize() == 0) {
if (logger != null) logger.error("empty XML result 
after executing XQuery!");
return null; // a DOM Node cannot be null so null can 
be used safely for signaling errors
}
XMLResource resource = (XMLResource) result.getResource(0);
return resource.getContentAsDOM();
}

But I think the best solution in order to save directly an XML
document in the XML database is to use the XMLDBSource with
saveDocumentToSource("xmldb:exist://localhost:8080/exist/xmlrpc/db/file.xml", 
document),
FlowScript snippet follows:

/*
 * Save XML document to source.
 * Parameters :
 *   outputMode : the desired output mode : 'html', 'xml', or 'text'
 *Defaults to "xml"
 */
function saveDocumentToSource(source, document, outputMode ) {
var tf = Packages.javax.xml.transform.TransformerFactory.newInstance();
var outputStream = null;

// If no mode is specified, we use XML
if(! outputMode) {
outputMode = 'xml';
}

try {
if (source instanceof 
Packages.org.apache.excalibur.source.ModifiableSource
&& 
tf.getFeature(Packages.javax.xml.transform.sax.SAXTransformerFactory.FEATURE)) {
outputStream = source.getOutputStream();
var transformer = tf.newTransformer();

transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.INDENT, 
"yes");

transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.METHOD, 
outputMode);
transformer.transform(
 new Packages.javax.xml.transform.dom.DOMSource(document),
 new 
Packages.javax.xml.transform.stream.StreamResult(outputStream));
} else {
throw new 
Packages.org.apache.cocoon.ProcessingException("Cannot write to source " + uri);
    }
} finally {
if (outputStream != null) {
outputStream.flush();
outputStream.close();
}
}
}

Best regards,
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

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