Re: searching with Lucene in bilingual Cocoon site

2006-06-28 Thread Christoph Hermann
Stephen Winnall schrieb:

Hello,

 I tried your suggestion but it has no effect. It still complains that
 the directory
 index does not exist.
 
 I'll take a closer look at the source code, I think.

I do:
map:generate type=search label=searchcontent
map:parameter name=index
value={realpath:{ev:/config/site/base-path}/data/lucene/site} /
/map:generate

So maybe using realpath helps in your case.

HTH
Christoph

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



Re: CFORM - repeater , add-row on OJB collection

2006-02-08 Thread Christoph Hermann
Alessandro Vincelli schrieb:

 The problem occur when i try to insert new row
 
 I receive this error on:
 form.save(Elenco);

 java.lang.NoSuchMethodException:
 org.apache.ojb.broker.util.collections.RemovalAwareCollection.add(w4b.com.cassagest.db.Docuassist)

 in my binding definition I have this:
 fb:on-insert-row
 fb:insert-bean classname=w4b.com.cassagest.db.Docuassist
 addmethod=add/
 /fb:on-insert-row

 How Can I add object to a Collection from  OJB?

This (forget about the jdo stuff):
http://www.guschtel.de/HP5/linux/ojbjdo_dmton.php
should get you started, you can specify a method in the binding.

HTH
Christoph

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



Re: CFORM - repeater , add-row on OJB collection

2006-02-08 Thread Christoph Hermann
Alessandro Vincelli schrieb:

Hi,

 But the situation if different from the example.
 I have form-repeater similar to exaple in the link, and work fine.
 
 In this situation I try to add Bean directly to a collection from OJB.
 The collection is returned from OJB.
 org.apache.ojb.broker.util.collections.RemovalAwareCollection
 
 The RemovalAwareCollection has
 RemovalAwareCollection.add(java.lang.Object)
 RemovalAwareCollection.ojbAdd(java.lang.Object)
 
 and in bind I use this method
 fb:on-insert-row
 fb:insert-bean classname=w4b.com.cassagest.db.Docuassist
 addmethod=add/
 /fb:on-insert-row
 
 But I have this problem:
 
 java.lang.NoSuchMethodException:
 org.apache.ojb.broker.util.collections.RemovalAwareCollection.add(w4b.com.cassagest.db.Docuassist)

 Any idea?

If nothing else works, you can add it yourself in some javascript
snippet in the corresponding event javascript-section.

Sorry, i don't know where your problem comes from.

Christoph

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



Re: Setting path for cookies in Tomcat / Cocoon

2006-01-24 Thread Christoph Hermann
Gerritjan Koekkoek schrieb:

Hello,

 Does this work in Tomcat 5.0 ? (the XML attribute emptySessionPath  in
 server.xml of Tomcat 5.0 is not recognized from the dtd)

See http://tomcat.apache.org/tomcat-5.5-doc/changelog.html
Add the ability to force session cookies to be set to the root path
/. This should not be used on large servers, otherwise tons of cookies
may be sent. (remm)
(would have been easy to look for this by yourself...)

Christoph

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



Re: cocoon Authentication problem

2006-01-20 Thread Christoph Hermann
Am Freitag, 20. Januar 2006 20:22 schrieben Sie:


Hello,

please point such requests to the cocoon-users list.

 In November you have helped me with a cocoon authentication problem:

 In our test situation all works fine, but we get the problem on our
 live site.
 The live site is different from test site :
 Test site url like localhost:8080/cocoon/cdls/info_index.html
 Live site url like www..org/info_index.html (using mod_proxy, see
 configuration below)

 Also in our sitemap we had to change the uri's; adding a '/' ; so /
 aanmeldfout.html/ on live site, aanmeldfout.html/ on test site

 We suspect a COOKIE problem, because the cookie from our live site
 contains a path /cocoon

 I suppose this is the problem, yes...

 In Tomcat's server.xml a connector is declared for every cocoon site
 like this:

  Connector port=8085
 proxyName=www.cdls-nl.org proxyPort=80
 maxThreads=20 minSpareThreads=5
 maxSpareThreads=10/

 You can tell tomcat to set the SessionPath to / if that is the
 problem.

 I do not know how to tell tomcat to set SessionPath to /, is it in
 server.xml?

I told you...
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=113213359604114w=2

See also
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=113153200515014w=2

HTH
Christoph

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



Re: bug in authentication framework or input module: session-context????

2006-01-18 Thread Christoph Hermann
Hans-Peter Maurer schrieb:

Hello,

 discription: (everything is inside of an protected-pipeline of the
 authentication-framework)
 1. i set session fields via setxml-statement (session transformer)
 
 2. i checked it by using getxml-statement, result: previous setxml ok!
 
 3. after setting session fields i used the session-context input module to
 get the new values of the session-fields by parameter statement
 result: i got the old values not the updated values set by setxml-statement
 in the step before
 
 does the authentication framework the commit of the
 session-setxml-update
 after finishing the protected-pipeline or is this a bug of the
 authentication framework or
 session-context-input-module?

I presume your using the session-context-input-module in your sitemap in
a matcher?
The matchers are evaluated before the rest of the sitemap is processed
if i remember that correctly. So first your sitemap is processed (your
input-module) then your setxml is executed.
Of course you get the old Value then in the sitemap.

HTH
Christoph

PS: If this is completely wrong, please correct me.

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



Re: Is it new applications developed can integrate with apache lenya ??

2006-01-05 Thread Christoph Hermann
Am Freitag, 6. Januar 2006 07:45 schrieb zulhisham abu nawar:

Hello,

 i'm newbie in cocoon and lenya. i have already up lenya server (lenya
 1.2.4 n cocoom 2.1.7) on top tomcat server. My question are :
 1. Can i up my cocoon server at the same time lenya up too?

yes. Lenya is cocoon-based, so its already running.

 2. Can i create new application based on cocoon then the application
 can integrate with lenya cms??

Yes. this should also be possible.

Christoph

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



Re: How to load form using request parameter

2005-12-08 Thread Christoph Hermann
[EMAIL PROTECTED] schrieb:

Hello,

 I'm have a problem with making a form for editing an XML file using cform.
 We have an XML file called users.xml which looks like this:
 users
   user id=1
 ...
   /user
   user id=2
 ...
   /user
   ..
 /users
 
 I succeeded in making an editable tabel, using de repeater widgets etc. But
 what I want is making a form for editing one single user at the time / in
 one screen..
 Therefore I changed de model, template and binding XML file (removing
 repeater items).
 The probleem now is that always the user with id=1 is being loaded
 (updating this one works fine by the way).
 How can we load a user tag voor a specific user id, which value is in a
 request Parameter ( ../user.flow?userid=2 )?

Just adapt your (jx-)binding file:

fb:context
xmlns:fb=http://apache.org/cocoon/forms/1.0#binding;
xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;
path=/users/[EMAIL PROTECTED]'${parameters.getParameter('userid')}']
fb:value id=username path=username /
...
/fb:context

HTH
Christoph

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



Re: Making Cocoon the default

2005-12-08 Thread Christoph Hermann
Peter Flynn schrieb:

Hello,

 I don't have an application -- at this stage I just built
 the default war for testing, and moved cocoon.war into 
 Tomcat's webapps folder, where it works just fine with the 
 default setup, which I have running on port 80 as the sole 
 server (no httpd). But I do  want to get rid of the /cocoon/ in all URIs
 because on this server, *everything* will be 
 served from Cocoon.

Just set the Context Path to .
Then Cocoon should get the default context.
http://tomcat.apache.org/tomcat-5.0-doc/config/context.html

HTH
Christoph

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



Re: How to load form using request parameter

2005-12-08 Thread Christoph Hermann
Sylvain Wallez schrieb:

 Just adapt your (jx-)binding file:

 fb:context
 xmlns:fb=http://apache.org/cocoon/forms/1.0#binding;
 xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;
 path=/users/[EMAIL PROTECTED]'${parameters.getParameter('userid')}']
 fb:value id=username path=username /
 ...
 /fb:context

 Uh, does this really work? Where does this parameters variable come from?

i use:
path=/users/[EMAIL PROTECTED]'${parameters.getParameter('param1')}']

this way it does not have to be a userid, then:

var bindingURI = cocoon:/dynamic-binding/editUser/ + userid;
var document = loadDocument(documentURI);
form = new Form(cforms/definition/editUser_def.xml);
form.createBinding(bindingURI);
form.load(document);

and then in the sitemap:

map:match pattern=dynamic-binding/*/*map:generate type=jx
src=cforms/binding/{1}_bind.xml
map:parameter name=param1 value={2} /
/map:generate
map:serialize type=xml /
/map:match

works fine for me.

Christoph

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



Re: Maintain the state of visited links

2005-11-29 Thread Christoph Hermann
Fadi Qutaishat schrieb:

Hello,

 Do you think the encodeURL transformer would help me?

I don't think so. What i would do is remember on the serverside if a
link was already visited, and if so display the link styled with another
 class than an unvisited link.

You would then generate the links on the serverside (pseudocode):

if (MyApp.isVisitedLink(url)) {
  class=visited
} else {
  class=link
}
displayLink(url,class);


I.e.:
a href=http://www.example.com/page.html; class=visitedSome Page/a
a href=http://www.example.com/p2.html; class=linkOther Page/a

And link would style Links in blue and visited would style them in
green (or whatever else).

HTH
Christoph

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



Re: Authentication problem

2005-11-16 Thread Christoph Hermann
Gerritjan Koekkoek schrieb:

Hello,

 In our test situation all works fine, but we get the problem on our 
 live site.
 The live site is different from test site :
 Test site url like localhost:8080/cocoon/cdls/info_index.html
 Live site url like www..org/info_index.html (using mod_proxy, see 
 configuration below)
 
 Also in our sitemap we had to change the uri's; adding a '/' ; so /
 aanmeldfout.html/ on live site, aanmeldfout.html/ on test site
 
 We suspect a COOKIE problem, because the cookie from our live site 
 contains a path /cocoon

I suppose this is the problem, yes...

 In Tomcat's server.xml a connector is declared for every cocoon site 
 like this:
 
 Connector port=8085
proxyName=www.cdls-nl.org proxyPort=80
maxThreads=20 minSpareThreads=5  maxSpareThreads=10/

You can tell tomcat to set the SessionPath to / if that is the problem.

emptySessionPath=true

 Tomcat listens to port 8080.
 
This does not match the Connector (8085)

 If the proxy rules are changed into
 
   ProxyPass/ http://localhost:8080/cocoon/cdls/
   ProxyPassReverse / http://localhost:8080/cocoon/cdls/

Why 8080 here and not 8085?

 and Apache is restarted, the problem still exists.
 
 I don't know if we need these connectors.

Which ones?
And why don't you use mod_jk to connect apachetomcat?

 The site runs SuSE Linux 9.2 on a Pentium pc with Sun Java 1.4.2, 
 Tomcat 5.0
 and Cocoon 2.1.7

HTH
Christoph

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



Re: CForms - different views of the same widget

2005-11-11 Thread Christoph Hermann
Derek Hohls schrieb:

Hello,

 I cannot the import class to work - I have added:
 
 importClass(Packages.org.apache.cocoon.forms.formmodel.WidgetState);
  
 at the start of the flowscript; and get the error:
  
 org.mozilla.javascript.EvaluatorException: 
 file:/D:/tomcat/webapps/cocoon/projects/inddb/script/dbtest.js, line 14: 
 Not a Java class: [JavaPackage org.apache.cocoon.forms.formmodel.WidgetState]
 
 Any ideas how to do th eimport correctly?

I just use it directly:
form.lookupWidget(mywidget).setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);

This works fine.

HTH
Christoph

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



Re: CForms - different views of the same widget

2005-11-11 Thread Christoph Hermann
Derek Hohls schrieb:

Hello,

 If you look back at this thread, the idea is to have this in the
 form definition file i.e.
  
   fd:on-value-changed
  fd:javascript
var thisWidget = event.source;
if ( thisWidget.getValue() ==  ) {
  thisWidget.setState ( ACTIVE )
}  else  {
 thisWidget.setState ( OUTPUT )
}
   /fd:javascript
   /fd:on-value-changed 
  
 I do not think the form.lookupWidget approach works here...

Why not?
At least i'm able to ;-)

*hint*
var widget = event.source;
var form = widget.form;

 is there something else you can suggest?
  
 When I try 
  
 thisWidget.setState ( 
 Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE )
  
 Then I get an unknown setState() function error.

fd:field id=someWidget required=true
...
fd:selection-list ... dynamic=true/
fd:on-value-changed
fd:javascript
...
var widget = event.source;
var form = widget.form;
...
if (someCondition) {
form.lookupWidget(someOtherWidget).setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
} else {
form.lookupWidget(someOtherWidget).setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
}
/fd:javascript
/fd:on-value-changed
/fd:field

HTH
Christoph

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



Re: Setting path for cookies in Tomcat / Cocoon

2005-11-09 Thread Christoph Hermann
Yves Vindevogel schrieb:

Hello,

 Searching a bit more it looks like Tomcat as of 5.5.4 has the ability 
 to set the path:
Add the ability to force session cookies to be set to the root path
 
 Yes, indeed.  Is a bugfix in 5.5.  But I'm running 5.0.  If I need to 
 upgrade to get it working no problem, but I would first like to try 
 with my current setup.
 
'/'. This should not be used on large servers, otherwise tons of
cookies may be sent. (remm)
 (from http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html)
 ...but I didn't find how exactly to invoke that feature.

 No, indeed, that is were the statement ended.  If somebody is running 
 5.5, he/she might run a search in the config files on the word proxy 
 and find something.
 Could somebody post the tag then ?

I found it (asked in freenode irc/#tomcat) ;-)
*hooray*

http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
= emptySessionPath

I do it this way (Apache+mod_jk + some mod_rewrite rules (this is why i
need it) + Tomcat):

Connector port=8009 enableLookups=false redirectPort=8443
emptySessionPath=true protocol=AJP/1.3 /

Hope this helps some people :-)
Christoph

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



Re: VelocityGenerator: error when sending string containing ampersand

2005-10-24 Thread Christoph Hermann
Andreas Deininger schrieb:

Hello,

This seems to be a bug with the Velocity Generator as the sent value is
not escaped, i.e.  remains  and does not get converted to amp; in the
resulting XML. You might file a bug report for it.

 I would like to, however I encounter the following message:
 
  Sorry, entering bugs into product Cocoon 2 has been disabled.
 
 Any special reason for that (upcoming release of version 2.1.8??)

Yes and no. The reason is that all Bugs are moved from bugzilla to Jira
(see dev-list).
So you should be able to enter a new Bug in Jira (imho).

HTH
Christoph

-
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 Christoph Hermann
Christofer Dutz schrieb:

hello,

 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.

This is not possible (imho).
You have to store the Username in the default Session(-context).

HTH
Christoph

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



Re: repeaters alternate row colours

2005-10-13 Thread Christoph Hermann
Gunter D'Hondt schrieb:

Hello,

 In my form template I'd like to have alternate colours on the repeater 
 rows so that the output is something like 
 tr id=row1.../tr
 tr id=row2.../tr
 tr id=row1.../tr
 ...

Use the JX Macros to do this:
jx:import
uri=resource://org/apache/cocoon/forms/generation/jx-macros.xml/
...
jx:choose
jx:when test=${repeaterLoop.index % 2 == 0}
!-- i'm not sure about the %2 == 0 Syntax, but it should get 
you
going --
...
/jx:when
jx:otherwise
/jx:otherwise
/jx:choose

HTH
Christoph

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



Re: LDAP operations in cocoon -Virus checked-

2005-10-10 Thread Christoph Hermann
Am Montag, 10. Oktober 2005 17:33 schrieb David Duhme:

Hello,

 I successfully implemented LDAP authentication for the portal which in
 fact is just a read operation.

fine.

 But now I need my webapp to read entries from a LDAP directory (Lotus
 Domino in my case)
 and make some attributes editable with CForms.

I really don't know how to make this (updates) work with the LDAP Transformer.

 I'm not sure wether to use the LDAP Transformer or the LDAPEntryManager.
 LDAPEntryManager seams more suiteable to me because it's accessable
 from FlowScript.

 Please could somebody give me a hint on how to get started with the
 LDAPEntryManager.
 Or am I better off with the LDAP Transformer??

A Quote from IRC (FreeNode #cocoon:Okt 03 17:55:39):
ugocei   just write a component that updates an LDAP directory and call it 
from flowscript, action or XSP
ugocei   if you want a decent LDAP client library, use the Novell one
ugocei   LDAPModification mod[] = new LDAPModification[1];
ugocei   LDAPAttribute userPassword = new LDAPAttribute(userPassword, 
user.getPassword());
ugocei   mod[0] = new LDAPModification(LDAPModification.REPLACE, 
userPassword);
ugocei   LDAPConnection lc =  /* Open a connection somehow */
ugocei   LDAPConnection lc = new LDAPConnection();

HTH
Christoph

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



Re: generating emails from flow dom object

2005-10-09 Thread Christoph Hermann
Am Sonntag, 9. Oktober 2005 12:46 schrieb Christofer Dutz:

Hello,

 I am working on this for quite some time and my brain is running dry at the
 moment :-(

 I have a small shoping cart, where all information is stored in a simple
 w3c dom object. What I would like to know how I can do the following:


 Generate and send a nicely formatted Email from the dom-object:

 1.  somehow generate content form the flow object
 2.  do an XSLT to make it look nice
 3.  send the email to a fixed address and one defined in the dom-object
 4.  show the user some failure/success page

You could just do it like this:

(from flow):
cocoon.sendPage(my-email-pipeline,{data:mydomdata});

and then

map:match pattern=my-email-pipeline
map:generate src=module:flow-attr:data /
map:transform src=data2email.xsl /
map:transform type=sendmail /
map:transform src=email2html.xsl /
map:serialize type=html /
/map

See the docs of the sendmailtransformer on how to send an email.

HTH
Christoph

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



Re: session-context:authentication not working... why?

2005-10-07 Thread Christoph Hermann
Antonio Fiol Bonnín schrieb:

Hello,

 Does anyone see why this tells me that:
 
 org.apache.excalibur.source.SourceException:  The attribute: 
 authentication/authentication/data is empty
 
 
 map:act type=auth-protect
 map:parameter name=handler value=auth-handler/
 map:generate
 src=module:session-context:authentication/authentication/data /
 map:serialize /
 /map:act

If the element data is empty it cannot be used as generator input.
Either use
src=module:session-context:authentication/authentication /
and make sure this is always containing sth or try if you can circumvent
this with map:select type=resource-exists

HTH
Christoph

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



Re: session-context:authentication not working... why?

2005-10-07 Thread Christoph Hermann
Antonio Fiol Bonnín schrieb:

Hello,

org.apache.excalibur.source.SourceException:  The attribute: 
authentication/authentication/data is empty

If the element data is empty it cannot be used as generator input.
Either use
src=module:session-context:authentication/authentication /
and make sure this is always containing sth or try if you can circumvent
this with map:select type=resource-exists

 Same result:
 The attribute: authentication/authentication is empty
 
 With src=module:session-context:authentication I also get:
 The attribute: authentication is empty

Hmm, i think it has to do with the difference with Attribute and XML.

In Fact the session-context Module looks for an *Attribute*, what you
need it is to look for an *XPath expression*. I think there is an XML
Module, maybe the JXPathMetaModule or XMLMetaModule or sth like that,
don't know.
Otherwise you would have to write your own Input Module (thats easy).

HTH
Christoph

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



Re: multiple xpaths

2005-10-04 Thread Christoph Hermann
Sandor Spruit schrieb:

Hello,

 ... select=xalan:evaluate($parameter_xpath)

 I was hoping for a reply like this - even though a dynamic stylesheet
 seemed to be a smart move :) I'll give it a try this afternoon.

 The use of an extension function *would* but much easier - if it worked,
 but it doesn't. The extension function does not seem to be allowed as the
 pattern in xsl:template match=pattern. Errors all over the place.
 
 Was does work is the use of the extension in calls to xsl:apply-templates,
 but that is not what I want. It will help iff you want to apply a
 template to
 one specific XPath. What I need is to copy the entire XML tree using a
 regular xsl:copy, with some extra highlighting tags inserted for the XPath.

An other Idea i came up with yesterday was the use of names for your
template.
So if you do a
xsl:template match=*
xsl:apply-templates select=xalan:evaluate($parameter_xpath)
mode={$parameter_xpath} /
/...

and then a
xsl:template match=* mode={$parameter_xpath} ...

(untested)
I don't know if this works, maybe substitute the
mode={$parameter_xpath} with mode=somestring.

Christoph

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



Re: dynamic template matches

2005-10-04 Thread Christoph Hermann
Geert Josten schrieb:

Hello,

 No, this gets worse, actually. You cannot use parameters or expressions
 at all in a mode attribute. :-(

 And by replacing the expression by a string, you remove the dynamic
 element again.. :-P

 Why? I mean the xpath string is still evaluated for a different xpath.
 Or do you need every xpath to be processed differently?
 If then make the difference by looking at your variable (which is
 static).

 You can use a literal xpath string in a mode attribute, but you will
 have to guess which xpath expressions might occur if you want the XSL to
 be static.
 
 Next to this, you cannot use {..} inside a mode attribute, not at
 xsl:apply-templates, nor at xsl:template.

What i meant was:

template match=*
xsl:apply-templates select=xalan:evaluate($xpath) 
mode=my-xpath-mode/
/template

template match=* mode=my-xpath-mode
choose
!-- Or any other check --
when test=contains($xpath,'sth')
Do sth with nodes when the xpath contains sth
/when
otherwise
Do sth else
/otherwise
/choose
/template

 You could use your method in a generated XSL, though, but then are you
 making things more difficult than necessary.. :-P

And the above example would match the xpath expression contained in
$xpath doesn't it? (That was the Goal i thought.)

Christoph

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



Re: flow problem with reload button

2005-10-04 Thread Christoph Hermann
Antonio Fiol Bonnín schrieb:

Hello,

 I am having strange problems (described below) when hitting the reload
 button on my browser when displaying form B in scenario described below.
 Could anyone please help me understand why?
 
 I am using a 2-form approach to editing an XML file, one for a first
 level view and a deeper detail editing view.

 formLista = createForm(formDefinitionA, bindingURIA, datos);
 
 while(true) {
 
  // display form A
  formLista.showForm(displayPipelineLista);
 
 // *
 // If I hit reload when form B is displayed, execution is resumed here,
 but formLista is undefined
 // Why is it null? Shouldn't it be restored to the previous value
 because of my hitting Reload.
 // *

I had the same problem here with flow but a light different approach:

i.e.
var form;
form = new Form(...);
form.showForm(..:);
// hitting reload here crashes with an NPE
form = new Form(someOtherForm);
form.showForm(...);

My solution was to create a second variable form2 to display the
second form.
I think your problem is somewhere along

formLista = null;
// Prepare form B, using the ID for the new or edited record
formFicha = createForm(formDefinitionB, bindingURIBPrefix +
idRestaurante, datos);

Try changing this to another Variable.

HTH
Christoph

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



Re: flow problem with reload button

2005-10-04 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

 I think your problem is somewhere along
 
 formLista = null;
 // Prepare form B, using the ID for the new or edited record
 formFicha = createForm(formDefinitionB, bindingURIBPrefix +
 idRestaurante, datos);


 Try changing this to another Variable.

What i meant:

try removing the = null part, does that change anything?

Christoph

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



Re: multiple xpaths

2005-10-03 Thread Christoph Hermann
Am Sonntag, 2. Oktober 2005 21:04 schrieb Sandor Spruit:

Hello,

 Don't know about the best way, but I had a similar problem recently:
 I wanted to apply a transformation to specific elements, pointed to by
 an XPath expression. The basic problem was that XSLT will not allow
 a variable where it expects an XPath, i.e. xsl:template match=$xpath.

 One of our students came up with this idea: create the *stylesheet* in a
 separate (internal) Cocoon pipeline. Create a placeholder in your XSLT
 where you'd normally insert an XPath expression, i.e. 'please-replace-me',
 and define a variable for this stylesheet. Write a simple stylesheet to
 copy the stylesheet template, but replacing the placeholder with your
 XPath.

 Use the result of this pipeline ('a dynamic stylesheet') from your regular
 Cocoon pipeline using the cocoon:/ pseudo-protocol.

Wouldn't it be _much_ easier to use xalan extensions for this purpose?

xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:xalan=http://xml.apache.org/xalan;
  xsl:param name=parameter_xpath/
...
... select=xalan:evaluate($parameter_xpath)

HTH
Christoph

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



Re: Using the output of a pipeline to call another pipeline?

2005-09-30 Thread Christoph Hermann
Derek Hohls schrieb:

Hello,

 Thank's for the replies,
 Both using an action, and using a flowscript seem promising, but also
 problematic.
 
 For the flowscript solution to work, I need to read the xQuery result
 from a cocoon pipeline. Unfortunately, cocoon.processPipelineTo() does
 not work as in this example:
 readImage() {
 // get request uri in here somehow
 var realfile =
 cocoon.processPipelineTo(flow/locateimage+cocoon.getRequestUri());
 
 //parse response
 var realFilename = getFilenameFromResponse(realfile);
 
 Cocoon.sendPage(flow/readimage/+realFileName);
 }
 processPipelineTo wants an outputstream to send the response to,
 rather than storing it in a variable, as I need to do. Is there a way
 around this?

Just do it like this (if i got you right):

var output = new Packages.java.io.ByteArrayOutputStream();
cocoon.processPipelineTo(flow/locateimage+cocoon.getRequestUri(),null,output);

var realFilename = getFilenameFromResponse(output.toString());
// or whatever you want to do with it

HTH
Christoph

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



Re: How to *not* return a page

2005-09-28 Thread Christoph Hermann
Upayavira schrieb:

Hello,

 Thanks for the detailed suggestion; I was hoping to avoid having to do
 any Java coding amp; was hoping there might
 be a more standard way of doing this  if not, where is the best
 place to start learning how to code such a beast (the website has this
 page:
 http://cocoon.apache.org/2.1/userdocs/concepts/actions.html which
 seems a little rough round the edges)?
 
 
 Isn't there a flowscript action - allowing you to code an Action in
 javascript? Remember talk of it, just not whether or not it was
 implemented.

In the docs one can find a ScriptAction, but never tried it.
http://cocoon.apache.org/2.1/userdocs/actions/script-action.html

Another option would be an XSPAction.

Christoph

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



Re: A cocoon demo site

2005-09-24 Thread Christoph Hermann
Am Samstag, 24. September 2005 19:34 schrieb Jean-Claude Moissinac:

Hello,

 I'm searching documentation to define a widget as a multiple line string
 and I don't find that in the Cocoon site.
 I've see such multiple line fields in your site.
 How this is it done?

With the fi:styling in the template.

fi:styling type=textarea cols=10 rows=5 /

HTH
Christoph

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



Re: Auth-fw request-parameter

2005-09-23 Thread Christoph Hermann
Andreas Busch schrieb:

Hello,

 Im searching for a solution to take a requestparameter over the login -
 process
  
 exampl:
 http://???/protected?docid=777
  
 will be redirect to login - do login and than to protectd
  
 how to preserver the request-paramter {docid} untio login ?
  
 (is it a question of redirect-to ??)

append the original uri:

in auth-conf-section:

redirect-to uri=cocoon:/global-login/

sitemap-match:

map:match pattern=global-login
map:redirect-to  uri=/login?resource={request-param:resource} /
/map:match

and also in your auth-pipeline:

map:act type=auth-login
map:parameter name=handler value=myhandlername/
map:parameter name=parameter_username
...
map:select type=parameter
map:parameter name=parameter-selector-test
value={request-param:resource}/
map:when test=
map:redirect-to uri=index /
/map:when
map:otherwise
map:redirect-to uri={request-param:resource} /
/map:otherwise
/map:select
/map:act

HTH
Christoph

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



Re: set request header fields

2005-09-21 Thread Christoph Hermann
Reinhard Haller schrieb:

Hello,

 how to add the Pragma: no-cache for the submitted request
 to www.some.server/data.xml?
 
 map:match pattern=new.html
map:generate src=http://www.some.server/data.xml/
map:transform src=xml2html.xslt /
map:serialize/
 /map:match

Have a look at the set-header action.
HTH
Christoph

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



Re: CForms: Binding nested repeaters into beans

2005-09-20 Thread Christoph Hermann
Am Dienstag, 20. September 2005 23:20 schrieb Victoria Vitaver:

Hi,

  maybe this will help: http://joose.iki.fi/ojb/
  There is example of repeater and beans...

 Thanks, I've already followed this tutorial  (BTW. thank you, this tute
 helped me _a lot_ when setting up OJB)

 Basically I have no problems mapping repeaters to beans .. its the
 repeaters within other repeaters that seem to cause me quite a bit of pain
  don't work... I havn't been able to find a sample of mapping nested
 repeaters into beans although I have found a few binding nested repeaters
 into XML files.

What is your problem _exactly_?

Should only be a matter of setting path and parent-path in the repeater 
binding or am i wrong?

I must admit i never tried this. My examples (based on joose ones: 
http://www.guschtel.de/HP5/linux/ojbjdo_dmton.php) are only with one 
repeater.
In xml i had no problems with nested repeaters.

Christoph

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



Re: [Cforms] Activating/Hiding whole repeaters?

2005-09-13 Thread Christoph Hermann
Florian Leinberger schrieb:

Hello,

 I would like to display/hide a whole repeater (containing several widgets) in 
 a
 cocoon form depending on which value is selected in a select-field above this
 repeater.
 
 I know how this can be done with single widgets using javascript in the form
 definition, like 
 setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
 setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE);  
 
 I would appreciate any hints if this can be done in a similiar way to 
 show/hide
 not only a single widget but a whole repeater containing several widgets (with
 all its repetitions). I tried RepeaterState which didn't work though :-(

If you don't get this working, you could activate JX in your form
template and display the repeater according to your select field with
the jx macros.

See the dreamteam example.

HTH
Christoph

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



Re: Using Cocoon as a SOAP Client

2005-09-12 Thread Christoph Hermann
Bertrand Delacretaz schrieb:

Hello,

 ...is there an easy way to use cocoon as a SOAP Client?..

 Did you have a look at http://wiki.apache.org/cocoon/FlowAndWebServices ?
 I don't know how current it is, or even it it works, but it looks
 promising.

Thanks for the hint!
It works fine (retrieving a version).
Now i need to find out what would happen if the Service returns XML and
how this has to be processed further.

Christoph

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



Re: Using Cocoon as a SOAP Client

2005-09-12 Thread Christoph Hermann
Bertrand Delacretaz schrieb:

Hello,

 http://wiki.apache.org/cocoon/FlowAndWebServices ?...
 It works fine (retrieving a version).

 Ok - if you develop this further it might be nice to integrate in
 Cocoon, as a block or sample.
 
 Please keep us posted, or update the wiki page with your findings!

Okay, i managed to get the Google SOAP api working with this, only
problem is that i always get Beans with this.
(Howto: get googleapi.zip unzip, run the flowscript with the wsdl file
from there (java classes are generated) compile these and use them (easy)).

What i would like to do is receive some xml back from an soap call and
continue to work with it. On the dev-list Stephan Zuercher wrote
something about a SOAPGenerator and SOAPSerializer. Does someone
know if these can be used for the client-side of a soap-request?

If not, i also found the xmlhttp-transformer
(http://www.xml.com/pub/a/ws/2003/03/18/cocoon.html) which allows me to
transform soap-requests and gives me the response directly in the
document with an xht:exception if something failed. Works fine also.

Christoph

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



Using Cocoon as a SOAP Client

2005-09-09 Thread Christoph Hermann
Hello,

is there an easy way to use cocoon as a SOAP Client?
I found the SOAP Logicsheet
(http://wiki.apache.org/cocoon/SOAPLogicsheet) but what i would like to
have is some sort of SOAPTransformer or Generator which acts as SOAP
Client.
What i want to do is fetch some XML Data via an SOAP Request and then
save it (maybe after validation against a Schema). Is there way to do this?

Christoph

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



Re: ProxyPass(Reverse)

2005-09-06 Thread Christoph Hermann
Yves Vindevogel schrieb:

Hello,

 Do you know where I set it in Tomcat 5 ??

No sorry, i just know how to adjust the session livetime.
If you make your cookies yourself you can use this:

javax.servlet.http.Cookie sessionCookie = new
javax.servlet.http.Cookie(JSESSIONID,mySession.getId());
sessionCookie.setPath(/);
response.addCookie(sessionCookie);

This should also override any JSESSIONID Cookies.

HTH
Christoph

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



LDAP over SSL

2005-09-05 Thread Christoph Hermann
Hello,

is it possible to use the LDAP transformer to connect via SSL?
The only thing i found about this is:
http://66.249.93.104/search?q=cache:UpAk340B8tEJ:archives.real-time.com/pipermail/cocoon-users/2004-February/047030.html+cocoon+ldapshl=de

and there is no real answer to this.
So, is it possible (i.e. with ldaps://-url)? Or would i have to patch
the LDAPTransformer?

What i want to realize is a simple auth against the ldap server.

Christoph

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



Re: LDAP over SSL

2005-09-05 Thread Christoph Hermann
Alberto Brosich schrieb:

Hello,

So, is it possible (i.e. with ldaps://-url)? Or would i have to patch
the LDAPTransformer?

 ldaps:// works with port 636 but you must import certificate of the ldap
 server you want to connect to (with keytool java utility).

Thanks for the hint! Can you also tell me in which file (keystore) i
have to put the certs in order to work with cocoon? (started via jetty?)

Christoph

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



Re: ProxyPass(Reverse)

2005-09-05 Thread Christoph Hermann
Am Montag, 5. September 2005 23:09 schrieb Yves Vindevogel:

Hello,

 It is not for Cookies but for sessions.  Do sessions use cookies in
 Cocoon ?

The sessionid (id to identify the session) is propagated via cookies if 
enabled.

Thats why i gave you the hint.

Christoph

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



Re: ProxyPass(Reverse)

2005-09-04 Thread Christoph Hermann
Am Sonntag, 4. September 2005 23:45 schrieb Yves Vindevogel:

Hello,

 I just tested and ProxyPass(Reverse) with exactly the same arguments
 keeps the session information

 If I do  ProxyPass(Reverse) /cocoon/subdir/
 http://127.0.0.1:8080/cocoon/subdir/my session information is kept.

 Now I only need to find a way to link / to /cocoon/subdir/  because
 when I  use that, I lose it again.

I assume this has to do with the cookies path-string.
Maybe adjust this for the domain or something (just an idea).

HTH
Christoph

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



Several Crawlers with different configurations / Lucene Index

2005-08-30 Thread Christoph Hermann
Hello,

i wanted to know if there is a way to configure different
indexer/crawler (in cocoon.xconf?) so that i.e. crawler one only crawls
urls under a certain directory i.e. http://www.example.com/foo/bar (the
crawler would NOT visit example.com/baz/boo) and crawler two crawls the
entire site (example.com).

In cocoon.xconf it seems there is only one possibility to specify
configuration options. I already modified the LuceneUtil java class to
permit me to create different indexes in whatever directory i want, but
i also need to have a possibility to restrict the crawling process a
little more.

I thought about specifying different views for different crawlers, but
as it seems i cannot specify two crawler.

Is there a way to do this?

With kind regards,
Christoph

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



Re: SVG SVG via xslt

2005-08-30 Thread Christoph Hermann
Lincoln Mitchell schrieb:

Hello,

 I am trying to generate an SVG file from an Adobe illustrator SVG file
 via XSLT/Cocoon.

 If I delete the DOCTYPE (and the xmlns’ on the svg tag) then all works
 fine – but I want the file to stay intact – so that’s not an option.

How about stripping the namespaces with an additional xsl file? This way
your first file remains intact?

---snip---
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:strip-space elements=*/

xsl:template match=/
xsl:apply-templates mode=copy/
/xsl:template

xsl:template match=* priority=-1 mode=copy
xsl:element name={name()}
xsl:copy-of select=@*/
xsl:apply-templates mode=copy/
/xsl:element
/xsl:template
/xsl:stylesheet
---snap---

HTH
Christoph

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



Cforms Repeater - Cancel delete action via javascript

2005-08-26 Thread Christoph Hermann
Hello,

Is there a way to cancel a repeaters delete-row action in case a certain
condition is met?

I tried to put a javascript return false; in the on-action, but this
throws an error.

Maybe someone of you knows this?

Christoph

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



Re: xsl: apply templates

2005-08-18 Thread Christoph Hermann
Oliver Schalch schrieb:

Hello,

 Since I was threw into a big project and have to pull me more or less
 byself throught it, i have questions from the following lines, or if any
 can explain me what exactly will happen in this .xsl file:

I would recomment to read some Info about XSL(T):
http://www.w3schools.com/xsl/
After reading this, you should understand.

 This is between a html form:
 xsl:apply-templates select=/lex:output/lex:lexeme
 xmlns:lex=http://chaperon.sourceforge.net/schema/lexer/2
 .0/

This chooses the element /lex:output/lex:lexeme
(i.e. lex:outputlex:lexeme text=barfoo/lex:lexeme/lex:output)
and applies the corresponding template (see above).

 And this is after the /html:
 xsl:template match=lex:lexeme
 xmlns:lex=http://chaperon.sourceforge.net/schema/lexer/2.0;xsl:value-of
 select=@text//xsl:template

This template matches lex:lexeme and selects the Value of the
attribute text. (i.e. bar in the example above)

The xmlns:lex=... is the Namespace declaration.

 Of course this is in a xsl:stylesheet.
 
 I would be happy if someone coulde explain me, step for step, where it
 goes trought, and, where I find the parts to read the documentation
 about those things. I just need some pushes until I get my Aha :-).

HTH
Christoph

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



Re: Problem with XMLDB Transformer

2005-08-11 Thread Christoph Hermann
Am Donnerstag, 11. August 2005 03:03 schrieb Antonio Gallardo:

Hello,

 Wich cocoon version are you using?

2.1.8-dev from svn.
The Problem only exists with eXists XMLDBTransformer, but Cocoon ones (which 
is less powerful imho) works.

Christoph

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



OT: Suse (was: Cocoon and linux)

2005-08-11 Thread Christoph Hermann
Am Donnerstag, 11. August 2005 02:21 schrieb Antonio Gallardo:

Hello,

 2. Is SUSE a good version of Linux?
 
 I'd say Suse is the Windows under the *ix Os'es.
 If you can live with that...

 I don't got the point? Can you explain better? ;-)

I didn't want to, thats why i didn't write it ;-)
Suse is, lets say stubborn in some cases, and very coloured and 
user-friendly (imho).
From a linux system i expect to know what it does all the time, with Suse i do 
not have that feeling. Hope this explains my opinion a little better.

Christoph

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



Re: Problem with XMLDB Transformer

2005-08-10 Thread Christoph Hermann
Jonas Lundberg schrieb:

Hello,

 I also get that null pointer exception with the xmldb transformer and eXist.

Maybe someone can help with this?
Heres a stack trace:

---snip---
java.lang.NullPointerException
at
org.apache.cocoon.transformation.AbstractSAXTransformer.startPrefixMapping(AbstractSAXTransformer.java:392)
at
org.exist.cocoon.XMLDBTransformer.startPrefixMapping(XMLDBTransformer.java:526)
at
org.apache.cocoon.xml.AbstractXMLPipe.startPrefixMapping(AbstractXMLPipe.java:66)
at
org.apache.cocoon.xml.RedundantNamespacesFilter.startElement(RedundantNamespacesFilter.java:69)
at
org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:2949)
at
org.apache.cocoon.generation.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:2486)
at
org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2480)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339)
at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59)
at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:894)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269)
at inv6.invoke()
at 
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1134)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
at
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:755)
at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:135)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
at

Re: Cocoon and linux

2005-08-10 Thread Christoph Hermann
Am Mittwoch, 10. August 2005 22:04 schrieb Uzo Andrew Madu:


Hello,

 I have decided to do away with Microsoft 2000 server and am now
 planning to install SUSE LINUX Professional 9.3 from Novell on my
 machine. Can someone please tell me:

 1. Will Cocoon run on Linux?

yes.

 2. Is SUSE a good version of Linux?

I'd say Suse is the Windows under the *ix Os'es.
If you can live with that...

Christoph

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



Re: Debugging Cocoon Apps

2005-08-09 Thread Christoph Hermann
Ralph Goers schrieb:

Hello,

 I know IntelliJ won't mess with the contents of your project in
 any way - it surprises me that Eclipse would.

I set the class output folder to WEB_INF\classes and when i do a Clean
all in eclipse (3.0.1) it deletes all jars and .class files under
WEB-INF\classes (also the ones not build by eclipse). (Very bad imho.)

Christoph

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



Problem with XMLDB Transformer

2005-08-09 Thread Christoph Hermann
Hello,

did anyone get the xmldb transformer working?
I always get a NullPointerException when using it, no matter what i do.

Christoph

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



Re: Problem with XMLDB Transformer

2005-08-09 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

 did anyone get the xmldb transformer working?
 I always get a NullPointerException when using it, no matter what i do.

To specify this a little more precisely: I get an NPE when using the
Transformer from eXist, using the one with cocoon seems to work.

But i have now the problem, that i have to specify the user (like
request:set-current-user in xquery) but in xupdate.
What i do is the following:

db:query type=update oid=users.xml
xupdate:modifications version=1.0
xupdate:update select=/users/[EMAIL PROTECTED] = 1]/foobar/xupdate:update
/xupdate:modifications
/db:query

This works fine if the file is world-writable, but not if i set specific
 permissions.

So my question would be: Is there a way to specify user/password either
for the transformer or in an xml document?

Christoph

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



Re: Problem with XMLDB Transformer

2005-08-09 Thread Christoph Hermann
Jonas Lundberg schrieb:

Hello,

 I also get that null pointer exception with the xmldb transformer and eXist.

You can avoid the NPE when you use:
map:transformer logger=sitemap.transformer.xmldb name=xmldb
src=org.apache.cocoon.transformation.XMLDBTransformer

instead of

map:transformer name=xmldb src=org.exist.cocoon.XMLDBTransformer

Problem is, with the eXist XMLDB Transformer you can specify
user/password (see
http://exist.sourceforge.net/api/org/exist/cocoon/XMLDBTransformer.html#setup)
and with cocoon one's i don't seem to be able to do that.
If i'm wrong I'd be happy to hear how one can do this :)

Christoph

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



Re: Binding framework changing value before update.

2005-08-08 Thread Christoph Hermann
Aurelien DEHAY schrieb:

Hello,

 I'm a really great beginner with the binding framework. My question is
 very simple: I've got a password field I'd like to md5() before putting
 it in my exist database.

I do that in flow:

form = new Form(cforms/definition/editUser_def.xml);
form.createBinding(bindingURI);

form.load(document);

var oldhash = form.lookupWidget(pass).getValue();
print (oldhash:  + oldhash);
// prevent password value from leaving server
form.lookupWidget(pass).setValue(null);

// display form
form.showForm(editUser-display-pipeline);

// hash pass if entered
if (form.lookupWidget(pass).getValue() != null) {
//hash password
print(hashing...);
var hash =
Packages.de.iif.chermann.crypt.MD5.md5(form.lookupWidget(pass).getValue());
form.lookupWidget(pass).setValue(hash);
} else {
print(pass not given, setting original hash);
form.lookupWidget(pass).setValue(oldhash);
}
form.save(document);
//save bean back to eXist xml db
saveDocumentAuth(document, docName, docBaseURI, user, pass, true);

HTH
Christoph

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



Send Mail with SMTP-Auth

2005-08-05 Thread Christoph Hermann
Hello,

i currently try to to implement sending emails with cocoon.
I read
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/mail/transformation/SendMailTransformer.html
and there is written: FIXME: Known Issues:... * No support for smtp
user/password

So is there a way to send emails with cocoon via smtp-auth?

Christoph

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



Re: [CFORM] How can I remove a previous validation error from a widget?

2005-08-04 Thread Christoph Hermann
Dan Ochs schrieb:

Hello,

 I have tried removing the validation error by doing this, and the
 validation error is removed, but the form does not submit and I get
 the page back again, but without any errors. (So I have to click
 submit twice after the error is fixed)
 else{
form.lookupWidget(fieldId).setValidationError(null);
 }

In the countryselector example i found this:

// Reset the value (will clear validation error)
event.source.setValue(null);

maybe this helps you (just set the value?)

Christoph

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



Re: How to upload an xml file into eXist using Cocoon pipeline?

2005-08-02 Thread Christoph Hermann
xiao liang schrieb:

Hello,

 I am integrating Cocoon 2.1.7 with eXist-snapshot-20050620 by setting
 eXist driver in xmldb pseudo protocol definition.
 
 Currently I am able to access any xml file in eXist by setting
 'src=xmldb:exist///db/any_xml_file.xml' in Cocoon pipeline. However,
 I have no idea how to upload an xml file directly into eXist by
 pipeline:
 
 For example, if I want to load /tmp/foo.xml, how to define my pipeline?
 !—The process will access with 'load_file?docURI=/tmp/foo.xml'--
 map:pipeline
  map:match pattern=load_file
  ???
  /map:match
 /map:pipeline
 
 Thanks in advance for any suggestion.

I did this using flowscript and writing a function which saves a
document to the xml db.
See http://wiki.apache.org/cocoon/CformsExistAndFlow
There is a function saveDocumentAuth which does what you probably want.

HTH
Christoph

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



flowscript action just like xsp-action

2005-08-02 Thread Christoph Hermann
Hello,

is there something like an flowscript action? i.e. just like the xsp-action?

What i want to realize is just check if a user has a certain role (Using
auth-fw).
I could just call a function testAccess() which sendPage's an internal
pipeline using some parameters, but this would mean i'd have to write 3
matches in the pipeline instead of one using an action. (1 for the
function map:call, one for success and one for the failure).

Any Ideas?

With kind regards,
Christoph Hermann

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



Instantiating a class on Cocoon startup

2005-08-01 Thread Christoph Hermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

is there a way in Cocoon to load a class on cocoon startup?
What i want to accomplish is like read some sort of configuration file
and then hold these values in memory while cocoon is running.
So i thought of building a xml file which is loaded through xmlbeans
into a static var or so. Thath way i wouldn't have to load the
configuration File on each request.
Can anyone give me some hints on how to accomplish this?

With kind regards
Christoph Hermann
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQu4RCbHbLRxXJIjpAQIrDA/9E6yMZs+ZzqLIAaw5nDiyxKikUqnIcgXg
0Vq9+hMIso5ytV59YzDxhe/jABTvj4WpxhjLQFv37Oz4pEmZhan57NOTgVvTday3
L11fRLJ4q7HL1akk7T0ClDgp+HS6M8sR5ouZJjpPqPPW4trEaYlsb+38s7eR8MXi
de59hptVGdVfIpmS7mstz+IvZxbT/Yar6t1kimPcYJvQ5uhO9aA3FOdb9CUzA8bv
kpDa53hZFnJaURgmFHCGjd0yU1BzaCVUtOkkxiPwWNzSAbwr8wXsPNvf82SLwxmH
eEy0uaH2d1RDZVHwvnAuHD9/IiBhvGossxs1DD8V+nHSUDMXnI6JwMjEt5NMVKro
h6H48RIAOEoP4UGi/8WwSmZC6x2029f04Utxyn98ow+5wulr3cn+TfDKu2Ffbvjr
DnYpUJFPX36dsH3CpePlN7DVYE32SzlypR7Y5oXOANJkkvpkNu4zvfgz8qcc4Vrr
6NpeuCaBy1NbtzyS/y2Nvn2BAEq5tdK+Qk2miJu3wbaDNLvNudqDaERkRbhOBW08
JvJMaycyTI/AK8dsECy4rCSHvvAfczHRmOt9tiQ4Hqhg7D/wD7eMJbu7D7xDEDn5
8JEjF/nRUislJKeK4NrOO4KNECx5LEaNGdxJnTYpX/Vuv35rD3RcmQxsbp5Rmuyq
zE5Q40eBXsI=
=Fxd6
-END PGP SIGNATURE-

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



Re: Instantiating a class on Cocoon startup

2005-08-01 Thread Christoph Hermann
g[R]eK schrieb:

Hello,

 If you want your class to be loaded at startup you have to create
 interface like:
 package your.package;
 
 import org.apache.avalon.framework.component.Component;
 [...]

Thanks for the detailed explanation!

 *BUT*, maybe you just need XMLFileModule[1]? ;-)
 Or at least you should implement your own input module to easy obtain
 your configuration.

well, it looks very interesting. Is it documented somewhere in a more
detailed way? i.e. how to access it from flowscript?

The only docs i found were:
http://wiki.apache.org/cocoon/InputModules
and the link you told me.

Christoph

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



Several Questions regarding Cocoon + Lucene

2005-07-29 Thread Christoph Hermann
Hello,

is there a way to specify where the index should be created and what its
name is?
In the samples/blocks/lucene sitemap there is a search done on some
index called index2:

map:generate type=search
map:parameter name=index value=index2/
/map:generate

and my question is, how is that index created?

The example (flow.js) crawls the pages like this:

var util = cocoon.createObject(org.apache.cocoon.samples.LuceneUtil);
util.createIndex(baseURL, create );

There is no way to specify the index location or name. How is that done?

And one more question, is it possible to define several crawler and
indexer? (i.e. some crawler would only craw pdf's (*.pdf) and nothing
else and some othere would only crawl html pages. Then i would have two
indices which i could search separately (i.e. because pdfs and
html-pages have different fields in their content).

If someone could help me with that i'd be happy.

With kind regards
Christoph Hermann

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



Re: Jetty appears to die

2005-07-29 Thread Christoph Hermann
Ron Wheeler schrieb:

Hello,

 When I run cocoon.bat from the command line in Windows 2000, it opens a
 second window and outputs some lines indicating that it is loading
 things and then the window closes and connections from the browser or
 telnet are refused.
 
 If I go to my Lenya directory and run the Lenya.bat, it works correctly.
 
 How do I figure out what is wrong with the Cocoon setup?

Change some lines in the Cocoon.bat:

from

set EXEC=start Cocoon /D.

to

:: set EXEC=start Cocoon /D.
set EXEC=

and have a look at the error-messages (if there are any).

HTH
Christoph

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



Re: Sleepycat DBXML and Cocoon

2005-07-27 Thread Christoph Hermann
Ivan Bogouchev / Иван Богушев schrieb:

Hi,

 did anyone proceed with such an integration?
 
 Recently I've come across a great article [1] about the integration of
 Sleepycat's BDBXML and Cocoon.

Does it have to be Sleepycat XML DB or could you also use eXist?
I successfully integrated eXist into cocoon and you can also access the
documents via the xmldb://-protocol. There is also a transformer (which
i never got working) but actually one does not neet this (imho).

There are some Articles about eXist and Cocoon in the wiki, have a look:
http://wiki.apache.org/cocoon/EXistInCocoon
http://wiki.apache.org/cocoon/EXistAsBlock
http://wiki.apache.org/cocoon/CformsExistAndFlow

HTH
Christoph

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



Re: Sleepycat DBXML and Cocoon

2005-07-27 Thread Christoph Hermann
Ivan Bogouchev / Иван Богушев schrieb:

Hello,

 I think that I need a transformer because I  embed the values of
 different queries into a template xml wich is generated by the file
 generator.

Just an idea:
You can write an XQuery script which returns the results you need and
use this in/from another cocoon pipeline (i.e. cinclude) or such.

Christoph

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



Error in forms-field-styling.xsl in svn

2005-07-26 Thread Christoph Hermann
Hello,

i'm using BRANCH_2_1_X from svn and there the forms block upload example
is not working correctly.
The cause is that in forms-field-styling.xsl (see
http://svn.apache.org/viewcvs.cgi/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl?view=markup)
there is

input type=button id=[EMAIL PROTECTED] name=[EMAIL PROTECTED] value=...
onclick=forms_submitForm(this)/

where it should be

input type=button id=[EMAIL PROTECTED] name=[EMAIL PROTECTED] value=...
^^
onclick=forms_submitForm(this)/

Becaus using the line above with -input cocoon will tell:
Invalid submit id (no such widget): upload-input (for a widget called
upload).

Maybe someone can confirm this? (Or is there a better solution than mine?)

With kind regards,
Christoph Hermann

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



Error in forms-field-styling.xsl in svn

2005-07-26 Thread Christoph Hermann
Hello,

i'm using BRANCH_2_1_X from svn and there the forms block upload example
is not working correctly.
The cause is that in forms-field-styling.xsl (see
http://svn.apache.org/viewcvs.cgi/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl?view=markup)
there is

input type=button id=[EMAIL PROTECTED] name=[EMAIL PROTECTED] value=...
onclick=forms_submitForm(this)/

where it should be

input type=button id=[EMAIL PROTECTED] name=[EMAIL PROTECTED] value=...
^^
onclick=forms_submitForm(this)/

Becaus using the line above with -input cocoon will tell:
Invalid submit id (no such widget): upload-input (for a widget called
upload).

Maybe someone can confirm this? (Or is there a better solution than mine?)

With kind regards,
Christoph Hermann

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



Re: [CForms] - Design question

2005-07-26 Thread Christoph Hermann
Johannes Becker schrieb:

Hello,

 I've got a form which holds two date and an integer field.
 Either the two date fields or the integer field has to be filled out.
 If the date fields are filled out, the first date has to be 'smaller or
 equal' than the second date.
 
 Question 1.:
 How do achieve the: Either the two date fields or the integer field has
 to be filled out.

i'd use a combination of empty() and and and or

 Question 2.:
 How do achieve the: The first date has to be 'smaller or equal' than
 the second date.

You have to use some additional validation (this should be possible
using the xreporter syntax).
See http://cocoon.apache.org/2.1/userdocs/forms/validation.html#Reference
and
http://cocoondev.org/xreporter/docs/core/91.html

 Question 3.:
 After success I want to call either function aaa (if dates were filled
 in) or function bbb (if integer was filled in). How can I manage this?

I would use flowscript for this.

HTH
Christoph

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



Re: [CForms] - Design question

2005-07-26 Thread Christoph Hermann
Johannes Becker schrieb:

Hello,

 I'm doing it in flowscript. But after success, how do I know which
 fields (date or integer) were filled in?

You simply check the value of one of the widgets?

HTH
Christoph

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



Re: http header input module

2005-07-07 Thread Christoph Hermann
simon schrieb:

Hello,

 I would like to retrieve the User-Agent of the Http Header or some other
 parameter to use within the sitemap. I checked various input modules,but
 none seems really appropriate.
 
 Any hint appreciated

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

HTH
Christoph

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



Re: Integration of Cocoon and eXist - user/password accessing database

2005-07-06 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

 i'm trying to integrate Cocoon and eXist XML DB. So far it works fine, i
 can edit and save a document through cforms and the bindings, but this
 is only working if i make the documents in my collection
 world-writable/updatable.
 
 So my question is: where do i specify which user/password is used when
 accessing the eXist database (i would like to do this in flow (if
 possible) alternatively which configuration file handles this)?

I now wrote a new saveDocumentAuth() function for this:

 ---snip---
 var form = new Form(cforms/definition/test_def.xml);
 var bindingURI = cforms/binding/test_bind.xml;
 form.createBinding(bindingURI);

var docBaseURI = xmldb:exist:///db/test/;
var docName = test.xml;
var document = loadDocument(docBaseURI + docName);
form.load(document);
form.showForm(test-display-pipeline);
form.save(document);
// saveDocument(document, docURI);
saveDocumentAuth(document, test.xml, docBaseURI, user, pass,
true);

and the function looks like this:

---snip---
function saveDocumentAuth(document, docname, dburi, user, password,
overwrite) {
// exist API http://exist.sourceforge.net/api/index.html
// XMLUtils API http://cocoon.apache.org/2.1/apidocs/

importClass(Packages.org.xmldb.api.DatabaseManager);
importClass(Packages.org.xmldb.api.base.Collection);
importClass(Packages.org.xmldb.api.modules.XMLResource);
importClass(Packages.org.apache.excalibur.xml.sax.SAXParser);

// Error Messages
var _errmsg = null;
var _errdesc = null;

// set the document xml data
var xmldata =
Packages.org.apache.cocoon.xml.XMLUtils.serializeNodeToXML(document);

// Collection (org.xmldb.api.base.Collection)
var collection = null;

// ressource (org.xmldb.api.modules.XMLResource)
var _resource = null;   

try {
collection = DatabaseManager.getCollection(dburi, user, 
password);
collection.setProperty(sax-document-events, false);
try {
_resource = collection.getResource(docname);
if(_resource != null) {
if(overwrite.equals(true)) {

collection.removeResource(_resource);
_resource = 
collection.createResource( docname, XMLResource );
_resource.setContent(xmldata);
collection.storeResource(_resource);
} else {
_errmsg = Resource  + docname +  
does already exist;
_errdesc = Resource  + docname + 
 does already exist;
cocoon.log.error(_errmsg);
cocoon.log.error(_errdesc);
}
} else {
_resource = collection.createResource( 
docname, XMLResource );
_resource.setContent(xmldata);
collection.storeResource(_resource);
}
} catch(_ex) { // XMLDBException
_errmsg = _ex.getMessage;
_errdesc = Failed to store document + docname;
cocoon.log.error(_errmsg);
cocoon.log.error(_errdesc);
}
} catch(_e) { // XMLDBException
_errmsg = _e.toString();
_errdesc = Failed to get collection  + dburi;
cocoon.log.error(_errmsg);
cocoon.log.error(_errdesc);
}
}
---snap---

So if anyone is able to use this, or to find a better way of handling
this, feel free to modify it to your needs.

With kind regards,
Christoph Hermann

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



Integration of Cocoon and eXist - user/password accessing database

2005-07-05 Thread Christoph Hermann
Hello,

i'm trying to integrate Cocoon and eXist XML DB. So far it works fine, i
can edit and save a document through cforms and the bindings, but this
is only working if i make the documents in my collection
world-writable/updatable.

So my question is: where do i specify which user/password is used when
accessing the eXist database (i would like to do this in flow (if
possible) alternatively which configuration file handles this)?

What i basically do is the following (in flow):

---snip---
var form = new Form(cforms/definition/test_def.xml);
var bindingURI = cforms/binding/test_bind.xml;
form.createBinding(bindingURI);
var docURI = xmldb:exist:///db/test/test.xml;
var document = loadDocument(docURI);
form.load(document);
form.showForm(test-display-pipeline);
form.save(document);
saveDocument(document, docURI);
---snap---

The functions loadDocument and saveDocument are taken from the samples.

When the document is not writable for everyone i get the following error:
---snip---
org.exist.security.PermissionDeniedException: Document exists and update
is not allowed
at
org.exist.collections.Collection.checkPermissions(Collection.java:1263)
at
org.exist.collections.Collection.determineTreeStructure(Collection.java:1099)
at org.exist.collections.Collection.validate(Collection.java:851)
at
org.exist.xmldb.LocalCollection.storeXMLResource(LocalCollection.java:589)
...
---snap---

Christoph

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



Re: XForms and Cocoon

2005-03-08 Thread Christoph Hermann
Andrea Vagliengo schrieb:

Hello,

 I can't find any documentation about XForm support under cocoon: the
 WS-Proxy manages XForms, but I have to render it some way in the
 browser and I need XSLT transformation to adapt the XML content to
 the client user-agent. Can you tell me where I can find some docs
 about trasforming XForms content with some XSL transforms? Do you
 perhaps know if there is some general XSLT already available for this
 purpose (such as the Cocoon built-in stylesheets, ready to modify) ?

There is Chicoon, maybe you can use this, see the Mailinglist Post:
http://www.mail-archive.com/users%40cocoon.apache.org/msg22905.html

HTH
Christoph


pgpE3yAOStvqX.pgp
Description: PGP signature


Re: include specific element with cinclude

2005-03-01 Thread Christoph Hermann
Schultz, Gary - COMM schrieb:

Hello,

 I have cinclude working so that I can get all of the specific
 elements from an XML file. What I have not found a way to do is get
 the 2nd, 3rd, 4th, etc. element or get an element by attribute value.
 I have found nothing in Cocoon wiki to explain how one uses cinclude
 to include only a part of the XML file.

 For example, I can use the following to get all paragraph elements in
 an xml file:

 cinclude:include
 xmlns:cinclude=http://apache.org/cocoon/include/1.0;
 src=http://localhost/something.xml;
 select=//*[local-name()='paragraph']/./

 But what I want is to get a specific paragraph element from the file.
 Any direction on this is greatly appreciated.

You need to be more precise in your xpath expression:

 //[EMAIL PROTECTED]'ABC123']

chooses all paragraphs with an attribute var that equals 'ABC123'.

 paragraph[1]

chooses the first occurence of paragraph.

HTH
Christoph


pgp1V8Ai5NIxP.pgp
Description: PGP signature


Re: Best practice for conditionally displaying widgets?

2005-02-25 Thread Christoph Hermann
Linden H van der (MI) schrieb:

Hello, 

 I'm using Cocoon 2.1.7 of somewhere in Jan 2005 and I know this
 protocol is around for several releases already, so that should not
 be the problem.

2.1.7? Hey, i want that too ;-)
Current Release Version is 2.1.6: http://cocoon.apache.org/mirror.cgi

Christoph


pgp2brOrANOEZ.pgp
Description: PGP signature


Re: [MP3 to DB]: load - store

2005-02-19 Thread Christoph Hermann
Mike Dickson schrieb:

Hello,

 Do not store the mp3-Files in the database.
 Store them in the Filesystem and insert the path to the Files into
 the Database.

 Then someone can rename a directory or two and then the fun starts. 
 :-) Put them in the DB. Trust me.

No User should have the Right to do so.

If the User has the Right, then he should be responsible enough to 
change the related entries in the database.

Also only relative paths are stored in the Database, so this is not 
really a Problem.

Christoph


pgpmKUpnZZaIy.pgp
Description: PGP signature


Re: Build Targets

2005-02-18 Thread Christoph Hermann
Chris. Grobmeier schrieb:

Hello,

 So: could you give me a hint what to build if i want
 to create a basic site? In Struts there is something like
 a clean app. Is there something similar in this buildfile?
 I tried build site, but an error told me to install forrest.

 Maybe somebody can tell me what happened at my machine or some
 other hints?

If you are searching for Build Options this might be useful for you:
http://wiki.apache.org/cocoon/AboutTheBuildTargets

There is also a build clean.

HTH
Christoph


pgpA03NZ6Khjl.pgp
Description: PGP signature


Re: XSL File I/O

2005-02-18 Thread Christoph Hermann
Hiral Parikh schrieb:

Hello,

 org.apache.avalon.framework.CascadingException: Resouce not found:
 cocoon://appname/get-images

xi:include src=cocoon:/get-images{.}
  ^
  map:match pattern=get-images/*
  ^
 Any idea what's going wrong? Am I doing the xi:include in a wrong
 way?

I think you are only missing the /.

HTH
Christoph


pgpOPnnsldnVY.pgp
Description: PGP signature


Re: [MP3 to DB]: load - store

2005-02-18 Thread Christoph Hermann
Matt Robinson schrieb:

Hello,

   Although this question is not directly related to Cocoon (but I am
 using cocoon). I would like to ask someone if he already load/store
 mp3 files in some way into a database.

 You're right... This is not the forum for this.
 Do a google search on BLOB and name of the database you are using

Do not store the mp3-Files in the database.
Store them in the Filesystem and insert the path to the Files into the 
Database.

Christoph


pgpF4sYmgdAJs.pgp
Description: PGP signature


Re: Autologin auth-fw

2005-02-17 Thread Christoph Hermann
Aurélien DEHAY schrieb:

Hello,

 I'm using auth-fw for user authentication. I'd like to autologin user
 who comming with a specific cookie. I supposed it is possible, but I
 don't how to do it, as I can't create authentication context from,
 for example, the session context transformer.

 I can store user/cookie pair in my SQL database, but how can I do the
 autologin stuff?

In your authentication handler add a check for the Cookie and return a 
specific userid.

HTH
Christoph


pgpuUAmWWNuRg.pgp
Description: PGP signature


Re: Autologin auth-fw

2005-02-17 Thread Christoph Hermann
Aurélien DEHAY schrieb:

Hello,

  In your authentication handler add a check for the Cookie and
  return a specific userid.

 How do I do that? When a resource is protected and the user is not
 authenticated, I redirect him to a login page (with the redirect-to
 element in the handler element), but the authentication is made with
 the authentication element. I don't really see where to put the check
 of the cookie.

Your authentication ressource checks the login. If cookie is set log the 
user in.
Then you can easily access protected documents.

In your case use your redirect-to to redirect him to a auth-by-cookie 
pipeline, authenticate the user there and redirect to the requested 
ressource (internally) else if cookie is not set redirect to login 
form.

HTH
Christoph


pgpRDRjyXJ8Kw.pgp
Description: PGP signature


Re: cocoon 1.6, binding framework and cache...

2005-02-14 Thread Christoph Hermann
Marc Salvetti schrieb:

Hello,

 map:match pattern=*cruise*
 map:call function=handleForm

 map:parameter name=documentURI
 value=xdocs/planning/cruise{2}.xml/

 When browsing, the cache system seems to get stuck on one of the docs
 (ie : cruise1.xml) and from this moment, everytime the form is
 called, it is binded to the same document, and the continuation ID
 becomes invalid !

 Anyone came across this kind of problem ?

Did you try {../2}?
Maybe the map:call adds one level to your sitemap (i don't know, just an 
Idea)

HTH
Christoph


pgpxEjpTqiDDY.pgp
Description: PGP signature


Re: url encode transformer

2005-02-09 Thread Christoph Hermann
Mark Lowe schrieb:

Hello,

 Can anyone prevent me spiraling into yet another infinite cycle of
 trial and error and tell me if
 org.apache.cocoon.transformation.EncodeURLTransformer works and
 should work as this document
 http://cocoon.apache.org/2.1/userdocs/transformers/encodeurl-transfor
mer.html stipulates.

 Or is there something secret that isn't stated in the documentation?

I use the encodeUrl Transformer after my tranformations with xslt and 
everything is fine here.

Christoph


pgp823NTZmkTI.pgp
Description: PGP signature


Re: url encode transformer

2005-02-09 Thread Christoph Hermann
Mark Lowe schrieb:

Hello,

 Here's the stuff in my sitemap.xmap should i need anything else?

 map:transformer name=encodeURL
 src=org.apache.cocoon.transformation.EncodeURLTransformer /
 
 map:match pattern=display
 map:generate src=menuDoc.xml/
 map:transform type=i18n
 map:parameter name=locale value={request:locale} /
 /map:transform

 map:transform src=menu.xsl
 map:parameter name=selected-menu value='foo' /
 /map:transform

 map:transform type=encodeURL /

This is (imho) the only thing you need if the transformer is already 
defined (i.e. main sitemap).

 map:serialize type=html/
 /map:match

Looks good to me.

Christoph


pgpEiYx1tXbEI.pgp
Description: PGP signature


Re: Access UserId in a JX page without Authentication-handler

2005-02-07 Thread Christoph Hermann
Jan Hoskens schrieb:

Hello,

 Are you aiming at a site where you can log in on every page and show
 more info/pages if you are logged in? You might want to consider
 using a guest user/role so that everyone visiting the site is
 automatically logged in, but with restrictions attached to that
 role/user (so show login form if id/role is guest/guest) and only
 when logging in as a real user/role more options/pages are available.

 Do check if you're satisfied with the authentication framework and
 see if it suits your needs:
 http://cocoon.apache.org/2.1/developing/webapps/authentication.html ,
 remember that the framework isn't the perfect solution for every
 problem.

Thanks for your suggestions!
I want to design a site where logged-in Users can see more than 
others.

I also thought about your first suggestion, but this would mean that the 
Guest User has to login automatically, therefore i would again have 
to write a workaround (i.w. pipeline that logs user in) when i use 
the authentication-framework.

And i got the Problem solved like this:

In my authentication XSP which sets the user-id i added:

 xsp-session:set-attribute 
name=user_iduserID/xsp-session:set-attribute

after the
 IDuserID/ID

Then in Flow or JX i can access this variable like this:
 jx:set var=user_id value=${session.getAttribute('user_id')}/
 jx:if test=${empty(user_id)}
  !-- display login form on this page --

This works fine for me.
I don't need any Session-Contexts anymore, i just use the actual session 
which is started on every page.

Christoph


pgpdsN0LtClpy.pgp
Description: PGP signature


Access UserId in a JX page without Authentication-handler

2005-02-06 Thread Christoph Hermann
Hello,

on some pages i want to display a login-form wheter the User is logged 
in or not.
Therefore i need to know if the User is logged in. Is there a way i can 
do this when the page i server is not enclosed in a 
 map:act type=auth-protect
?

I tried
${cocoon.session.getAttribute(org.apache.cocoon.webapps.session.context.SessionContext).get(authentication).getValueOfNode(
 authentication/ID)} 
and 
${cocoon.session.getAttribute(org.apache.cocoon.webapps.session.context.SessionContext).get(authentication).getValueOfNode(
 ID)} 
(found this with google) but none of these work.

Relevant part of my sitemap:

  !-- for Cinclude --
  map:match pattern=GenJxTransSer
   !-- Generate/Transform/Serialize --
   map:generate type=jx src={request-param:GenSrc} /
   map:transform type=session/
   map:transform src={request-param:TransSrc}/
   map:serialize type=html/
/map:match

This Pipeline is called from a cinlude like this:

 cinclude:include 
src=cocoon:/GenJxTransSer?GenSrc=docs/jx/loginform.xmlamp;TransSrc=stylesheets/xsl/cinclude/loginform2html.xsl
 /

Any help would really be appreciated.

Christoph


pgpE9yNjfspBM.pgp
Description: PGP signature


Create session context (was: Access UserId in a JX page without Authentication-handler)

2005-02-06 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

 on some pages i want to display a login-form wheter the User is
 logged in or not.
 Therefore i need to know if the User is logged in. Is there a way i
 can do this when the page i server is not enclosed in a
  map:act type=auth-protect
 ?

There seems to be no way to do this (googling some hours told me 
that ;))...
My workaround is now the following, when i login i store the userid in 
another session-context.
This works fine apart from the fact that i would need to create the 
context everywhere.
I tried to put an xsp-action in my pipeline which creates the context, 
but this does not work.
Can anyone tell me how to create the context everywhere either with an 
xsp-action or from a function in flow?

Any Help is appreciated,
Christoph


pgpXuUZ6U2Eow.pgp
Description: PGP signature


Re: XML in flowscript

2005-02-04 Thread Christoph Hermann
Rajesh Aravindakshan schrieb:

Hello,

  var strXml = xR.getResponse();

  Now strXml is a string with xml values. How should I
 proceed from here? Should I use JXTemplate or can I
 pass this as an XML input to another pipeline?

If you want to display the data on another page, you can use the flow to 
set the variable and pass it to another pipeline:

Have a look here:
http://cocoon.apache.org/2.1/userdocs/flow/tutor.html

HTH
Christoph


pgp5uN0TNxusz.pgp
Description: PGP signature


Re: XSP

2005-01-25 Thread Christoph Hermann
Adriano Smith schrieb:

Hello,

 is it possible to execute an XSP code without calling through a
 cocoon generator ?

Maybe this helps you:
http://wiki.apache.org/cocoon/XSPAction

HTH
Christoph


pgpWHRSWQkXOq.pgp
Description: PGP signature


Re: [Flowscript] authentication

2005-01-25 Thread Christoph Hermann
Lionel Crine schrieb:

Hello,

 I want to make a page which test if the user is logged or not (easy).
 If not, I redirect him to the login page (easy)
 but once the user is logged in, I want to redirect him to the
 previous page he requested.


 Is there some samples in flowscript to do that ?

There is an Authentication Framework in Cocoon.
http://cocoon.apache.org/2.1/developing/webapps/authentication.html

HTH
Christoph


pgpg1eP7FB14O.pgp
Description: PGP signature


Re: Load values from database in a selection List [Newbie question]

2005-01-20 Thread Christoph Hermann
Jorge Isaac Davila Lopez schrieb:

Hello,

 Tomcat 2.0.5
 Java 1.4.2
 Cocoon 2.1.6
 PostgreSQL
 ojb/jdo

 I'm trying to load a Collection into a selectionList.
 I can insert records in the database.
 Somebody can give some light to achieve this?

http://cocoon.apache.org/2.1/userdocs/forms/datatypes.html#Selection+lists%3A+flow-jxpath+implementation

I use this with ojb/jdo and a ReportQuery to get the values out of the 
database and fill them into the select field.

HTH
Christoph


pgpkVMlYKamA4.pgp
Description: PGP signature


Re: Need help with Cforms binding

2005-01-17 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

  Inserting new Rights works fine, the problem is that when i change
  a right the old value is deleted from the Rights Table instead of
  only deleting the entry in the reference table.
  Can anyone of you help me how out on how an m:n relationship should
  be binded?

 My repository.xml (I use ojb/jdo) looks like this:

 collection-descriptor name=rights
 element-class-ref=papillon.Right auto-retrieve=true
 auto-update=link auto-delete=link
 indirection-table=rel_users_rights otm-dependent=false
 fk-pointing-to-this-class
 column=users_id/ fk-pointing-to-element-class
 column=rights_id/
 /collection-descriptor

Thanks to Tim Larson, the problem is solved.
Just for the ones interested (and the archive) here's the Solution:
In the collection-descriptor i had to add:
 collection-class=org.apache.ojb.broker.util.collections.ManageableArrayList
Then the Problem was gone :-).

Christoph


pgp8UeNG76h7c.pgp
Description: PGP signature


Need help with Cforms binding

2005-01-15 Thread Christoph Hermann
Hello

i really need help with a Cforms binding which i can't get to work.
I have two classes (User, Right) which have an m:n relation.

public class User implements Serializable {
private int id;
private String nick;
private String firstname;
private String lastname;
private String email;
private String pass;
private Collection rights = new ArrayList();
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
...
public Collection getRights() {
return this.rights;
}
public void setRights(Collection rights) {
this.rights = rights;
}
public void addRight(Right right) {
right.addUser(this);
this.rights.add(right);
}
}

public class Right implements Serializable {
private int id;
private String name;
private Collection users = new ArrayList();
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Collection getUsers() {
return this.users;
}
public void setUsers(Collection users) {
this.users = users;
}
public void addUser(User user) {
this.users.add(user);
}
}

Now i have the following binding:
fb:context
xmlns:fb=http://apache.org/cocoon/forms/1.0#binding; path=/


 fb:value id=id path=id direction=load/
 fb:value id=nick path=nick /
...
 fb:value id=confirmpass path=pass direction=load /

  fb:repeater id=rights parent-path=. row-path=rights
fb:identity
  fb:value id=id path=@id/
/fb:identity

fb:on-bind
  !-- executed on updates AND right after the insert --
  fb:value id=id path=id /
  fb:value id=name path=name /
/fb:on-bind

fb:on-delete-row
  fb:delete-node /
/fb:on-delete-row

fb:on-insert-row
  fb:insert-bean classname=papillon.Right addmethod=addRight/
/fb:on-insert-row
  /fb:repeater
/fb:context

Inserting new Rights works fine, hte problem is that when i change a 
right the old value is deleted from the Rights Table instead of only 
deleting the entry in the reference table.
Can anyone of you help me how out on how an m:n relationship should be 
binded?

I wrote a flowscript to test if my classes are ok and this is working 
fine:
 user = new Packages.papillon.User();
 user.setId(15);
 user = dao.retrieve(user);
 firstname = user.getFirstName();
 right = new Packages.papillon.Right();
 right.setId(64);
 rights = new Packages.java.util.ArrayList();
 rights.add(right);
 user.setRights(rights);
 dao.update(user);

In my cforms i use the following flowscript:

 var bean = new Packages.papillon.User();
 id = 15;
 bean.setId (id);
 bean = dao.retrieve (bean);
 form.load(bean);
 form.showForm(form-display-pipeline-newuser,data);
 form.save(bean);
 dao.update (bean);

Christoph


pgpoQUBW2tyKF.pgp
Description: PGP signature


Re: Need help with Cforms binding

2005-01-15 Thread Christoph Hermann
Christoph Hermann schrieb:

Hello,

 i really need help with a Cforms binding which i can't get to work.
 I have two classes (User, Right) which have an m:n relation.

 fb:on-delete-row
   fb:delete-node /
 /fb:on-delete-row

Maybe someone can tell me what happens when delete-node is executed?
I presume it takes the id value and deletes the corresponding object 
(Right)?
What i would need is that only the item in the Collection (User.rights) 
is deleted, and not the corresponding right (I think this causes the 
problem).

 Inserting new Rights works fine, hte problem is that when i change a
 right the old value is deleted from the Rights Table instead of only
 deleting the entry in the reference table.
 Can anyone of you help me how out on how an m:n relationship should
 be binded?

My repository.xml (I use ojb/jdo) looks like this:

class-descriptor class=papillon.User table=users
field-descriptor name=id primarykey=true 
nullable=false default-fetch=true autoincrement=true column=id 
sequence-name=users_id_seq jdbc-type=INTEGER/
field-descriptor name=nick nullable=false 
default-fetch=true column=nick jdbc-type=VARCHAR/
field-descriptor name=firstname nullable=false 
default-fetch=true column=firstname jdbc-type=VARCHAR/
field-descriptor name=lastname nullable=false 
default-fetch=true column=lastname jdbc-type=VARCHAR/
field-descriptor name=email nullable=false 
default-fetch=true column=email jdbc-type=VARCHAR/
field-descriptor name=pass nullable=false 
default-fetch=true column=pass jdbc-type=VARCHAR/
collection-descriptor name=rights 
element-class-ref=papillon.Right auto-retrieve=true 
auto-update=link auto-delete=link 
indirection-table=rel_users_rights otm-dependent=false
fk-pointing-to-this-class column=users_id/
fk-pointing-to-element-class 
column=rights_id/
/collection-descriptor
/class-descriptor
 class-descriptor class=papillon.Right table=rights
field-descriptor name=id primarykey=true 
nullable=false default-fetch=true autoincrement=true column=id 
sequence-name=rights_id_seq jdbc-type=INTEGER/
field-descriptor name=name nullable=false 
default-fetch=true column=name jdbc-type=VARCHAR/
collection-descriptor name=users 
element-class-ref=papillon.User auto-retrieve=true 
auto-update=link auto-delete=link 
indirection-table=rel_users_rights otm-dependent=false
fk-pointing-to-this-class column=rights_id/
fk-pointing-to-element-class 
column=users_id/
/collection-descriptor
/class-descriptor

As you can see i specified there auto-update=link etc... according to:
Mapping m:n associations 
http://db.apache.org/ojb/docu/guides/basic-technique.html#m-to-n

 I wrote a flowscript to test if my classes are ok and this is working
 fine:
  user = new Packages.papillon.User();
  user.setId(15);
  user = dao.retrieve(user);
  firstname = user.getFirstName();
  right = new Packages.papillon.Right();
  right.setId(64);
  rights = new Packages.java.util.ArrayList();
  rights.add(right);
  user.setRights(rights);
  dao.update(user);

Here i just set new Rights, no Rights are deleted/removed from the 
Collection i think this is the difference.
Can someone tell me how to reproduce this behaviour with Cforms?

My workaround would be not to use a binding or not to call 
form.save(bean); then get the values out of the form in the flowscript 
set them to the bean (bean.setXY(value)) and then save the bean. But i 
don't think this is a good solution.

If you need more Information tell me please.
Christoph


pgpuEtq0U8vhp.pgp
Description: PGP signature


Cforms on-load like fd:on-value-changed

2005-01-14 Thread Christoph Hermann
Hello,

is there something like an on-load for a widget?
I want to set the value of a select-list depending on the value of 
another widget when the form is loaded. (I need something to set the 
selected value when the Form is loaded.)
Any help and or links where to get more Information is really 
appreciated.

Christoph


pgpc0jog0dw1Q.pgp
Description: PGP signature


Re: Cforms on-load like fd:on-value-changed

2005-01-14 Thread Christoph Hermann
Mark Lundquist schrieb:

Hello,

  is there something like an on-load for a widget?
  I want to set the value of a select-list depending on the value of
  another widget when the form is loaded. (I need something to set
  the selected value when the Form is loaded.)

 What do you mean by when the Form is loaded?

I meant when (before) its displayed the first time.
Maybe there is a better solution to my Problem...
I have two widgets (id, select). I get the id out of a database and 
populate the select list also with all possible values from the 
database using flow-jxpath implementation.

When the select is changed i use the on-value changed to get the id for 
the selected value from the database and set the value of the 
id-widget.

I now want to have the value from the database to be selected in the 
select-widget.

Is there any better way to do this?

Christoph


pgpgbSacaD7E7.pgp
Description: PGP signature


Re: Chicoon XForms online demo

2005-01-06 Thread Christoph Hermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joern Turner schrieb:

Hello,

 for those interested in W3C XForms there's an online demo of Chicoon
 under http://81.169.173.189:8080/cocoon/chicoon/index

 running the Chiba XForms processor in an Cocoon installation.

After looking at these examples i tried to install chicoon.
Building works fine, but when i call 
 http://localhost:8080/cocoon/chicoon/index
simply nothing happens.
It works fine, when i remove the generic chicoon pipeline in the 
sitemap.xmap, but then of course none of the examples is working.
When the generic chicoon pipeline is in the sitemap tomcat (Apache 
Tomcat/4.1.31) simply closes the connection.

Any help on this would really be appreciated.
Christoph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB3QCMH8qhdtR4sUIRAvM9AKCH0ay2Js910/VbECqa6OH3CfS5rACg5Jf/
wuG8PK3f1YvaCdPVKKS46kw=
=Q6ww
-END PGP SIGNATURE-

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



Re: Chicoon XForms online demo

2005-01-06 Thread Christoph Hermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joern Turner schrieb:

Hello,
and thx for your help :)

 second, did you call the prepare-cocoon target once before deploying
 Chicoon? This is necessary to update some libs in Cocoon to newer
 versions and copy another two to common/endorsed. you should take a
 close look at the output when executing 'prepare-cocoon' to see if
 maybe some of the copy operations fail. please note, that it *will*
 fail when you run 'prepare-cocoon' a second time. in that case you
 should call the opposite task 'restore-cocoon' to remove any Chicoon
 libs from your cocoon/tomcat installation again before trying again.

I did all that following hoto-install.txt from CVS and i encountered no 
errors.

 at least, what prepare-cocoon does is:
 - replace the xerces and xmlapis version in common/endorsed

I have the following there:
common/endorsed# ls
dom3-xercesImpl.jar  dom3-xml-apis.jar  xercesImpl.orig   
xmlParserAPIs.orig

 - copy chiba-libs to cocoon/WEB-INF/lib

/cocoon/WEB-INF/lib# ls chi*
chiba-0.9.9.jar

 - update JXPath in cocoon/WEB-INF/lib

cocoon/WEB-INF/lib# ls commons-jxpath-*
commons-jxpath-1.2.jar  commons-jxpath-20030909.orig

 i know this procedure is far from ideal and we're working on making
 the installation easier and more generic for other
 environments/webcontainers.

NP, works fine (imho).

 hope you get it to show at least an error and happy to help again if
 you can gather even a tiny bit more of information. (checked the logs
 ?)

Hmm maybe that helps you (and me :)):
I get an error in the tomcat log-file:

java.lang.NoClassDefFoundError: 
org/chiba/xml/xforms/exception/XFormsException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at 
java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
at java.lang.Class.getConstructor0(Class.java:1762)
at java.lang.Class.newInstance0(Class.java:276)
at java.lang.Class.newInstance(Class.java:259)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:179)
at 
org.apache.avalon.excalibur.component.DefaultComponentHandler.doGet(DefaultComponentHandler.java:136)
at 
org.apache.avalon.excalibur.component.ComponentHandler.get(ComponentHandler.java:381)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:213)
at 
org.apache.cocoon.components.ExtendedComponentSelector.select(ExtendedComponentSelector.java:267)
at 
org.apache.cocoon.components.treeprocessor.SimpleSelectorProcessingNode.getThreadSafeComponent(SimpleSelectorProcessingNode.java:62)
at 
org.apache.cocoon.components.treeprocessor.SimpleSelectorProcessingNode.getThreadSafeComponent(SimpleSelectorProcessingNode.java:52)
at 
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.compose(ActTypeNode.java:80)
at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:293)
at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:174)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.setupNode(DefaultTreeBuilder.java:442)
at 
org.apache.cocoon.components.treeprocessor.sitemap.ActNodeBuilder.buildNode(ActNodeBuilder.java:69)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList(AbstractParentProcessingNodeBuilder.java:121)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodes(AbstractParentProcessingNodeBuilder.java:136)
at 
org.apache.cocoon.components.treeprocessor.sitemap.ActNodeBuilder.buildNode(ActNodeBuilder.java:71)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList(AbstractParentProcessingNodeBuilder.java:121)
at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodes(AbstractParentProcessingNodeBuilder.java:136)
at 
org.apache.cocoon.components.treeprocessor.sitemap.MatchNodeBuilder.buildNode(MatchNodeBuilder.java:77)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNodeBuilder.buildNode(PipelineNodeBuilder.java:113)
at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNodeBuilder.buildNode(PipelinesNodeBuilder.java:65)
at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapNodeBuilder.buildNode(SitemapNodeBuilder.java:70)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.createTree(DefaultTreeBuilder.java:325)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:395)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:357)
at 

Re: Basic Session and encode-url example

2004-12-14 Thread Christoph Hermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christoph Hermann schrieb:

Hello,

 The Point is the

  map:redirect-to session=true uri=page1/

 The Problem i still have is when the User is accessing Page1 directly
 and has no cookies enabled then the session-id is still not appended.
 Url rewriting works fine if i'm accessing the directory without
 adressing a page directly.

 Does someone hava a clue why this happens or what i'm doing wrong?

Finally i got it working.

If i include a 
 map:act type=session/
in the pipeline, everything works fine.

Christoph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBv3sIH8qhdtR4sUIRAgYAAJ9yEh++qQ6f7CRSDrhhfY2eqiM2UACcDoOD
u9ZNasyTOPtTlZKZosOtCKI=
=XfpP
-END PGP SIGNATURE-

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



Re: Basic Session and encode-url example

2004-12-14 Thread Christoph Hermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Julien, Heryk schrieb:

Hello,

  I've been using urlEncode without authentication with success.
  However, I'm currently implementing authentication and I hope I
  won't be getting the bugs you are having.
  I guess someone else will be able to help you.

 Could you give me some of the pages where you used encodeURL if this
 is possible?
 Maybe i can try that out here and i will find what i'm doing wrong.

 No problem
 I don't think it will be much use to you but here is part of my
 sitemap where urlEncode is used (snippet of the component and
 pipeline sections of my sitemap):

I found out that my example is working when i use the following sitemap:

- ---snip---
map:pipeline
  map:match pattern=
map:redirect-to session=true uri=page1/
  /map:match


  map:match pattern=page1
  map:generate src=docs/page1.xml/
  map:transform type=session/
  map:transform src=stylesheets/simple-page2html.xsl/
  map:transform type=encodeURL/
  map:serialize /
  /map:match

  map:match pattern=page2
  map:generate src=docs/page2.xml/
  map:transform type=session/
  map:transform src=stylesheets/simple-page2html.xsl/
  map:transform type=encodeURL/
  map:serialize /
  /map:match

/map:pipeline
- ---snap---

The Point is the 

 map:redirect-to session=true uri=page1/

The Problem i still have is when the User is accessing Page1 directly 
and has no cookies enabled then the session-id is still not appended.
Url rewriting works fine if i'm accessing the directory without 
adressing a page directly.

Does someone hava a clue why this happens or what i'm doing wrong?

Or can someone tell me how to redirect to the same page (starting a 
session) if no session is started (i have no clue how to check this)?

Christoph
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBv3CKH8qhdtR4sUIRAsdLAKDgfJBN1Rf31Sc9aml5CnmAiZ7DIwCgklfU
+d8FVdoaJQhK7L8hjT5BMQM=
=rl3c
-END PGP SIGNATURE-

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


  1   2   >