Re: flow sendPage/redirectTo

2005-04-08 Thread Sylvain Wallez
Philippe Guillard wrote:
Merci,
Pour le pub,  respect, et j'aimerais bien rencontrer plus de 
cocooners, mais je suis base en Chine...

Marrant, mon fils ainé a pris l'avion ce matin pour un voyage de 15 
jours en Chine :-)

Il y a un certain Roy Huang ([EMAIL PROTECTED]) qui intervient 
sur les mailing-lists et nous a fourni les traductions chinoises pour 
Cocoon Forms.

Je vais essayer de decrire simplement:
J'ai un form1 qui contient un lien a href pour un autre form2, celui 
ci termine par une redirection pour recommencer form1. Le form 1 est 
un select, le form 2 est pour ajouter des elements a ce qui est 
presente en from1.

!--sitemap match pattern=select---
function select(selectForm) {
   // lecture DB
   cocoon.sendPageAndWait(selectForm);
   // cette page contient un lien a href=addVous voulez 
ajouter/changer des elements a cette selection/a
   cocoon.sendPage(End);
}
!--sitemap match pattern=add---
function add(addForm) {
   cocoon.sendPageAndWait(addForm);
   // POINT1
   // ecriture DB
   cocoon.redirectTo(cocoon:/select,true); //Je veux recommencer 
select depuis le debut, pas le continuer
   // POINT2
}

Mon flow semble planter le flow debugger et repasser en boucle la 
portion de POINT1 a POINT2, puis java.lang.StackOverflowError.

Trouvé, c'est un classique! Le problème vient du 
redirectTo(cocoon:/select) : on revient dans la sitemap, et je suppose 
que celle-ci doit avoir un test soit sur la méthode HTTP ou un matcher 
sur l'existence d'un paramètre continuation-id qui déclenche l'appel 
de la continuation.

Or la continuation en question, c'est celle qui nous a conduit à sortir 
au POINT1, et donc on refait écriture DB et le 
redirectTo(cocoon:/select). Et on boucle...

La solution est donc de faire un redirectTo(select) qui repasse par le 
navigateur et donc casse le bouclage.

Sylvain
--
Sylvain WallezAnyware Technologies
http://apache.org/~sylvainhttp://anyware-tech.com
Apache Software Foundation Member Research  Technology Director
-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]


Re: Parametres

2005-04-08 Thread douentza douentza
J'ai pris le cocoon 2.1.7, mais en remplacant mes coccon.request par 
model.lookupWidget(page_number);
j'obtiens
ce message :
org.apache.avalon.framework.CascadingRuntimeException: lookupWidget is not a 
function.
 
Voici mon script :
cocoon.load(resource://org/apache/cocoon/forms/flow/javascript/Form.js);
var page_number = ;
var area_name = ;

function transactionreport() {
var form = new Form( forms/transactionreport.xml);
form.showForm( transactionreport-display-pipeline,
   {
 page_number : page_number,
 area_name : area_name
 }
);
var model = form.getModel();
// page_number = cocoon.request.page_number;
page_number = model.lookupWidget(page_number)
  area_name = model.lookupWidget(area_name);
  
  var session = cocoon.session;
  
cocoon.sendPage(TransactionsResults.html, 
  {
 page_number : page_number,
  area_name : area_name
 });
}

Merci

Aurélien DEHAY [EMAIL PROTECTED] wrote:
Le mercredi 06 avril 2005 à 11:15 +0200, douentza douentza a écrit :
 En fait ma connaissance des flows est de tres bas niveau. Je veux donc 
 chercher des
 examples de sources sur le web pour comprendre d'avance.
 Si vous avez des liens ou des exemples de faits sur cela je suis interesse.

Regarde les exemples fournis avec les sources de Cocoon, dans
cocoon-2.1.7/src/blocks/tour/samples/flow en particulier, tu en as des
vraiment bien.

-- 
Aurélien DEHAY 


-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



-
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail

Vue de déboguage

2005-04-08 Thread Sebastien Arbogast
Bonjour,

Quand je bosse en PHP j'ai une petite page de déboguage qui m'affiche
dans un joli tableau toutes les variables d'environnement, les
variables de session, de requêtes, les variables POST... enfin le
contenu de tous les tableaux superglobaux. Je l'utilise souvent pour
vérifier les sorties de mes formulaires avant de traiter les données.
Est-ce que ce serait possible d'avoir la même chose avec Cocoon ? Si
oui en utilisant quelle technique ? Je suppose que ça serait faisable
en XSP mais j'ai ouï dire que XSP n'était pas tout à fait un choix
d'avenir sur Cocoon... Et ça serait possible d'avoir ça comme une vue,
au même titre que content ou prettycontent ?

Merci beaucoup d'avance

Cordialement
-- 
Sebastien ARBOGAST

-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



Re: FlowScript and Upload after upgrade to Cocoon 2.1.7

2005-04-08 Thread Antonio Gallardo
On Jue, 7 de Abril de 2005, 11:56, Jakub Kaniewski dijo:
 Recently I upgraded Cocoon from 2.1.5 to 2.1.7. Most of things works
 fine, except one FlowScript function.

 I have this HTML form (hidden fields values are passed from flow) :

 form enctype=multipart/form-data method=POST aaction=upload.html
 inputtype=file name=plik
 input type=submit name=upload value=Upload file 
 input type=hidden name=directory value=/root/file 
 input type=hidden name=action value=upload
 /form


 In FlowScript if I try to access my hidden fields

 var action = cocoon.request.get(action);

See the logs, I remember a change of this interface in 2.1.7:

Remove restrictions on the flowscript object model (FOM): the objects
available through the cocoon object (request, session, response, etc) now
provide the full API of the corresponding Java classes. (SW)

Perhaps you need to access the values in a diferent way.

Best Regards,

Antonio Gallardo

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



Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Antonio Gallardo
Hi Thorsten,

they (anyware) already have a lot of code. See (download and try):

http://www.anyware-tech.com/en/developper/EclipsePlugins/Download.html

AFAIK, this is the code being released for lepido. Currently, it is based
on cocoon 2.1.5 and tomcat 4.1.29. The eclipse plugin looks fine. I
already downloaded it and played a little with it. But a good docos are
needed to get more into.

Best Regards,

Antonio Gallardo.

On Jue, 7 de Abril de 2005, 15:06, Thorsten Scherler dijo:
 On Tue, 2005-04-05 at 19:33 +0200, Sylvain Wallez wrote:


 [Announce] Eclipse Lepido

 Hello Sylvain,

 nice to hear you are planing this project but did you know that in
 forrest.apache.org we host already a similar tool?

 Have a look at
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/tools/eclipse/

 You wrote that your project is starting in the proposal phase, you may
 consider using the forrest/eclipse plugin and helping to enhance it in
 forrest.apache.org. That would allow you a quick start with community
 and code. ;-)

 We, speaking for the forrest project, will happily welcome you (and
 everybody else) and help you creating the project here on apache. Maybe
 as subproject of forrest/cocoon. Of course you can go ahead with your
 original plan and use the above mentioned code (it's open source ;-) )
 as starting point if you want.

 Anyway thanks for this good news. I am looking forward to use (and if I
 can, enhance) it. :)

 For all that do not know forrest:
 Apache Forrest is an XML standards-oriented documentation framework
 based upon Apache Cocoon, providing XSLT stylesheets and schemas, images
 and other resources. Forrest uses these to render the source content
 into a website via command-line, robot, or dynamic application.

 salu2
 --
 thorsten

 Together we stand, divided we fall!
 Hey you (Pink Floyd)


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



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



Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Antonio Gallardo
On Jue, 7 de Abril de 2005, 11:11, Nouguier Olivier dijo:
 So hay,
   Where could I learn more on AXE?

Try:

http://www.anyware-tech.com/en/developper/EclipsePlugins/Download.html

Best Regards,

Antonio Gallardo


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



Re: AW: AW: AW: AW: Design note - Building a template mechanism

2005-04-08 Thread gounis
hi thorsten

it looks _deeper_ than what i had in my mind
i would like to take all look, but i have not play with forrest (until 
now) so please give me some time .. to come back with my impressions from 
forrest

regards

stavros

On Fri, 8 Apr 2005, Thorsten Scherler wrote:

 Hi,
 
 I had a look on the wiki page you posted 
 http://wiki.apache.org/cocoon/TemplateBasedWebSite and it gave me some really 
 good
 ideas for the view plugin I am working on in forrest.
 
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.view/?rev=160476
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/?rev=160476
 
 Together with another plugin (right now called leather but will be
 renamed to ViewHelper) it is following the DispatcherView pattern
 http://java.sun.com/j2ee/patterns/DispatcherView.html and building a
 unit.
 
 I am using right now a different approach then you but it seems we are
 trying to solve the same problem.
 
 Have a look at
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/default.fv?view=markup
 
 That is a view on a site. The link is the default view for the site but
 you can define a new view for each page of your webapp.
 
 A view basically contains three tags (for now - it is in a really early
 stage):
 forrest:view
   xmlns:forrest=http://apache.org/forrest/templates/1.0; type=xhtml
   forrest:contract name=meta/
   forrest:hook name=container
forrest:contract name=feedback/
   /forrest:hook /
 /forrest:view
 
 The view tag's @type determines the final output format. The idea is to
 configure different output formats via a view. That is the biggest
 different to your approach.
 
 Each forrest:hook will be transformed into a div/ tag (in html
 output). This tags are designed to help web-designers to freely move
 around and group contracts into design container.
 
 Each forrest:contract will dispatch a xml file (ViewHelper) that contains
 xsl:stylesheets for the different output formats, a contract can
 implement. For html, the only format that I have implemented so far, we
 have three different kind of templates:
 
 xsl:templates name={contract/@name}-css/
 Here the contract specific css will be stored.
 
 xsl:templates name={contract/@name}-head/
 Here goes everything that belongs in the html head. e.g. scripts.
 
 xsl:templates name={contract/@name}-body/
 Everything that belongs into the body.
 
 e.g.
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/fontsize.ft?view=markup
 
 
 The view follows exactly the pattern shown here: 
 http://corej2eepatterns.com/Patterns2ndEd/DispatcherView.htm
 Right now it is implemented for the forrest way of producing the models
 for the view but I am planing to create independent BusinessHelper to
 access all BusinessServices you may have in your application.
 e.g. 
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/feedback.ft?view=markup
  
 shows that the $config has to be in the presentation model. Right now there 
 are only forrest core BusinessHelper.
 
 One workaround is
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/feedback-dyn.ft?rev=159861view=markup
 where I pass the models via xsl:param name=main/ into the ViewHelper. 
 That 
 
 salu2
 


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



Betr.: Re: Passing request headers

2005-04-08 Thread Peter . Urbanus




Hi [EMAIL PROTECTED]

Thanks for your answer. I think we have a little misunsderstanding. I'm not
very experienced in the web world, so perhaps I use the wrong terminology,
in which case, please straighten me out. Or, if I completely missed your
point, straighten me out as well :-)

There are many ways to pass request parameters to HtmlGenerator, but what I
want to do is change the outgoing request header. In Java, I would do it
like this:
  URL url = new URL( http://old-server/legacy.html; );
  URLConnection conn = url.openConnection();
  conn.setRequestProperty( accept-language, nl );
After that you can open a stream and let Tidy do its thing. This works: if
I give it nl I get 08-04-2005 and if I give it en-us I get 04/08/2005
if that date happens to be in the html.
I don't see any way to tell HtmlGenerator to do that. Perhaps Upayavira is
right and I need to subclass HtmlGenerator. The Cocoon source is very new
to me so this will take some time.



news [EMAIL PROTECTED] wrote on 07-04-2005 10:28:17:

 [EMAIL PROTECTED] wrote:
  [...]
  Thanks, [EMAIL PROTECTED]
  Do you mean that you can have HtmlGenerator operate on a request
attribute?
  If i understand that correctly, that would mean you can read your html
from
  a POST request. That wouldn't help, because I want that html from the
old
  server. You know, send it a http request like
 
  GET http://old-server/legacy.html HTTP/1.1
  accept-language: nl, en-us
  etc.
 
  I browsed the source oif HtmlTransformer, and it also has a parameter
  copy-parameters, but that wouldn't help me either, it just copies the
  query-string at the end of the src attribute.
 
  Or am I totally missing something?
 
  Peter

 Hi Peter,
 What I understand from that documentation mentioned is that you can use
 generate with additional parameters.

 So if you have a request like

http://yourServer/yourPath?Source=http://foo.bar.tld

 which will be matched by your pipeline, you could pass additional
 parameters.

 -
 map:match pattern=yourPath
map:generate type=html src={request-param:Source}
  map:parameter name=... value=.../
/map:generate
...
 /map:match
 -

 Sorry, if I'm wrong. Haven't tested that case.
 --
 [EMAIL PROTECTED]


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



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



problem withs sessions running JSPs in COCOON (ver. 2.1.4)

2005-04-08 Thread Miguel Angel Marín Moreno
Hi all!
I have a problem with essions in cocoon. In my pipeline I execute a 
piece of code in JSP using CINCLUDE transformer. In this piece of code I 
load some values in the session which ones later I need to get with 
executing another JSP. (I can't use cocoon's sessions/context because I 
can't get its values from the JSP code)

In other words, I'll try to explain it better with the code (read the 
comments please)

this is my pipeline:
map:match pattern=Almacena.jsp
 map:generate type=request
  map:parameter name=generate-attributes value=true/
  /map:generate
!-- the pipeline starts with an XML which contains the REQUEST details --
!-- peticion.xsl is an XSLT that transform the XML to set the correct 
params to apply the CINCLUDE with the params that identify the URL of 
the JSP file that I want to execute --

   map:transform src=xsl/peticion.xsl
   map:parameter name=cms-url
 value=http://mmarin:8080/pruebasSesion/Ejemplos/
   map:parameter name=url-peticion value=AlmacenaSession.jsp/
   /map:transform
!-- I've thought in the posibility of passing the SessionID as a 
parameter to the JSP, but don't know how to set the sessionID in JSP. 
Any idea?--

!-- When I apply the Cinclude transformer, the JSP code RUNS WITH A 
DIFFERENT SESSION EACH TIME (that's my problem!) --

map:transform type=cinclude/
!-- As I am only proving the way of doing this, I'm using a very simple 
 JSP file which set the values of 2 params (nombre, edad) in the 
session and returns an XML file which will be transformed by the XSLT 
Almacena.xsl --

  map:transform src=xsl/Almacena.xsl/
 map:serialize type=html/
   /map:match
This is the piece of JSP code:
%@ page language=Java session=true%?xml version=1.0
encoding=ISO-8859-1?
%@ page import=java.util.* %
%!String nombre;
Integer edad;
String sessionId; %
 %nombre=request.getParameter(nombre);
edad=Integer.parseInt(request.getParameter(edad));
sessionId = session.getId();
session.setAttribute(nombre,nombre);
session.setAttribute(edad,edad);%
AlmacenaEnSession
nombre%=nombre%/nombre
edad%=edad%/edad
sessionID%=sessionId%/sessionID
/AlmacenaEnSession
I get the SessionID so I can prove that it's different of the one I have 
in the browser :((

Finally I try to recovery the info I've saved in the JSP session using 
another pipeline similar to this one which execute a JSP code too.
As the session in which the JSP runs is different each time I cannot get 
the values

Any idea?
Thanks in advance!!
Miguel Angel Marín
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: providing a WebService

2005-04-08 Thread Jan Hinzmann
Hi, although this is some time ago, i just wanted to let you know, that i have 
achieved this task. I did some documentation in the wiki at:

http://wiki.apache.org/cocoon/WebServiceServer
and you maybe want to review it. I will complete the documentation, when I'm 
done with my thesiswriting (in which i use cocoon :)).

and btw ANY comments are welcome!
Luca Morlando wrote:
Thank you very much, Nick.
Now I'm scratching my head on this one:
When I try to connect to the service I receive:
java.io.IOException: Server returned HTTP response code: 500 for URL ...
Thank you very much for any advice on this.
Luca
Nick Goupinets wrote:
Hey Luca,
I don't know if this will help, as you have probably read it already:
http://marc.theaimsgroup.com/?t=10986227012r=1w=2
Read the whole thread, and pay special attention to:
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109871573620372w=2
Sincerely,
Nick.
Luca Morlando wrote:
Hi there...
We're struggling against Cocoon in the try of providing a WebService 
(SOAP) out of the
result of a pipeline which already produces XML.
The documentation on this part lacks almost completely.
Does anyone of you have a suggestion or a working example ?
Or point us where to look better because it's already been discussed 
in.. and we
didn't find it ?
Thank you very much for any advice on this.

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

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


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


complex CForm

2005-04-08 Thread Arsen A. Gutsal
I've XML DB like:
customers
customer type=Residential

residential-typeResidential/residential-type

firstnameArsen/firstname
surnameGutsal/surname
email[EMAIL PROTECTED]/email

phone
area-code352/area-code
phone-number9051207/phone-number
/phone

countryUA/country
addressx/address
zip1/zip
/customer
...
/customers

I would like to display list of customers in form:
Position, Customer_type,  [edit] and [delete] buttons
e.g. 
1, Residential [edit] [delete]
2, Residentail  [edit] [delete]
3, Business  [edit] [delete]
4, Residential  [edit] [delete]

100, Business  [edit] [delete]
having 100 items on page.
once user click on Edit - form re-submits and display whole records for
edited row.
e.g. edited 3rd record:
1, Residential [edit] [delete]
2, Residentail  [edit] [delete]
3, Business  [save] [delete]
=
input Registration_type
input Firstname
input Surname
input Email
input Phone
select Country
input Address
input Zip
=
4, Residential  [edit] [delete]

100, Business  [edit] [delete]


Also, for edited record [edit] button changes to [save].

I did everything using union/struct and JX conditions...
But I guess that's not good as I have to keep all details fields for
each record as input type=hidden for all rows which are not in edit
state. and if row is in edit state - I display these fields. 
Such page is very heavy.
I would better ask for some way to DYNAMICALLY bind part of my form when
needed.
Or use another form inside main one.
I would prefer it do not open in another page, just exactly as I
explained.

What can you suggest me? 
-- 
Arsen A. Gutsal [EMAIL PROTECTED]
SOFTSKY Ltd


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



Re: Best way to initialize Context, Session and Request attributes

2005-04-08 Thread Jorg Heymans

[EMAIL PROTECTED] wrote:
Thanks for the answer. Only, these listeners belong to the Servlet API and 
not to Cocoon, so this will not work in batch mode, when there's a 
BatchContext instead of a HttpContext. Is there a Cocoon specific method?

You didn't mention your app is running in batch mode. I don't know much 
about cocoon batch mode. Do you even have Context, Session and Request 
attributes available without the HTTPContext?

But anyway, did you know an action can span multiple matchers? It's how 
the autentication framework works basically, you encapsulate one action 
around all the pipelines you want to protect. Maybe this helps you 
reducing your sitemap code enough already.

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


Re: Best way to initialize Context, Session and Request attributes

2005-04-08 Thread Upayavira
[EMAIL PROTECTED] wrote:
Hi,
in my webapp I need to initialize the Context, Session and Request 
attributes, e.g. with database connections, message queues etc. What is 
the best way to do this in Cocoon? Right now I'm using actions, but this 
is not satisfactory, as I have to put the action in many places in my 
sitemaps. Is there a better way to do this, e.g. some kind of hook that is 
called when Contexts, Sessions and Requests are created and disposed?
Can't you just say:
map:pipeline
  map:action type=myaction/
  map:match pattern=...
That way, your action is always called, on every request. Pretty sure 
that would work.

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


Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Sylvain Wallez
Thorsten Scherler wrote:
On Tue, 2005-04-05 at 19:33 +0200, Sylvain Wallez wrote:
 

[Announce] Eclipse Lepido
   

Hello Sylvain,
nice to hear you are planing this project but did you know that in
forrest.apache.org we host already a similar tool? 

Have a look at 
http://svn.apache.org/viewcvs.cgi/forrest/trunk/tools/eclipse/

You wrote that your project is starting in the proposal phase, you may
consider using the forrest/eclipse plugin and helping to enhance it in
forrest.apache.org. That would allow you a quick start with community
and code. ;-)
 

Wow, didn't knew about this Forrest plugin. AFAICS it seems to have some 
common roots with Burrokeet (http://www.burrokeet.org/).

We, speaking for the forrest project, will happily welcome you (and
everybody else) and help you creating the project here on apache. Maybe
as subproject of forrest/cocoon. Of course you can go ahead with your
original plan and use the above mentioned code (it's open source ;-) )
as starting point if you want.
 

IMO, Apache is not the right place for an IDE as Apache focuses on 
server and infrastructure software. Furthermore, the Lepido's goals go 
very far in the IDE features, and therefore require different skills 
than those needed to develop the server-side framework. That's what led 
us to propose this project to the Eclipse folks.

Sylvain
--
Sylvain WallezAnyware Technologies
http://apache.org/~sylvainhttp://anyware-tech.com
Apache Software Foundation Member Research  Technology Director
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Auth-fw and utf-8 logins

2005-04-08 Thread Aurélien DEHAY
Hello.

I'm experiencing strange behaviour using:

- auth-fw
- flow (the
org/apache/cocoon/webapps/authentication/flow/javascript/auth.js file
from auth-fw block)
- a simple login.xsp file making request on a database (which is used by
the authentication pipeline configured in the handler/)

I've wrote a flow file to handle the user input, and like in the
samples, I'm using:

if (auth_login(handler, null, {parameter_login:login,
parameter_password:password})) { etc. etc.

If I try a utf-8 login, the parameters are good in the flow, but not in
the xsp. For examples, if I output the value of the login, I've  in the
flowscript, but  in the login.xsp.

I'm not a java dev, I've search in the source code without seeing
anything relevant. I've tried several solution, without succedding to
have good utf-8 parameters in login.xsp.

Is anyone ever tried this?

Rgds.


-- 
Aurlien DEHAY [EMAIL PROTECTED]


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



Re: AW: AW: AW: AW: Design note - Building a template mechanism

2005-04-08 Thread Thorsten Scherler
On Fri, 2005-04-08 at 10:48 +0300, [EMAIL PROTECTED] wrote:
 hi thorsten
 
 it looks _deeper_ than what i had in my mind
 i would like to take all look, but i have not play with forrest (until 
 now) so please give me some time .. to come back with my impressions from 
 forrest
 

Be our guest. ;-) Forrest is pretty straight forward. We are introducing
a new plugin infrastructure for the upcoming 0.7 release. The mentioned
plugin are using this new feature.

The plugins are still in early stage and we are open for all feedback
and help. If you need more information just subscribe to the user/dev
lists of forrest. ;-)

salu2

 regards
 
 stavros
 
 On Fri, 8 Apr 2005, Thorsten Scherler wrote:
 
  Hi,
  
  I had a look on the wiki page you posted 
  http://wiki.apache.org/cocoon/TemplateBasedWebSite and it gave me some 
  really good
  ideas for the view plugin I am working on in forrest.
  
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.view/?rev=160476
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/?rev=160476
  
  Together with another plugin (right now called leather but will be
  renamed to ViewHelper) it is following the DispatcherView pattern
  http://java.sun.com/j2ee/patterns/DispatcherView.html and building a
  unit.
  
  I am using right now a different approach then you but it seems we are
  trying to solve the same problem.
  
  Have a look at
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.view/src/documentation/default.fv?view=markup
  
  That is a view on a site. The link is the default view for the site but
  you can define a new view for each page of your webapp.
  
  A view basically contains three tags (for now - it is in a really early
  stage):
  forrest:view
xmlns:forrest=http://apache.org/forrest/templates/1.0; type=xhtml
forrest:contract name=meta/
forrest:hook name=container
 forrest:contract name=feedback/
/forrest:hook /
  /forrest:view
  
  The view tag's @type determines the final output format. The idea is to
  configure different output formats via a view. That is the biggest
  different to your approach.
  
  Each forrest:hook will be transformed into a div/ tag (in html
  output). This tags are designed to help web-designers to freely move
  around and group contracts into design container.
  
  Each forrest:contract will dispatch a xml file (ViewHelper) that contains
  xsl:stylesheets for the different output formats, a contract can
  implement. For html, the only format that I have implemented so far, we
  have three different kind of templates:
  
  xsl:templates name={contract/@name}-css/
  Here the contract specific css will be stored.
  
  xsl:templates name={contract/@name}-head/
  Here goes everything that belongs in the html head. e.g. scripts.
  
  xsl:templates name={contract/@name}-body/
  Everything that belongs into the body.
  
  e.g.
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/fontsize.ft?view=markup
  
  
  The view follows exactly the pattern shown here: 
  http://corej2eepatterns.com/Patterns2ndEd/DispatcherView.htm
  Right now it is implemented for the forrest way of producing the models
  for the view but I am planing to create independent BusinessHelper to
  access all BusinessServices you may have in your application.
  e.g. 
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/feedback.ft?view=markup
   
  shows that the $config has to be in the presentation model. Right now there 
  are only forrest core BusinessHelper.
  
  One workaround is
  http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.leather/resources/templates/feedback-dyn.ft?rev=159861view=markup
  where I pass the models via xsl:param name=main/ into the ViewHelper. 
  That 
  
  salu2
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
thorsten

Together we stand, divided we fall! 
Hey you (Pink Floyd)


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



Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Thorsten Scherler
On Fri, 2005-04-08 at 01:06 -0600, Antonio Gallardo wrote:
 On Jue, 7 de Abril de 2005, 11:11, Nouguier Olivier dijo:
  So hay,
Where could I learn more on AXE?
 
 Try:
 
 http://www.anyware-tech.com/en/developper/EclipsePlugins/Download.html
 
 Best Regards,
 

Cheers Antonio,

I just had a quick look and it seems to really nice. I will give a
go. :)

salu2

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

Together we stand, divided we fall! 
Hey you (Pink Floyd)


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



Re: debug with chainsaw

2005-04-08 Thread Renaud Richardet
Now it's working.

Thanks Wojciech and Scott for your infos, which I summarized on a wiki page [1].

Cheers, Renaud

[1]  http://wiki.apache.org/cocoon/ChainSaw

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



Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Sylvain Wallez
Antonio Gallardo wrote:
Hi Thorsten,
they (anyware) already have a lot of code. See (download and try):
http://www.anyware-tech.com/en/developper/EclipsePlugins/Download.html
AFAIK, this is the code being released for lepido.
Exactly.
Currently, it is based on cocoon 2.1.5 and tomcat 4.1.29.
This is only the Cocoon start plugin, which really isn't the central 
part of our donation to Eclipse. The main part of it is the editors and, 
more importantly, the AXE platform (currently meaning Anyware XML 
Editor but should be renamed to something like Advanced XML editor) 
which is a XUL-like system to build form-oriented editors.

The eclipse plugin looks fine. I
already downloaded it and played a little with it. But a good docos are
needed to get more into.
 

Yup. You'll be able to write them as part of the Lepido effort :-P
Sylvain
--
Sylvain WallezAnyware Technologies
http://apache.org/~sylvainhttp://anyware-tech.com
Apache Software Foundation Member Research  Technology Director
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Out Of Memory error using ResourceReader

2005-04-08 Thread Michael Wirz
Hello List,
when trying to serve big zip files through cocoon we encounter 
OutOfMemoryErrors.
Our setup is as follows:

(default) reader definition:
map:readers default=resource
   map:reader logger=sitemap.reader.resource name=resource 
pool-max=32 src=org.apache.cocoon.reading.ResourceReader/
/map:readers

pipeline matching the request:
 map:match pattern=*/downloads/special/*.zip
 map:read src=downloads/{1}/{2}.zip mime-type=application/zip/
  /map:match
Does anyone know whether there's a filesize limitation?
Any work arounds other than increasing heap memory?
Is there a way to stream the binary (i.e. a StreamingReader or similar)?
Thanks in advance for help,
Michael
--
abs IT Service GmbH
Ein Unternehmen der abs Gruppe
Michael Wirz
Entwicklung
Landsberger Straße 57
82266 Stegen am Ammersee
Telefon: +49-(0)8143-999-43
Telefax: +49-(0)8143-999-49
[EMAIL PROTECTED]
www.eFonds24.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Thorsten Scherler
On Fri, 2005-04-08 at 13:53 +0200, Sylvain Wallez wrote:
 Thorsten Scherler wrote:
 
 On Tue, 2005-04-05 at 19:33 +0200, Sylvain Wallez wrote:
   
 
 [Announce] Eclipse Lepido
 
 
 
 Hello Sylvain,
 
 nice to hear you are planing this project but did you know that in
 forrest.apache.org we host already a similar tool? 
 
 Have a look at 
 http://svn.apache.org/viewcvs.cgi/forrest/trunk/tools/eclipse/
 
 You wrote that your project is starting in the proposal phase, you may
 consider using the forrest/eclipse plugin and helping to enhance it in
 forrest.apache.org. That would allow you a quick start with community
 and code. ;-)
   
 
 
 Wow, didn't knew about this Forrest plugin. AFAICS it seems to have some 
 common roots with Burrokeet (http://www.burrokeet.org/).
 

Yeah, Ross is the main head on burrokeet and as well Forrest committer. 

 We, speaking for the forrest project, will happily welcome you (and
 everybody else) and help you creating the project here on apache. Maybe
 as subproject of forrest/cocoon. Of course you can go ahead with your
 original plan and use the above mentioned code (it's open source ;-) )
 as starting point if you want.
   
 
 
 IMO, Apache is not the right place for an IDE as Apache focuses on 
 server and infrastructure software. Furthermore, the Lepido's goals go 
 very far in the IDE features, and therefore require different skills 
 than those needed to develop the server-side framework. That's what led 
 us to propose this project to the Eclipse folks.
 
 Sylvain
 

Yeah, I understand. I am right now trying out the Anyway plugins. :)

Cheers again for releasing the code and all the best for the Lepido
project.

salu2
-- 
thorsten

Together we stand, divided we fall! 
Hey you (Pink Floyd)


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



Re: [Announce] Eclipse Lepido, and opensource IDE for Apache Cocoon

2005-04-08 Thread Antonio Gallardo
On Vie, 8 de Abril de 2005, 7:10, Sylvain Wallez dijo:
 Antonio Gallardo wrote:

Hi Thorsten,

they (anyware) already have a lot of code. See (download and try):

http://www.anyware-tech.com/en/developper/EclipsePlugins/Download.html

AFAIK, this is the code being released for lepido.


 Exactly.

Currently, it is based on cocoon 2.1.5 and tomcat 4.1.29.


 This is only the Cocoon start plugin, which really isn't the central
 part of our donation to Eclipse. The main part of it is the editors and,
 more importantly, the AXE platform (currently meaning Anyware XML
 Editor but should be renamed to something like Advanced XML editor)
 which is a XUL-like system to build form-oriented editors.

XUL = Yum! I cannot wait to see the code!


The eclipse plugin looks fine. I
already downloaded it and played a little with it. But a good docos are
needed to get more into.

 Yup. You'll be able to write them as part of the Lepido effort :-P

8-)

Do you have something in docos or there is nothing at all?

Best Regards,

Antonio Gallardo.

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



Re: Out Of Memory error using ResourceReader

2005-04-08 Thread Michael Wirz
Hello List!
I managed to find the answer to my own question.
The pipeline reads the entire file into memory by default.  With the
map:parameter name=outputBufferSize value=8192/
entry, you can set the buffer size, so it doesn't fill up the entire 
heapspace.  It is also advised to set the pipeline type to noncaching 
that so the entire cache isn't filled with the large file.

Here is an example:
map:pipeline type=noncaching  map:parameter name=outputBufferSize 
value=8192/  map:match pattern=**.zip
  map:read src={1}.zip mime-type=application/octet-stream/ 
/map:match
/map:pipeline

Thank you,
Michael Wirz
Hello List,
when trying to serve big zip files through cocoon we encounter 
OutOfMemoryErrors.
Our setup is as follows:

(default) reader definition:
map:readers default=resource
   map:reader logger=sitemap.reader.resource name=resource 
pool-max=32 src=org.apache.cocoon.reading.ResourceReader/
/map:readers

pipeline matching the request:
 map:match pattern=*/downloads/special/*.zip
 map:read src=downloads/{1}/{2}.zip mime-type=application/zip/
  /map:match
Does anyone know whether there's a filesize limitation?
Any work arounds other than increasing heap memory?
Is there a way to stream the binary (i.e. a StreamingReader or similar)?
Thanks in advance for help,
Michael

--
abs IT Service GmbH
Ein Unternehmen der abs Gruppe
Michael Wirz
Entwicklung
Landsberger Straße 57
82266 Stegen am Ammersee
Telefon: +49-(0)8143-999-43
Telefax: +49-(0)8143-999-49
[EMAIL PROTECTED]
www.eFonds24.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problem with text stream

2005-04-08 Thread Grzegorz Sikora
Hello beyanet.com,

Friday, April 8, 2005, 4:08:00 PM, you wrote:

bc text text text text text
bc p/
bc more text text text text

bc The problem is that when the data is being displayed in the browser
bc the paragraph tag is not processed as valid html but is being 
bc displayed as part of the text.

bc How do I resolve this issue?

It's becouse  and  are converted to lt; and gt;
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108673618521805w=2

-- 
Best regards,
 Grzegorz Sikora


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



Re: SourceWritingTransformer

2005-04-08 Thread Lars Huttar
Lars Huttar wrote:
Michael Wechner wrote:
Antonio Gallardo wrote:
On Mie, 6 de Abril de 2005, 9:43, Sylvain Wallez dijo:

Rather than using a transformer, you really should consider using the
flowscript and the PipelineUtil class, or the copy-source action.
  

is there a more concrete example on this?

I second this question, Sylvain.
A big advantage of transformers is that they can take a 
dynamically-generated list of source/dest files as input.
I don't know how to do that with an action -- is it possible?
Hmm, now that I think about it (maybe somebody mentioned this last time 
this topic came up?), you could do this by generating cinclude elements 
that call a pipeline that performs this action with parameters.

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


dynamci selection list in cform problem

2005-04-08 Thread Patrick Verboom
Hi,
On of our forms has a selection list in a CFORM. The values in the list 
are dynamically created from entries in a Database and are put in the 
list by calling a cocoon pipeline. see code snippet below.
When I don't use the dynamic=true attribute than the selection list is 
shown and working fine except that when content in the database is 
changed the values in the selection list isn't changed. The selection 
list is created once and than not anymore.
When I use the dynamic=true attribute the selection list isn't working 
anymore. Instead of a list an input field is shown. Not exactly what we 
want.

Am I doing something wrong or is it a BUG? Is there another way of doing 
this?

We are using the cocoon 2.2 dev.
fd:field id=facility_type
   fd:labelCentre Type:/fd:label
   fd:datatype base=string/
   fd:selection-list 
src=cocoon:/search_CENTRE.CENTRE_TYPE.xml dynamic=true/
   /fd:field

Thanks in advance,
Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: AW: AW: AW: Design note - Building a template mechanism

2005-04-08 Thread Messing, Elad
Hello stavros and all
Stavros - I am continuing with my questions regarding your example. 
Currently, the title of each page is hard coded in the layout.xhtml 
file. (home).

I was looking at a way to use the already present 

head
titlewebsite title/title
/head

tag in the content files, and replace the title in the layout.

What I did is to add to the apply_layout.xsl file this match :

  !-- if page-title is defined in the content page, I am using it to replace 
the HTML title--
  xsl:template match=head/title
xsl:choose
xsl:when test=//osm:page-title
titlexsl:value-of 
select=//osm:page-title//title
/xsl:when
xsl:otherwise
titlexsl:apply-templates//title
/xsl:otherwise
/xsl:choose  
  /xsl:template

In order to - when going through the title - look if there is a 
specific title to use - and use it.

However - I am having problems with this match 'xsl:template 
match=head/title' .

This is because of namespaces. In this phase of the transformation, the 
relevant XML looks like :

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

head xmlns=http://www.w3.org/1999/xhtml; 
xmlns:osm=http://osmosis.gr/osml/1.0; 
xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;
titleHome/title
meta http-equiv=Content-Style-Type content=text/css/
META HTTP-EQUIV=Content-Type CONTENT=text/html; 
charset=utf-8/

LINK HREF=layout-resources/styles/style.css TYPE=text/css 
REL=stylesheet/
/head


Because the 'aggregate' (in the sitemap.xml) removed the root element, 
the namespace moved to the next item - the header item - and the template 
match for head/title doesnt match. I am not an Xpath expert - But I think 
this is a default namespace problem. 

Do you know what Xpath expression I need to use here ? Or maybe this is 
the wrong way ?

Thanks !!

Elad


-Ursprngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 5. April 2005 14:20
An: users@cocoon.apache.org
Betreff: Re: AW: AW: AW: Design note - Building a template mechanism

On Tue, 5 Apr 2005, Elad Messing wrote:

  Hi again.
   I have added the fixes. I am not sure that they are all correct, as I 
 am quite a newbie.. They do however make it work :)
   Feel free to remove what is not needed.
 
   Hope it will help somebody someday - like it helped me..
 
 Elad

thnx 

i'll post the link for the demo site in this thread afternoon



--stavros


 
 -Ursprngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 5. April 2005 13:26
 An: users@cocoon.apache.org
 Betreff: Re: AW: AW: Design note - Building a template mechanism
 
 On Tue, 5 Apr 2005, Elad Messing wrote:
 
  I understand.
  So - I would very much like to learn the new implementation ! A demo site 
  could be great !
  
  In Parallel - I am going through the example in the wiki and finding some 
  errors in code. What do you think about me adding the fixes to make the 
  example work by copy paste ? Is it needed ? 
  
  Elad
  
 
 
 your  comments/fixes are welcome
 
 :-)
 
 
  -Ursprngliche Nachricht-
  Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 5. April 2005 12:22
  An: users@cocoon.apache.org
  Betreff: Re: AW: Design note - Building a template mechanism
  
  On Tue, 5 Apr 2005, Elad Messing wrote:
  
   Hello Stavros and all
 Thanks for the reply. I think I understand the usage of it as you 
   explained in the TemplateBasedWebSite wiki page.
 I also found the Othello example in the Scratchpad. 
   
 Currently I am studying the wiki example, trying to build the same 
   in my environment.
   
 Do you think the wiki example is still valid today, or you would 
   have done this in a different way in Cocoon 2.1.7 ? This is actually 
   my question :)
   
 Thanks
   
   Elad
   
  
  the idea described in wiki is the same, the impementation has changed
  
  (more features, cleaner code etc)
  
  
  
 
   
   -Ursprngliche Nachricht-
   Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 5. April 2005 11:38
   An: users@cocoon.apache.org
   Betreff: Re: Design note - Building a template mechanism
   
   
   hi elad
   
   i'm using this approach to create static web static web sites the goals 
   are:
   - yu  have one layout file (.xhtml). then i get the content form 
   each request (requested web page) and put it inside this layout (now 
   i'm close to have pages (web requests) that make an exception and 
   use an alternative
   layout)
   
   - you can define blocks with static 

Re: AW: AW: AW: AW: Design note - Building a template mechanism

2005-04-08 Thread gounis



hi elad

i tell you again that i have not decide yet how many steps (tranformation) 
i need to get the final stuff

to get the title for the momend you have to touch 


main.layout.xhtml:
...

head
  title
osm:title-copy/
  /title
/head

...


and
apply-layout.xsl:
here you must set instruction of you to handle osm:title-copy/


adding 2 match pattern:
...

  xsl:template match=osm:title-copy
xsl:call-template name=getTitle/
  /xsl:template  


  xsl:template name=getTitle
xsl:apply-templates select=//osm:page-title/text()/
  /xsl:template  


...


another one point in sitemap that you have to fix is
to add this transformation

map:transform src=osml/core/load-layout.xsl/

in

map:match pattern=xml/**.*

so this match will lokk like the one above it (xml/*.*)


i will make a try to find some time to clean up the code in the next days



On Fri, 8 Apr 2005, Messing, Elad wrote:

 Hello stavros and all
   Stavros - I am continuing with my questions regarding your example. 
   Currently, the title of each page is hard coded in the layout.xhtml 
 file. (home).
 
   I was looking at a way to use the already present 
   
 head
   titlewebsite title/title
 /head
   
   tag in the content files, and replace the title in the layout.
 
   What I did is to add to the apply_layout.xsl file this match :
   
   !-- if page-title is defined in the content page, I am using it to replace 
 the HTML title--
   xsl:template match=head/title
   xsl:choose
   xsl:when test=//osm:page-title
   titlexsl:value-of 
 select=//osm:page-title//title
   /xsl:when
   xsl:otherwise
   titlexsl:apply-templates//title
   /xsl:otherwise
   /xsl:choose  
   /xsl:template
   
   In order to - when going through the title - look if there is a 
 specific title to use - and use it.
 
   However - I am having problems with this match 'xsl:template 
 match=head/title' .
 
   This is because of namespaces. In this phase of the transformation, the 
 relevant XML looks like :
   
 ?xml version=1.0 encoding=ISO-8859-1?
 sitelayout
   
   head xmlns=http://www.w3.org/1999/xhtml; 
 xmlns:osm=http://osmosis.gr/osml/1.0; 
 xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;
   titleHome/title
   meta http-equiv=Content-Style-Type content=text/css/
   META HTTP-EQUIV=Content-Type CONTENT=text/html; 
 charset=utf-8/
   
   LINK HREF=layout-resources/styles/style.css TYPE=text/css 
 REL=stylesheet/
   /head
   
 
   Because the 'aggregate' (in the sitemap.xml) removed the root element, 
 the namespace moved to the next item - the header item - and the template 
 match for head/title doesn??t match. I am not an Xpath expert - But I 
 think this is a default namespace problem. 
 
   Do you know what Xpath expression I need to use here ? Or maybe this is 
 the wrong way ?
 
   Thanks !!
 
 Elad
 
 
 -Ursprngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 5. April 2005 14:20
 An: users@cocoon.apache.org
 Betreff: Re: AW: AW: AW: Design note - Building a template mechanism
 
 On Tue, 5 Apr 2005, Elad Messing wrote:
 
   Hi again.
  I have added the fixes. I am not sure that they are all correct, as I 
  am quite a newbie.. They do however make it work :)
  Feel free to remove what is not needed.
  
  Hope it will help somebody someday - like it helped me..
  
  Elad
 
 thnx 
 
 i'll post the link for the demo site in this thread afternoon
 
 
 
 --stavros
 
   
  
  -Urspr??ngliche Nachricht-
  Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Gesendet: Dienstag, 5. April 2005 13:26
  An: users@cocoon.apache.org
  Betreff: Re: AW: AW: Design note - Building a template mechanism
  
  On Tue, 5 Apr 2005, Elad Messing wrote:
  
   I understand.
   So - I would very much like to learn the new implementation ! A demo site 
   could be great !
   
   In Parallel - I am going through the example in the wiki and finding some 
   errors in code. What do you think about me adding the fixes to make the 
   example work by copy paste ? Is it needed ? 
   
   Elad
   
  
  
  your  comments/fixes are welcome
  
  :-)
  
  
   -Ursprngliche Nachricht-
   Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 5. April 2005 12:22
   An: users@cocoon.apache.org
   Betreff: Re: AW: Design note - Building a template mechanism
   
   On Tue, 5 Apr 2005, Elad Messing wrote:
   
Hello Stavros and all
Thanks for the reply. I think I understand the usage of it as 
you 
explained in the TemplateBasedWebSite wiki page.
I also found the Othello example in the Scratchpad. 

Currently I am studying the wiki example, 

Re: document() function in Saxon 8.3 under Cocoon 2.1.7

2005-04-08 Thread Jörg Heinicke
Hello Wendell,

(It's really a long time since I heard of you the last time - must have been
on the MulberryTech XSL list.)

 Hi,
 
 I've been messing with Cocoon 2.1.7 for a few days now. I like it a great 
 deal. Simple things do not have to be complicated.
 
 Because my application really benefits from the draft XSLT 2.0, I've got 
 Saxon 8.3 wired in. It's doing very well. (Snappy!) But ... I've run into
 a 
 discrepancy which I have to believe is a Cocoon thing.
 
 I'm calling the document() function very simply -- if a value $source-name
 is supposed to be a reference to an SVG file, I'm querying it to get the 
 dimensions of the SVG (given as attributes on the document element) and 
 putting them onto a temporary tree:
 
 xsl:variable name=dimension-lookup
d
  xsl:choose
xsl:when test=ends-with($source-name,'.svg')
  xsl:attribute name=whatHoo! got SVG!/xsl:attribute
  xsl:for-each select=document($source-name,/)/*
xsl:copy-of select=@width | @height/
  /xsl:for-each
/xsl:when
...
  /xsl:choose
/d
 /xsl:variable
 
 Outside Cocoon, this works -- when I copy this 'd' element to the output, 
 having provided a $source-name='westminster.svg' I get
 
   d width=872 height=184/
 
 ... which reflects, in fact, the correct values in westminster.svg.
 
 But when I run it inside Cocoon, I just get a plain d/.
 
 In my sitemap, in order to ensure I can read these SVGs, I have:
 
 map:match pattern=**.svg
map:generate src={1}.svg/
map:serialize type=svgxml/
 /map:match
 
 ... which appears to be sufficient to give me the SVG back when I provide 
 it to Cocoon directly in my browser.
 
 Anyone have a clue as to what's going on? I figured this might be a FAQ, 
 except I'm using the latest-and-greatest. Google gives me only hints like 
 using the document() function inside Cocoon isn't recommended.

The reason for the hint is a caching issue IIRC. document() should work in
principle.

From your sitemap snippet I guess you think document() path is resolved
against sitemap, what's not done AFAIK. This might already be the reason for
the failure. You can switch to sitemap by using cocoon:/ pseudo protocol.
Otherwise the path should be resolved in file system by default.

Furthermore there should be a log entry when document() fails. But I don't
know on which log level it logs.

Hope this helps,

Joerg

-- 
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl

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



How can I put this java variable to xml attribute?

2005-04-08 Thread Jarry Liu
Hi, everyone,

I use xsp get the values of two strings? How can I use these variables
in the xml form. My code is as following. Thanks for your kind help.

Jarry


...
xsp:logic
 int i;
 int num = 1;   

 String col = xsp-request:get-parameter name=dcol/;
 String filesname = xsp-request:get-parameter name =input/;
 
 !-- the filename contains several files, and looks like
[sample1.xml, sample2.xml] --
 String fname = filesname.substring(1,filesname.length()-1);

 StringTokenizer tk = new StringTokenizer( fname, ,);
 String file=; 

 while( tk.hasMoreTokens())
 {
   file = tk.nextToken();

   !-- Here I can get right result --
  col-name xsp:exprcol/xsp:expr /col-name;
file-name xsp:expr file/xsp:expr/file-name;
   
   !-- How can I pass the the variable to following form in
collection and oid respectly? --
   pform method = post action=
 textarea cols=50 rows=5 style=font-family:Verdana;
font-weight:bold READONLY=true
   db:query type=delete collection=   ??? 
#{col} oid= #{file} /
 /textarea  
   /form /p
 }  
/xsp:logic
...

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



Re: How can I put this java variable to xml attribute?

2005-04-08 Thread Carlos Chávez

Jarry Liu Escribio :-)
 Hi, everyone,

 I use xsp get the values of two strings? How can I use these variables
 in the xml form. My code is as following. Thanks for your kind help.

 Jarry


 ...
 xsp:logic
  int i;
  int num = 1;

  String col = xsp-request:get-parameter name=dcol/;
  String filesname = xsp-request:get-parameter name =input/;

  !-- the filename contains several files, and looks like
 [sample1.xml, sample2.xml] --
  String fname = filesname.substring(1,filesname.length()-1);

  StringTokenizer tk = new StringTokenizer( fname, ,);
  String file=;

  while( tk.hasMoreTokens())
  {
file = tk.nextToken();

!-- Here I can get right result --
   col-name xsp:exprcol/xsp:expr /col-name;
 file-name xsp:expr file/xsp:expr/file-name;

!-- How can I pass the the variable to following form in
 collection and oid respectly? --
pform method = post action=
  textarea cols=50 rows=5 style=font-family:Verdana;
 font-weight:bold READONLY=true
db:query type=delete collection=   ???
 #{col} oid= #{file} /

  Hi.
  I think you can use the tag xsp:attribute name=value/
  for example:

  db:query type=delete
  xsp:attribute name=collection here put the value /xsp:attribute
  xsp:attribute name=oid here put the value /xsp:attribute
  /db:query

  Cheers.
  Carlos Chávez.


  /textarea
/form /p
  }
 /xsp:logic
 ...

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



-- 
Carlos Chávez

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



Re: How can I put this java variable to xml attribute?

2005-04-08 Thread Jarry Liu
Carlos,

Thanks so much. I got it. 
Here is my code:

db:query type=delete
xsp:attribute name = 
collectionxsp:exprcol/xsp:expr/xsp:attribute
xsp:attribute name = oidxsp:exprfile/xsp:expr/xsp:attribute 
/db:query

Jarry




On Apr 8, 2005 2:40 PM, Carlos Chávez [EMAIL PROTECTED] wrote:
 
 Jarry Liu Escribio :-)
  Hi, everyone,
 
  I use xsp get the values of two strings? How can I use these variables
  in the xml form. My code is as following. Thanks for your kind help.
 
  Jarry
 
 
  ...
  xsp:logic
   int i;
   int num = 1;
 
   String col = xsp-request:get-parameter name=dcol/;
   String filesname = xsp-request:get-parameter name =input/;
 
   !-- the filename contains several files, and looks like
  [sample1.xml, sample2.xml] --
   String fname = filesname.substring(1,filesname.length()-1);
 
   StringTokenizer tk = new StringTokenizer( fname, ,);
   String file=;
 
   while( tk.hasMoreTokens())
   {
 file = tk.nextToken();
 
 !-- Here I can get right result --
col-name xsp:exprcol/xsp:expr /col-name;
  file-name xsp:expr file/xsp:expr/file-name;
 
 !-- How can I pass the the variable to following form in
  collection and oid respectly? --
 pform method = post action=
   textarea cols=50 rows=5 style=font-family:Verdana;
  font-weight:bold READONLY=true
 db:query type=delete collection=   ???
  #{col} oid= #{file} /
 
   Hi.
   I think you can use the tag xsp:attribute name=value/
   for example:
 
   db:query type=delete
   xsp:attribute name=collection here put the value /xsp:attribute
   xsp:attribute name=oid here put the value /xsp:attribute
   /db:query
 
   Cheers.
   Carlos Chávez.
 
 
   /textarea
 /form /p
   }
  /xsp:logic
  ...
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 --
 Carlos Chávez
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: document() function in Saxon 8.3 under Cocoon 2.1.7

2005-04-08 Thread Wendell Piez
Hi Joerg,
At 01:34 PM 4/8/2005, you wrote:
(It's really a long time since I heard of you the last time - must have been
on the MulberryTech XSL list.)
Yep: home territory for me. :-)
 Anyone have a clue as to what's going on? I figured this might be a FAQ,
 except I'm using the latest-and-greatest. Google gives me only hints like
 using the document() function inside Cocoon isn't recommended.
The reason for the hint is a caching issue IIRC. document() should work in
principle.
Yes. Further research has suggested that problems with it in the past 
should have nothing to do with this case. The FAQ warns against document() 
and offers intelligible reasons for avoiding it, but apparently it is 
supposed to work. I may simply have fallen between two upgrades (since 
Saxon is also in flux).

From your sitemap snippet I guess you think document() path is resolved
against sitemap, what's not done AFAIK.
That's good to know. I tried that only as a wild guess, but resolving 
against the file system is preferable.

 This might already be the reason for
the failure. You can switch to sitemap by using cocoon:/ pseudo protocol.
Otherwise the path should be resolved in file system by default.
I will look into this.
It has also been suggested to me that there could be a URI resolution 
problem, which I might be able to debug, now there's a baseURI() function.

Furthermore there should be a log entry when document() fails. But I don't
know on which log level it logs.
That also gives me a place to dig.
Needless to say, I'll still be grateful for any help. Either I have to find 
and fix the bug in my setup, or this will haunt XSLT 2.0 experimenters ... 
my use case for document() is a legit one, I think, and there are others.

If anyone else out there is trying Saxon 8.3 and can duplicate this bug (or 
not, demonstrating the bug is in my setup), that would also be useful info.

Hope this helps,
It does, thanks!
Wendell
==
Wendell Piezmailto:[EMAIL PROTECTED]
Mulberry Technologies, Inc.http://www.mulberrytech.com
17 West Jefferson StreetDirect Phone: 301/315-9635
Suite 207  Phone: 301/315-9631
Rockville, MD  20850 Fax: 301/315-8285
--
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Creating Java objects in JX templates with JEXL?

2005-04-08 Thread Jochen Kuhnle
Hi, is it possible to create Java objects in JX templates using JEXL? 
Something like jx:set var=src value=${new Object()}/?

Regards,
Jochen

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



Re: Creating Java objects in JX templates with JEXL?

2005-04-08 Thread Mark Lundquist
On Apr 8, 2005, at 4:43 PM, Jochen Kuhnle wrote:
Hi, is it possible to create Java objects in JX templates using JEXL?
Something like jx:set var=src value=${new Object()}/?
1) I think so
2) It sounds like a bad idea
HTH,
ml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


steps install in windows

2005-04-08 Thread Andres Taborda
hello list
Some can help with steps for install
cocoon 2.1.6 in windows XP.

Have an error when run build.bat display
failed with javadoc.
The variable JAVA_HOME is addition by control-panel

This is the message of error:

prepare-web-app-docs:

javadocs:
generating javadocs
javadocs executions

build failded






_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

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



Re: dynamci selection list in cform problem

2005-04-08 Thread Johnson
Hi!
We got the same problem,and we change the following code in 
forms-field-styling.xsl

 xsl:if test=normalize-space(@value) = $value
   xsl:attribute name=selectedselected/xsl:attribute
 /xsl:if
We found the @value from esql or sql transform is ok.but when the selection 
list refer this,a extra blank append to the @value,so @value never equal 
$value.
will fire a bugzilla

Best Regards
johnson
- Original Message - 
From: Grzegorz Sikora [EMAIL PROTECTED]
To: Patrick Verboom users@cocoon.apache.org
Sent: Saturday, April 09, 2005 12:33 AM
Subject: Re: dynamci selection list in cform problem


Hello Patrick,
Friday, April 8, 2005, 5:41:07 PM, you wrote:
PV Am I doing something wrong or is it a BUG? Is there another way of 
doing
PV this?

PV We are using the cocoon 2.2 dev.
PV fd:field id=facility_type
PV fd:labelCentre Type:/fd:label
PV fd:datatype base=string/
PV fd:selection-list
PV src=cocoon:/search_CENTRE.CENTRE_TYPE.xml dynamic=true/
PV /fd:field
I'm not sure is it the same bug but in 2.1x there's bug with relative
Cocoon protocol in dynamic selection list. Well, I'm not sure is it really 
bug
but I couldn't make cocoon to use relative protocol in those places.
Try using cocoon:// protocol - it worked in my case.

--
Best regards,
Grzegorz Sikora
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 

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


Re: Creating Java objects in JX templates with JEXL?

2005-04-08 Thread Thorsten Scherler
On Sat, 2005-04-09 at 01:43 +0200, Jochen Kuhnle wrote:
 Hi, is it possible to create Java objects in JX templates using JEXL? 
 Something like jx:set var=src value=${new Object()}/?
 

jx:set var=orderDate value=${java.util.Date()}/

is working fine.

HTH
salu2
-- 
thorsten

Together we stand, divided we fall! 
Hey you (Pink Floyd)


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



Debug view ?

2005-04-08 Thread Sebastien Arbogast
Hi,

When I work in PHP for other projects I often reuse a debug page that
echoes all the available variables from the current environment like
session, request parameters and other superglobal tables. It's very
practical to check the output of a form before writing the script to
treat that data.
Would it be possible to have the same utility page with Cocoon ? With
what technique ? Because I guess it would be possible with XSP but I
heard that XSP was likely to be deprecated in the future... And would
it be possible to make a view of it, like content or prettycontent
for example ?

Thank you in advance.
Regards
-- 
Sebastien ARBOGAST

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



Re: steps install in windows

2005-04-08 Thread Sebastien Arbogast
Hi,

Are you sure you have run a build clean before running build.
Because I sometimes had that kind of error when I ran a build after
havinf interrupted a first one...


On Apr 8, 2005 7:15 PM, Andres Taborda [EMAIL PROTECTED] wrote:
 hello list
 Some can help with steps for install
 cocoon 2.1.6 in windows XP.
 
 Have an error when run build.bat display
 failed with javadoc.
 The variable JAVA_HOME is addition by control-panel
 
 This is the message of error:
 
 prepare-web-app-docs:
 
 javadocs:
 generating javadocs
 javadocs executions
 
 build failded
 
 _
 Do You Yahoo!?
 Información de Estados Unidos y América Latina, en Yahoo! Noticias.
 Visítanos en http://noticias.espanol.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Sebastien ARBOGAST

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