Conditionally load Session Context
Dear Community I'm working with Cocoon 2.1.9 and I'm looking for a way to conditionally load a specific SessionContext. That means that the SessionContext data should only be loaded if necessary. Is there any possibility to do that? For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
AW: Re: XSLT is Dead ?!
Dear Cocoon Community First of all I have to say that I am a Cocoon lover. We are working with this framework since 2005 and we have developed many different types of applications that include: - integration of a legacy system with WebServices - complex e-commerce solutions - graphical rendering of data with fins - or just simple web sites Our experience is that Cocoon is a stable and scalable framework. Furthermore it does a great job concerning the separation of concerns. Now I come the point. What I did not like on Cocoon was the way XSLT was used to render the final output. Therefore I developed XSLTg (an XML template engine) that centres the XML template by supporting full standard XSLT/XPATH 2.0. I took me some time to publish a documentation that is up to date. Now you can find it under http://www.xsltg.com. I am convinced that XSLTg solves many of the problems addressed in the article. Please have a look and let me know what you think about and if http://www.xsltg.com may be able to become a part of Cocoon. Many thanks in advance Raffaele PS: Be warned, my English is not really the best. Improvements are welcome, I will be happy to clarify any obscurities. -Ursprüngliche Nachricht- Von: Derek Hohls [mailto:dho...@csir.co.za] Gesendet: Freitag, 24. April 2009 09:14 An: users@cocoon.apache.org Betreff: [!! SPAM] Re: XSLT is Dead ?! Oh, and on the flip side, there's this article: http://www.onenaught.com/posts/8/xslt-in-server-side-web-frameworks (but I would guess that is preaching to the converted on this mailing list!) On 2009/04/24 at 09:03, in message 49f1805f.5ce9.00d...@csir.co.za, Derek Hohls dho...@csir.co.za wrote: Carsten I had hoped comments like these would be added to the blog :) One other point, you say: The attraction of Cocoon as a separate framework has decreased, but that's definitely not due to XSLT. Why do you say Cocoon's attractiveness is decreasing... should we all be looking around for a new framework to hop onto? (I'm genuinely curious here, not trolling, because the older frameworks like JSP and Struts still seem to be going strong and so I'm wondering what it is about Cocoon that is making it :go out of fashion: ) Thanks Derek On 2009/04/24 at 08:40, in message 49f15ece.5000...@apache.org, Carsten Ziegeler cziege...@apache.org wrote: Derek Hohls wrote: At least, according to this article: http://java.dzone.com/news/death-xslt-web-frameworks Maybe some of the developers, or other power users here, would like to comment at this blog - I see Cocoon also gets a dig in the ribs ... Without commenting on this specific article, my only general comment is that you'll find articles for specific technologies/projects and you'll find as many articles against these (I guess the most famous topic in our area is Maven). Who's is wrong and who's right? Or more important: is there such an easy answer? I definitly doubt this. There isn't such a thing as the one programming language that rules the world or the one framework that makes everyone happy and is the golden hammer. Everyone is free to use what he thinks works best for him. Ok, coming back to the original topic :) Looking at the past 9 years where I've been using Cocoon and done a lot of projects with Cocoon and XSLT, I think it was a great tool by the time. And XSLT helped a lot in getting up to speed (once you managed the high entrance barrier to Cocoon itself). There are a lot of use cases still today for XSLT when it comes to create web sites. It really helps to separate the content from the layout. But in the end that's a matter how you design your application. I see a lot of people using other frameworks than Cocoon and pass the output from that framework to XSLT after the framework has rendered the content. So I don't think that XSLT itself is dead. The attraction of Cocoon as a separate framework has decreased, but that's definitly not due to XSLT. Carsten -- Carsten Ziegeler cziege...@apache.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for
AW: Cocoon Forms 2.1 - One of two fields required
Hi Tobia I use the following construct to do that: After all relevant form fields I add a form field (in my case id=form-validation) that is not displayed in the form but invokes a javascript validation function. The javascript functions gets two parameters: the widget and an ignoreList. The ignoreList contains blank separated field names that will not be tested. Have a look ... Raffaele fd:widgets fd:field id=... required=false ... /fd:field fd:field id=form-validation fd:datatype base=string/ fd:validation fd:javascript return setValidationErrorIfAllCformFieldsAreEmpty(widget, form-validation status); /fd:javascript /fd:validation /fd:field /fd:widgets ft:form-template id=... action=#{$cocoon/continuation/id}.continue method=post ft:widget id=../ ft:widget id=form-validation/ /ft:form-template function setValidationErrorIfAllCformFieldsAreEmpty (widget, ignoreList) { var debug = false; if (debug) { java.lang.System.out.println(--- enter setValidationErrorIfAllCformFieldsAreEmpty() ---); java.lang.System.out.println(widget[ + widget.getName() + ]); } var form = widget.getForm(); var list = form.getChildren(); var elem; var widgetName; while (list.hasNext()) { elem = list.next(); widgetName = elem.getName(); if (debug) { java.lang.System.out.println(processing widget[ + widgetName + ]); } var exp = \\b + widgetName + \\b; var reg = new RegExp(exp, g); if (reg.test(ignoreList)) { if (debug) { java.lang.System.out.println( field is in ignore list // continue); } continue; } if (!elem.isValid()) { if (debug) { java.lang.System.out.println( field is no valid // retrun false); } return false; } if (elem.getValue() != null) { if (debug) { java.lang.System.out.println( field has a value // retrun true); } return true; } } if (debug) { java.lang.System.out.println( processing finished // all fields empty // set validation error // return false); } var valError = new org.apache.cocoon.forms.validation.ValidationError(allFieldsAreEmpty); widget.setValidationError(valError); return false; } -Ursprüngliche Nachricht- Von: Tobia Conforto [mailto:tobia.confo...@gmail.com] Gesendet: Montag, 16. Februar 2009 18:23 An: users@cocoon.apache.org Betreff: Cocoon Forms 2.1 - One of two fields required Hello In Cocoon 2.1, Forms, how do I require the user to fill at least one out of two (or more) fields? For example, I might have the 'phone' and 'mobile' fields. I want the user to fill at least one of them, possibly both, and I don't want the form to validate if they're both empty. I've tried to add the validator to one or the other, but it seems the wrong place to put it (Cocoon forms have a strict hierarchical structure) and in fact the behaviour with ajax and browser-update is buggy. I've tried to add the validator to the form widget itself, but then the error message is not picked up by the jx template, and the user is stuck without knowing what is wrong. Where should I put such a validator? Tobia - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
AW: Re: AW: More control over Cform Date Conversion
is NOT ignored! // -- function isDate(val,format) { var date=getDateFromFormat(val,format); if (date==0) { return false; } return true; } Hope this helps ... Raffaele -Ursprüngliche Nachricht- Von: Edward Elhauge [mailto:e...@uncanny.net] Gesendet: Donnerstag, 5. Februar 2009 04:50 An: users@cocoon.apache.org Betreff: [?? Probable Spam] Re: AW: More control over Cform Date Conversion Thanks, A good trick. Almost does what I want. Problem below. Well spoken Merico Raffaele raffaele.mer...@less.ch wrote: Hi Edward To access the entered value in a CForm I use the following construct based on a personal server side javascript function. fd:field id=3Dform_bis required=3Dfalse fd:datatype base=3Ddate ...=09 /fd:datatype fd:validation fd:javascript return checkFormInputDate(widget); /fd:javascript /fd:validation /fd:field function checkFormInputDate (widget, regExpValidation, regExpValidationError) { =09 var enteredValue =3D new String(cocoon.request.getParameter(widget.getRequestParameterName())); ... } Let's say you have a date like 0/0/0, you detect its bogousity in your fd:validation and display an error message. Meanwhile your date field just became 11/30/0002, because the conversion went on and reinitializes the field. The user looks casually (or is fixing a bunch of other RED EXCLAMATION MARKS above) and resubmits the form. Now the date field is validated, but not what the user typed in the first time, and not what they would have fixed it to. For this to work I need to keep the control of the field in the user's hands and not have the system make a wild guess. Thanks for the trick though, Ed Elhauge Raffaele -Urspr=FCngliche Nachricht- Von: Edward Elhauge [mailto:e...@uncanny.net]=20 Gesendet: Mittwoch, 4. Februar 2009 02:05 An: users@cocoon.apache.org Betreff: [?? Probable Spam] More control over Cform Date Conversion Hi, I've run into a problem where my users want more detailed control over Date field validation. In the version that we're running (2.1.8) we don't have a lenient attribute for base=3Ddate widgets. So the user can type in 33/60/9z as a date, which get converted into 10/30/2011. Not what was expected. What I'd like would be to a small: fd:validation fd:javascript ... /fd:javascript /fd:validation section to throw an error in those cases. Unfortunately this.value inside that javascript callback is already in a Date format. My question is: How do I get access to the users original text input within the fd:validation section? If there is no way to get access to the raw text, do I need to write my own validator to replace FormattingDateConvertor ? -- Edward Elhauge e...@uncanny.net The right dose differentiates a poison and a remedy. -- Paracelsus (1493 - 1541) - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
AW: More control over Cform Date Conversion
Hi Edward To access the entered value in a CForm I use the following construct based on a personal server side javascript function. fd:field id=form_bis required=false fd:datatype base=date ... /fd:datatype fd:validation fd:javascript return checkFormInputDate(widget); /fd:javascript /fd:validation /fd:field function checkFormInputDate (widget, regExpValidation, regExpValidationError) { var enteredValue = new String(cocoon.request.getParameter(widget.getRequestParameterName())); ... } Raffaele -Ursprüngliche Nachricht- Von: Edward Elhauge [mailto:e...@uncanny.net] Gesendet: Mittwoch, 4. Februar 2009 02:05 An: users@cocoon.apache.org Betreff: [?? Probable Spam] More control over Cform Date Conversion Hi, I've run into a problem where my users want more detailed control over Date field validation. In the version that we're running (2.1.8) we don't have a lenient attribute for base=date widgets. So the user can type in 33/60/9z as a date, which get converted into 10/30/2011. Not what was expected. What I'd like would be to a small: fd:validation fd:javascript ... /fd:javascript /fd:validation section to throw an error in those cases. Unfortunately this.value inside that javascript callback is already in a Date format. My question is: How do I get access to the users original text input within the fd:validation section? If there is no way to get access to the raw text, do I need to write my own validator to replace FormattingDateConvertor ? -- Edward Elhauge e...@uncanny.net The right dose differentiates a poison and a remedy. -- Paracelsus (1493 - 1541) - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Cluster Cocoon 2.1.9 Applications
Dear Community We have a several Cocoon applications consisting of: - Cocoon 2.1.9 - Hibernate - MySql - Tomcat and running on dedicated Linux servers. In order to get a perfect failover situation we would like to setup a cluster. Tomcat is not a must and could be replaced with Jboss, since Jboss seems to support clustering. But we don't have the experience if Cocoon 2.1.9 applications can be run with Jboss!? Now we are looking for people that have the experience and the know how to setup such a cluster. Any experience, any advice or interest to setup such a cluster would be much appreciated. For your feedback many thanks in advance, Raffaele
Cocoon GetTogether 2008
Dear Community Are there any news about the Cocoon GetTogether 2008? Thanks in advance Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: SendMail
Hi Peter I am using sendmail as cocoon action in the following way and it works fine. My experience is that it is important to have valid parameter values. map:match type=wildcard pattern=sendmail/* map:act type=sendmail map:parameter name=smtp-host value={global:smtpHost-{1}}/ map:parameter name=smtp-user value={global:smtpUser-{1}}/ map:parameter name=smtp-password value={global:smtpPwd-{1}}/ map:parameter name=from value={request-param:from}/ map:parameter name=to value={request-param:to}/ !--map:parameter name=cc value={request-param:email}/-- !--map:parameter name=bcc value=[EMAIL PROTECTED]/-- map:parameter name=subject value={request-param:subject}/ !--map:parameter name=body value=body/-- map:parameter name=src value=cocoon:/processMailTpl/ !--map:parameter name=srcMimeType value={request-param:srcMimeType}/-- !--map:parameter name=charset value={request-param:charset}/-- !--map:parameter name=attachments value=uploaded_file1 context://welcome.xml/-- map:redirect-to uri={request-param:confirmTplPath}/ /map:act map:redirect-to uri={request-param:errorTplPath}/ /map:match map:match type=wildcard pattern=processMailTpl map:read type=resource mime-type=text/plain src={request-param:mailTplPath}/ /map:match Please also note that you have to include the following block in your local.blocks.properties for a cocoon build that includes sendmail. - include.block.asciiart=true - include.block.mail=true Hope this helps ... Raffaele -Ursprüngliche Nachricht- Von: Peter Sparkes [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. Oktober 2007 07:53 An: users@cocoon.apache.org Betreff: SendMail Hi I have put the Sun mail.jar and activation.jar in my WEB-INF/lib and removed removed geronimo-spec-javamail-*.jar and geronimo-spec-activation-*.jar from WEB-INF/lib. However I still get the error message Could not connect to SMTP host: localhost, port: 25 I tried in addition removing geronimo-spec-jms-1.1-rc3.jar and geronimo-spec-jta-1.0.1B-rc3.jar from WEB-INF/lib, but then cocoon would not restart. I am using Cocoon 2.1.10 with Tomcat 5.5 Please How do I get SendMail to work Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Peter Sparkes [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. Oktober 2007 07:53 An: users@cocoon.apache.org Betreff: SendMail Hi I have put the Sun mail.jar and activation.jar in my WEB-INF/lib and removed removed geronimo-spec-javamail-*.jar and geronimo-spec-activation-*.jar from WEB-INF/lib. However I still get the error message Could not connect to SMTP host: localhost, port: 25 I tried in addition removing geronimo-spec-jms-1.1-rc3.jar and geronimo-spec-jta-1.0.1B-rc3.jar from WEB-INF/lib, but then cocoon would not restart. I am using Cocoon 2.1.10 with Tomcat 5.5 Please How do I get SendMail to work Thanks Peter - 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]
AW: Java for generating suggestion-list
Hi Gabriel I do not know if it's possible to integrate a java class directly. But, we also work with hibernate and we usually solve this kind of problem in the following way: fd:field id=anrede required=true fd:datatype base=string/ fd:selection-list src=cocoon:/util/xsl/convertDbCode2FdSelectionList.xml?srcUri=cocoon://db/a ddress/getCodes.xmlamp;type=anrede/ /fd:field Hope this helps ... Raffaele _ Von: Gabriel Gruber [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. Oktober 2007 08:28 An: users@cocoon.apache.org Betreff: Java for generating suggestion-list Hello! I was just wondering, if it is possible to use java instead of javascript to generate a suggestion-list for a cforms widget. this java aims to query a database (via hibernate) and should return a list of results. something like this... fd:field id=person fd:datatype base=string/ fd:suggestion-list type=java src=com.mycompany.SuggestionListHandler/ /fd:field any ideas? from looking in the api i couldn't find a way for this to work. gabriel __ Mag. Gabriel Gruber Senior Consultant mailto:[EMAIL PROTECTED] http://www.workflow.at
Send CForm Data by EMail
Dear Community I have a CForm and I would like to send the user input to a given email address. From my point of view there are three possibilities to do it: - Coocon Action - Cocoon Logicsheet - by using Java within the Server-side Flow-Script Which is the best way to do it in Cocoon 2.1.9? For your support many thanks in advance. Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [GT2007] Request for papers
Dear Community, caro Luca, Thanks for your short topic list. I agree with you, less is more ... and, let us found the very important things to speak at the GT2007. From my point of view, Cocoon 2.2 and how to get there from 2.1.x would be a very important input at the current state of the Cocoon development. In the last 4 years, we have developed many applications based on Cocoon 2.1 (including SOA). And we are very happy on what this great XML framework did and does for us. A part the presentation layer! Which we have substituted with an own, cocoon independent, XSLT transformation step (that works also nice with CForms). But with 2.2 everything seams to be different. So, at the current state, questions as what is Cocoon 2.2? and how we migrate 2.1.x applications? are very important for us. If the GT2007 could also focus on this aspect we would very appreciate it. What do you think about it? Raffaele -Ursprüngliche Nachricht- Von: Luca Morandini [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 10. August 2007 13:57 An: [EMAIL PROTECTED] Cc: users@cocoon.apache.org Betreff: Re: [GT2007] Request for papers Andrew Savory wrote: Hmm, the list of ideas somehow got eaten by the mail daemons, so here's the suggestions from last year. Anyone care to add anything? Since the scenario has changed a bit since 2006, I'd rather like to hear something on these topics: 1) 2.2: what's in it for me ? 2) Shall we move Cocoon from service-oriented to resource-oriented to better support RIA/Ajax/Web 2.0/insert your own bizzwords ? 3) CForms vs Apache-Wicket 4) Some success stories on TDD (and the best tools for the job). Regards, Luca Morandini www.lucamorandini.it - 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]
Rome 2007
Dear Community I am still missing some details (date, location, agenda) regarding the Cocoon GetTogether 2007 in Rome. Did I missed them? Can anybody provide me with any further status information? Many thanks in advance. Best regards, Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [GT2007] [VOTE] Conference location + time
Location: B) Rome C) London Time: A) or B) -Ursprüngliche Nachricht- Von: Arje Cahn [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 11. April 2007 15:08 An: [EMAIL PROTECTED]; users@cocoon.apache.org Betreff: [GT2007] [VOTE] Conference location + time Hi all, Please cast your votes on both the location and the time for this year's Cocoon GetTogether conference: A) The Netherlands, Amsterdam B) Italy, Rome / Milano C) England, London / Norwich When: A) Late september B) Beginning of October (between the holidays season and ApacheCon) C) End of October Thanks! Apart from all that, you should come over and visit Amsterdam anyway from May 1-4 at the ApacheCon Europe! www.apachecon.com Kind regards, Arjé Cahn Hippo Oosteinde 11 1017WT Amsterdam The Netherlands Tel +31 (0)20 5224466 [EMAIL PROTECTED] / [EMAIL PROTECTED] -- Hippo http://www.hippo.nl Hippo CMS community http://www.hippocms.org My weblog http://blogs.hippo.nl/arje -- ApacheCon Europe 2007 Gold Sponsor Join us from May 2-4 in Amsterdam! -- - 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]
get fb:value path=/
Dear Community I'm looking for a way how to get the binding path-attribute information of a widget (fb:value path=/) starting from an object of the class org.apache.cocoon.forms.formmodel.Field. For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: get fb:value path=/
Hi Marc, in flowscript ... thx Raffaele -Ursprüngliche Nachricht- Von: Mark Lundquist [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 15. Dezember 2006 16:43 An: users@cocoon.apache.org Betreff: Re: get fb:value path=/ On Dec 15, 2006, at 12:07 AM, Merico Raffaele wrote: I'm looking for a way how to get the binding path-attribute information of a widget (fb:value path=/) starting from an object of the class org.apache.cocoon.forms.formmodel.Field. get it... in what context? In flowscript, in the JXT, or what? -ml- - 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]
NAMESPACE PREFIX!!!!!!!!!!!!!!!!!!!!!!!!!!
Dear Community I'm woriking with cocoon 2.1.9. When I was googling around for a solution regarding the usage of namespace-prefix in the form binding I found an email of Suzan Foster on the web saying to set the namespace-prefixes in the cocoon.xconf to true (Google for Cocoon forms binding and XML namespaces). Since I changed this parameter value from false to true, now I can use the namespace-prefix in XPATH (of the fb:value-path). But on the same time now my console is full of the following message - NAMESPACE PREFIX!! Is there anything wrong with what I did? Can I run cocoon with parameter name=namespace-prefixes value=true/ For your support many thank in advance ... Raffaele PS: 1) In this case I cannot avoid using the namespace-prefix declaration in the fb:value path=/. 2) I generally use Saxon for my XSLT transformations (config of my sitemap). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Cform binding
Hi Mark Many thanks for your support. I want to come back and explain to you my need. I have a cocoon form that will be bind to XML values coming from a web service. To bind the right data in the XML stream I need an ID passed by the request. So I can do something like the following ... fb:context path=/data//[EMAIL PROTECTED] = /data/h:request/h:requestParameters/h:[EMAIL PROTECTED]'pkId']/h:value] fb:value id=planTyp path=primat/ /fb:context NB: personenkreis/ exists here more than one time. Since actually $cocoon is not available I solved the problem by aggregating the cocoon request to the XML response of my web service. Hope this explains my need ... Raffaele _ Von: Mark Lundquist [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 1. Dezember 2006 19:18 An: users@cocoon.apache.org Betreff: Re: Cform binding On Dec 1, 2006, at 9:30 AM, Gabriele Columbro wrote: Not sure about JXPath but I suppose it should be possible in the exact same way it is possible in the JXTemplate (not sure though, so better try it) more or less like: ${cocoon.request.getParameter('foo') } If this were supported (see below), it would not be like JXT syntax! :-) JXPath [1] is an interpretation of Xpath [2] for Java object graphs. With some funny quirks [3]. So in a CForms binding, I guess (IIRC what you're trying to do) the JXPath would have to be something like this: /foo/[EMAIL PROTECTED] = $cocoon/request/parameter/beer] However, I don't see anything in the source code that suggests we are injecting the cocoon FOM object into the JXPath context. That could easily be done, I guess. Using FOM objects to dynamically drive the forms binding does seem exotic, though. Care to share some more details about your use case for this? I'd be interested to hear... Anyway, think you'll have to do this part of the load/save by hand, in flowscript. Assuming your binding has other things to do besides the part that depends on FOM objects, I would suggest using your load/save normally using the binding framework for the normal parts, then doing the dynamic binding parts by hand in flowscript. You could even still use JXPath for this (by hand), building your path expression using string concatenation. HTH, -ml- [1] http://jakarta.apache.org/commons/jxpath [2] http://www.w3.org/TR/xpath [3] http://jakarta.apache.org/commons/jxpath/users-guide.html#Attributes
Cform binding
Dear Community I have a cform that binds with an XML document. In the fb file I would like to define an XPATH that contains values of given request parameters. Is there any possibility to access the request object with JXPath. I so, how does the syntax would look like. Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SetterAction (Session)
Dear Community In the API java doc of cocoon 2.1.9 there is a class org.apache.cocoon.acting.SetterAction. I tried to use it in various ways but I never got the usage that I need. And that is: a) I would like to read a part of the URL (i.e. skin name, not as request parameter), b) store this information in the session and c) reuse the session value with the sitemap input modules {session:...} or {session-attr:...} I would very appreciate if anybody could tell me if the above described SetterAction/InputModule is the right mix of functionality or if there is another way to achieve my goal. For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FYI: fins and 2.1.9 OK
FYI ... prima vista fins seems to work with cocoon 2.1.9 Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: binding XML (namespace problem)
Hi Suzan Many thanks for the tip. I temporally solved the problem by avoiding the namespace: path=/data//versicherter. I could migrate to cocoon 2.1.9 if this version solves the problem definitely. Do you know anything about this possibility? Thx ... Raffaele -Ursprüngliche Nachricht- Von: Suzan Foster [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 19. Oktober 2006 16:01 An: users@cocoon.apache.org Betreff: Re: AW: binding XML (namespace problem) Hi Raffaele, There are still issues with bindings in the 2.1.8 release with regards to namespaces. Try omitting the namespace declaration for soap in your binding definition. Merico Raffaele schreef: Hi Jeroen Thanks for your suggestion. But the element gemeldeterLohn is not part of the soap-namespace. It stands as follows in the XML: gemeldeterLohn/gemeldeterLohn Thx ... Raffaele -Ursprüngliche Nachricht- Von: Jeroen Reijn [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 19. Oktober 2006 13:53 An: users@cocoon.apache.org Betreff: RE: binding XML (namespace problem) Hi Merico, the element gemeldeterLohn in your binding file, should it be in the soap namespace? If so you need to define your fb:value as fb:value id=lohn path=soap:gemeldeterLohn/ Regards, Jeroen Reijn -Original Message- From: Merico Raffaele [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 19, 2006 1:25 PM Posted To: Cocoon User List Conversation: binding XML (namespace problem) Subject: binding XML (namespace problem) Dear Community I'm working with cocoon 2.1.8 and I'm fighting with the namespace declaration in the fb:context that looks as follows: fb:context path=/data/soap:Envelope//versicherter xmlns:soap=http://www.w3.org/2003/05/soap-envelope; fb:value id=lohn path=gemeldeterLohn/ /fb:context If I remove the soap-prefix (also in the XML data) it works fine. Can anybody tell me what's wrong with this declaration of the namespace. For your support many thanks in advance ... Raffaele - 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] - 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]
fins and cocoon 2.1.9
Dear Community I'm planning to migrate from cocoon 2.1.8 to 2.1.9. The application running with 2.1.8 makes a lot use of fins. Before I do it I would like to ask the following questions: 1) Does fins 0.1.2 works with cocoon 2.1.9? 2) Are there any alternatives to fins? Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
binding XML (namespace problem)
Dear Community I'm working with cocoon 2.1.8 and I'm fighting with the namespace declaration in the fb:context that looks as follows: fb:context path=/data/soap:Envelope//versicherter xmlns:soap=http://www.w3.org/2003/05/soap-envelope; fb:value id=lohn path=gemeldeterLohn/ /fb:context If I remove the soap-prefix (also in the XML data) it works fine. Can anybody tell me what's wrong with this declaration of the namespace. For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: binding XML (namespace problem)
Hi Jeroen Thanks for your suggestion. But the element gemeldeterLohn is not part of the soap-namespace. It stands as follows in the XML: gemeldeterLohn/gemeldeterLohn Thx ... Raffaele -Ursprüngliche Nachricht- Von: Jeroen Reijn [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 19. Oktober 2006 13:53 An: users@cocoon.apache.org Betreff: RE: binding XML (namespace problem) Hi Merico, the element gemeldeterLohn in your binding file, should it be in the soap namespace? If so you need to define your fb:value as fb:value id=lohn path=soap:gemeldeterLohn/ Regards, Jeroen Reijn -Original Message- From: Merico Raffaele [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 19, 2006 1:25 PM Posted To: Cocoon User List Conversation: binding XML (namespace problem) Subject: binding XML (namespace problem) Dear Community I'm working with cocoon 2.1.8 and I'm fighting with the namespace declaration in the fb:context that looks as follows: fb:context path=/data/soap:Envelope//versicherter xmlns:soap=http://www.w3.org/2003/05/soap-envelope; fb:value id=lohn path=gemeldeterLohn/ /fb:context If I remove the soap-prefix (also in the XML data) it works fine. Can anybody tell me what's wrong with this declaration of the namespace. For your support many thanks in advance ... Raffaele - 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]
redirect-to problem
Dear Community I have a system running with Cocoon 2.1.7. In the sitemap under webapps/V2D/appl I do a map:redirect-to uri=/auth/logout/. Now it seems that this redirect is expanded with the IP address of the server (i.e. http://999.999.999.999/auth/logout). But since this Cocoon application is protected by a web entry system, this request cannot be resolved. The question is now, how can I avoid the usage of the IP address in the map:redirect-to. For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: redirect-to problem
Thanks Luca, but I really need a client-side redirect to the relative URI /auth/logout. Does it help if I would use a Flow script to do the redirect! map:call function=redirectToUri map:parameter name=uri value=/auth/logout/ /map:call function redirectToUri () { var debug = false; if (debug) { java.lang.System.out.println(\n--- enter redirectToUri() ---); } var uri = cocoon.parameters.uri; if (debug) { java.lang.System.out.println(uri[ + uri + ]); } return cocoon.redirectTo(uri, true); } Raffaele -Ursprüngliche Nachricht- Von: Luca Morandini [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 6. Oktober 2006 08:35 An: users@cocoon.apache.org Betreff: Re: redirect-to problem Merico Raffaele wrote: Dear Community I have a system running with Cocoon 2.1.7. In the sitemap under webapps/V2D/appl I do a map:redirect-to uri=/auth/logout/. Now it seems that this redirect is expanded with the IP address of the server (i.e. http://999.999.999.999/auth/logout). But since this Cocoon application is protected by a web entry system, this request cannot be resolved. The question is now, how can I avoid the usage of the IP address in the map:redirect-to. You are doing a client-side redirect, hence Cocoon prefixes the URI with the server's address. If the page you want the user redirected to is in the Cocoon app, you can prefix the cocoon: protocol and have a server-side redirect, like in: map:match pattern=folder/page1.html map:redirect-to uri=cocoon:/folder/page2.html/ /map:match Regards, Luca Morandini www.lucamorandini.it - 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]
AW: AW: redirect-to problem
This does not really solve the problem, since the server name that I get with {request:serverName} is the same IP address that Cocoon uses to prefix the redirect URI. And this IP address is protected by a central WebEntrySystem. Raffaele but I really need a client-side redirect to the relative URI /auth/logout. Does it help if I would use a Flow script to do the redirect! I'd rather use an input module to build the URI, like in: map:redirect-to uri=http://{request:serverName}:{request:serverPort}/{global:app- root}/foo.html/ (this is just to give you the idea). There are inputmodules that parse and let you use portions of the request URI in your sitemap, just look at the samples. Regards, Luca Morandini www.lucamorandini.it - 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]
AW: Re: AW: redirect-to problem
Thanks Ard, http-equiv=refresh does what I need ... Raffaele but I really need a client-side redirect to the relative URI /auth/logout. Does it help if I would use a Flow script to do the redirect! quick and dirty solurion that always works: send an html page to the client which only contains a meta-refresh. I know, it is not the most elegant way, but really a solid solution, also working after mod_cache/squid/company proxies: html meta http-equiv=refresh content=0;url=/foo/bar/ /html? Ard I'd rather use an input module to build the URI, like in: map:redirect-to uri=http://{request:serverName}:{request:serverPort}/{global: app-root}/foo.html/ (this is just to give you the idea). There are inputmodules that parse and let you use portions of the request URI in your sitemap, just look at the samples. Regards, Luca Morandini www.lucamorandini.it - 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]
SetterAction
Dear Community I'm using cocoon 2.1.8 and I'm looking for an example how to use the SetterAction. I would like to the set a value either in the session or in the current request. For your support many thanks in advance Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JXTemplate and xmlize
Ciao Nacho Use the following code, it should work cocoon with 2.1.x: In flowscript: var xmlizableResult = new org.apache.cocoon.xml.StringXMLizable(xmlString); cocoon.sendPage(uri, {xmlizable: xmlizableResult}); In JX: jx:template xmlns:jx=http://apache.org/cocoon/templates/jx/1.0; jx:out value=${xmlizable}/ /jx:template Hope this helps ... Raffaele -Ursprüngliche Nachricht- Von: Nacho Jimenez [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 1. Februar 2006 16:36 An: users@cocoon.apache.org Betreff: JXTemplate and xmlize Hello! I'm trying to use the xmlize feature of a jx:eval / in a JXTemplate, but cocoon 2.1.X does not handle it, only cocoon 2.2 does.. ¿Someone knows a workarround to this problem? I'm in a bit of a tight schedule, and it's a full blown project, so I'd rather not migrate to dev-2.2. In flowscript: var textWithHTML=pHello bWorld/b!/p cocoon.SendPage(myJxPage,{text: textWithHTML}); ¿Some way of getting the formatted text aout of there? Thanks - 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]
AW: how to run two cocoons in a tomcat
Hi Johnson Just copy/install the cocoon/build/webapp into the tomcat/webapps directory with a different name. For example: - tomcat/webapps/cocoon-appl-1 - tomcat/webapps/cocoon-appl-2 Instead of the name cocoon-appl-n you can choose what ever you need. Hope this helps Raffaele I want to run two cocoons in a tomcat, how to set it. Best Regards johnson - 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]
AW: how to run two cocoons in a tomcat
I did not change anything in web.xml. Having for example the following two cocoon instances appl1 and appl2 installed on my system, I can invoke them by: - http://localhost:8080/appl1 - http://localhost:8080/appl2 Raffaele tks, But they the same name in web.xml, is it all right? Best Regards johnson - Original Message - From: Merico Raffaele [EMAIL PROTECTED] To: users@cocoon.apache.org Sent: Wednesday, January 18, 2006 2:43 PM Subject: AW: how to run two cocoons in a tomcat Hi Johnson Just copy/install the cocoon/build/webapp into the tomcat/webapps directory with a different name. For example: - tomcat/webapps/cocoon-appl-1 - tomcat/webapps/cocoon-appl-2 Instead of the name cocoon-appl-n you can choose what ever you need. Hope this helps Raffaele I want to run two cocoons in a tomcat, how to set it. Best Regards johnson - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Forms/Flow: Control Flow Behind form.showForm()
Ciao Patrick The form.showForm() function is located in the Form.js file in the lib/cocoon-forms-block.jar. Cheers ... Raffaele -Ursprüngliche Nachricht- Von: Patrick Refondini [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 21. Dezember 2005 08:09 An: users@cocoon.apache.org Betreff: Forms/Flow: Control Flow Behind form.showForm() In the context of Cocoon Forms using Flowscript: I am looking for hints where to look (doc, source code) to understand how the decision for the flow control to block to form.showForm() or continue is made. Patrick - 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]
AW: ö - ö
Ciao Bertrand, dear community ...A html serialized page contains the following link: pa href=genXmlRequest?para=öLINK/a/p I think the ö must be written URLencoded, as it's in an URL: a href=genXmlRequest?para=%F6 Yes that would work (if I literally write %F6 in the URI). But, I can not do that for dynamic data. Since my output is rendered in a XSLT script (with SaxonB 8.6.1) I tried to convert URI strings with fn:escape-html-uri(). But this has no effect. After the HTML serialization I always get the utf-8 encoding '%C3%B6' for the 'ö'. And this is not handled correctly by the subsequent map:generate type=request/. Do you have any further advices ... many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: CForm/Js Problem with 2.1.8
Ciao Antonio, dear Cocoon-Devs Make sure you are using the right xml-apis.jar. I am using that one distributed with cocoon-2.1.8: WEB-INF/lib/xml-apis-1.3.02.jar Please note the solution (so I hope): To find out which xml-apis lib is installed I did a find in the ./webapps: $ find . -name xml-apis* -print ./V2D/WEB-INF/lib/xml-apis-1.3.02.jar ./V2I63/WEB-INF/lib/xml-apis.jar ./V2I64/WEB-INF/lib/xml-apis.jar ./V2D contains the cocoon webapp. The others are NOT cocoon webapps using may be an older xml-apis.jar. I removed this webapps temporarily but the problem did not disappear. Closed to the desperation I remembered myself that the saxon.jar can cause some problems if it's not at the end of the lib-list. So I renamed it to zsaxon.jar. And ... uhhh the problem disappeared. It's a little bit hokus pokus, but it seems to work. Since I do not know the internals it would be very reassuringly if somebody of the Cocoon-Devs could give us an short explanation respectively a confirmation that this is OK so. Thanks in advance ... Raffaele Dear community I have installed cocoon-2.1.8 under tomcat-5.5.9 and I got the following error: java.lang.IllegalArgumentException: Unknown type of result: class javax.xml.transform.dom.DOMResult Cocoon stacktrace[hide] Error calling flowscript function showForm resource://org/apache/cocoon/forms/flow/javascript/Form.js - 47:-1 file:/C:/Programme/Tomcat/Tomcat- 5.5.9/webapps/V2D/appl/util/js/CformUtil.js - 6:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/sitemap.xmap - 355:32 map:call file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/sitemap.xmap - 896:66 map:mount What can I do? Thanks in advance ... Raffaele - 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]
ö - ö
Dear community A html serialized page contains the following link: pa href=genXmlRequest?para=öLINK/a/p The pipeline of genXmlRequest looks like follows: map:match type=wildcard pattern=genXmlRequest map:generate type=request/ map:serialize type=xml/ /map:match But the result in the h:request/ looks as follows. h:parameter name=para h:valueö/h:value /h:parameter It seems that the utf-8 encoded char 'ö' = '%C3%B6' is not handled correctly by request generator. Is this a bug or can I do anything against it? Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CForm/Js Problem with 2.1.8
Dear community I have installed cocoon-2.1.8 under tomcat-5.5.9 and I got the following error: java.lang.IllegalArgumentException: Unknown type of result: class javax.xml.transform.dom.DOMResult Cocoon stacktrace[hide] Error calling flowscript function showForm resource://org/apache/cocoon/forms/flow/javascript/Form.js - 47:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/util/js/CformUtil.js - 6:-1 file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/appl/sitemap.xmap - 355:32 map:call file:/C:/Programme/Tomcat/Tomcat-5.5.9/webapps/V2D/sitemap.xmap - 896:66 map:mount What can I do? Thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Newbie to Cocoon
Hi Anshuk Since an XSL file is also an XML file it possible to do it with Cocoon. But it's more the job of a XSLT processor than of Cocoon. Cocoon is on top of it. Cocoon is the control centre to control an n-step XML transformation from the sourceing (generation) to the final result (serialization). Between these two steps you can transform your XML data as may times as you need it, relaying on given or on your own functionality. But if you are just looking for a XSLT processor, you do not need Cocoon. I can recommend you 2 XSLT processors: - http://www.saxonica.com/ - http://xml.apache.org/xalan-j/ Saxon (also available as open source version) is a great product. And Michael Kay, the author of Saxon, does a great job. Please also note the XSL list at [EMAIL PROTECTED] Hope this helps Raffaele -Ursprüngliche Nachricht- Von: anshuk pal chaudhuri [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 10. Dezember 2005 06:15 An: users@cocoon.apache.org Betreff: Newbie to Cocoon Hi, I was going through the Cocoon documentation.I m completely new to it. What I am really interested is in transformation. Say I am doin a kind of mapping from XML to XML. What I am trying to know is it possible to generate the XSL File using Cocoon? I am still not exactly sure what cocoon does,but just askin!! Anshuk __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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]
AW: cform date validation
Ciao Derek, ciao Gunter Thanks a lot for your hints. I - nearly - solved the problem with fd:javascript/ based on the javascript library of http://www.mattkruse.com/javascript/date/. The javascript code refered in the fd:javascript/ looks very simple: --- var enteredValue = cocoon.request.get(widget.getRequestParameterName()); var trimedValue = enteredValue.replaceAll(\\s, ); if (!isDate(trimedValue, d.M.)) { var valError = new org.apache.cocoon.forms.validation.ValidationError(invalidDate); widget.setValidationError(valError); return false; } --- The only unsolved problem is that a wrong date input (i.e. 32.12.05) is auto-converted and redisplay as 01.01.06. As this point the users sees an error message with a right date. But he does not see what he entered before. I see, if not differently possible, the possibility to display the original entered date as part of the error message. Not a very elegant solution. What I am looking for is a possibility to set the originally entered date and to be redisplayed as the user typed it in. Any ideas ... Raffaele PS: An alternative (not really) could be the use of the datatype string instead of the datatype date. But in this case I see some problems in the conversion/presentation of given form data (coming from the source) formatted as -MM-dd and therefore not conforming to the locale presentation. Another insight from another mailing list: http://lists.gnu.org/archive/html/classpath/2004-10/msg00090.html You could also implement a pattern match range check on your input field, using cform functionality, without resorting to JS. see: http://localhost:8080/cocoon/docs/userdocs/forms/validation.html ( fd:range, or fd:regexp or even fd:javascript) I would think there must be on-line examples of date expressions? [EMAIL PROTECTED] 2005/12/07 11:18 AM have the same issue with cocoon 2.1.4 and apparrently the java.util.Date class accepts this (as far as I know) so the only thing that you can do (as what I did) is to implement a clientside date validation; you can find plenty examples on the net but if you want I can easily drop one here Gunter Merico Raffaele [EMAIL PROTECTED] 07/12/2005 10:13 Please respond to users@cocoon.apache.org To users@cocoon.apache.org cc Subject cform date validation Dear community I have a strange effect with cform date fields. Values like 32.12.2005 or 29.2.2005 are automatically corrected to 1.1.2006 or 1.3.2005 without any validation error. What can I do to let the cform validation service declare such dates as incorrect? For your support many thanks in advance ... Raffaele -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - 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]
cform date validation
Dear community I have a strange effect with cform date fields. Values like 32.12.2005 or 29.2.2005 are automatically corrected to 1.1.2006 or 1.3.2005 without any validation error. What can I do to let the cform validation service declare such dates as incorrect? For your support many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reset value of request parameters
Dear community I use a CForm to get the input for an external service invoked as WebServiceProxy-Pipeline after the form validation. The simple flow script looks like follows: var form = new Form(cocoon.request.get(fdPath)); form.showForm(showForm); cocoon.sendPage(cocoon.request.get(action)); Since the WebServiceProxy reuses the request parameters submitted by the form, the invoked WebService receives the data as entered respectively locale formatted. But the WebService aspects another format. Is there any possibility to reset the value of a request parameter in the cocoon.request object? Or do you see any other solutions? Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [SPAM] Re: AW: xmlize in jx and 'NOT_FOUND is not a function'
Ciao Leszek Instead of the solution below with the 'stringToSAX' JavaScript function I have solved the xmlize problem with the following statement in the JavaScript. var xmlizableWspResult = new org.apache.cocoon.xml.StringXMLizable(xmlString); The jx template now just contains a simple jx:out value=${xmlizableWspResult}/ More elegant, isn't it ... many thanks for your support ... Raffaele even more elegant in trunk: jx:out value=${xmlString} xmlize=true/ Yes with Cocoon 2.2. But I am using Cocoon 2.1.7. Cheers Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jx syntax question
Hi Cocooners Does anybody knows the right syntax to the following JavaScript function call within a JXTemplate. jx:set var=ignored ${cocoon.session.getAttribute(stringToSAX)( value, cocoon.consumer, ignoreRoot )} /jx:set Thx ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 44 723 12 22 Dir: +41 44 723 92 45 Fax: +41 44 723 12 23 mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: xmlize in jx and 'NOT_FOUND is not a function'
Hi Upayavira Instead of the solution below with the 'stringToSAX' JavaScript function I have solved the xmlize problem with the following statement in the JavaScript. var xmlizableWspResult = new org.apache.cocoon.xml.StringXMLizable(xmlString); The jx template now just contains a simple jx:out value=${xmlizableWspResult}/ More elegant, isn't it ... many thanks for your support ... Raffaele -Ursprüngliche Nachricht- Von: Upayavira [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 10. November 2005 09:55 An: users@cocoon.apache.org Betreff: Re: xmlize in jx and 'NOT_FOUND is not a function' Merico Raffaele wrote: Dear community Im using cocoon 2.1.7 and I have implemented the xmlize functionality according to http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108680748429717w=2. But now I get the following error 'NOT_FOUND is not a function'. Any help would be very appreciated ... many thanks in advance ... Raffaele A guess, could you try: jx:macro name=xmlize jx:parameter name=value/ jx:parameter name=ignoreRoot default=false/ jx:set var=ignored value=${cocoon.session.getAttribute('stringToSAX')( value, cocoon.consumer, ignoreRoot )}/ /jx:macro as your macro. Something did change, to do with accessing session/request I think, just not sure when. I'm also not sure whether this is valid syntax. :-( Regards, Upayavira - 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]
xmlize in jx and 'NOT_FOUND is not a function'
Dear community Im using cocoon 2.1.7 and I have implemented the xmlize functionality according to http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108680748429717w=2. But now I get the following error 'NOT_FOUND is not a function'. Any help would be very appreciated ... many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: using XML from the generation in the sitemap
Hi cocooners Thanks a lot for your interest for my problem. To make it hopefully finally clear what I want to do can be seen in the following pileline. Have a look at the {XPATH-expre} that refers a XML content generated by the wsporxy. map:match type=wildcard pattern=genXmlV2Wsp** map:generate type=wsproxy src={global:v2Wsp}{1}/ map:call resource=xsltgTrax map:parameter name=pagePath value={XPATH-expre}/ /map:call ... /map:match I'm afraid but I think Upayavira is right. I hope to be wrong. Many thanks in advance ... Raffaele -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 7. November 2005 20:17 An: users@cocoon.apache.org Betreff: Re: AW: using XML from the generation in the sitemap Le 7 nov. 05, à 16:13, Upayavira a écrit : ...If what you want to do is have the pipeline built based upon the content of the pipeline, then no, you cannot do that... Not directly, but generating CInclude statements allows one to create a form of content-aware pipelines. A transform which generates cinclude:include src=cocoon:/url-which-depends-on-content/ can be used to cause later steps in the pipeline to be chosen depending on the initial content. It might mean several accesses to the initial data source, but it can be very useful. -Bertrand - 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]
AW: AW: AW: using XML from the generation in the sitemap
Hi Derek This does not work because the second pipeline produces the following error message: Must set a generator before adding transformer. Thank Raffaele Von: Derek Hohls [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 8. November 2005 09:45 An: users@cocoon.apache.org Betreff: Re: AW: AW: using XML from the generation in the sitemap Raffaele Why not do this as a 2-step process, as suggested by Bertrand: 1. generate your content: map:match type=wildcard pattern=internal/genXmlV2Wsp** map:generate type=wsproxy src=""> !-- your transform which creates cinclude:include src="" -- map:transform type=create-url/ !-- set off the cinclude -- map:transform type=cinclude/ map:serialize type=xml/ /map:match 2. second pipeline is called from the cinclude statement map:match pattern=url-which-depends-on-content/URL-fromX-PATH-expre !-- process the data here -- map:call resource=xsltgTrax map:parameter name=pagePath value={URL-fromX-PATH-expre}/ /map:call ... [EMAIL PROTECTED] 2005/11/08 10:20:22 AM Hi cocooners Thanks a lot for your interest for my problem. To make it hopefully finally clear what I want to do can be seen in the following pileline. Have a look at the {XPATH-expre} that refers a XML content generated by the wsporxy. map:match type=wildcard pattern=genXmlV2Wsp** map:generate type=wsproxy src=""> map:call resource=xsltgTrax map:parameter name=pagePath value={XPATH-expre}/ /map:call ... /map:match I'm afraid but I think Upayavira is right. I hope to be wrong. Many thanks in advance ... Raffaele -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 7. November 2005 20:17 An: users@cocoon.apache.org Betreff: Re: AW: using XML from the generation in the sitemap Le 7 nov. 05, à 16:13, Upayavira a écrit : ...If what you want to do is have the pipeline built based upon the content of the pipeline, then no, you cannot do that... Not directly, but generating CInclude statements allows one to create a form of content-aware pipelines. A transform which generates cinclude:include src="" can be used to cause later steps in the pipeline to be chosen depending on the initial content. It might mean several accesses to the initial data source, but it can be very useful. -Bertrand - 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] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice CSIR Copyright, Terms and Conditions For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with "REQUEST LEGAL" in the subject line to CSIR HelpDesk This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.
using XML from the generation in the sitemap
Hi cocooners Does anybody knows if there is a possibility to use xml values that was generated before as input in the sitemap as ie: map:parameter name=paraName value={XPATH-expression}/ Best regards ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: using XML from the generation in the sitemap
Hi Upayavira Thanks for the replay ... just to make it clear and before I drop my last hope, I want to use XPATH-expression in the following map:transformer/. Still no ... ? Thx in advance ... Raffaele -Ursprüngliche Nachricht- Von: Upayavira [mailto:[EMAIL PROTECTED] Gesendet: Montag, 7. November 2005 13:10 An: users@cocoon.apache.org Betreff: Re: using XML from the generation in the sitemap Merico Raffaele wrote: Hi cocooners Does anybody knows if there is a possibility to use xml values that was generated before as input in the sitemap as ie: map:parameter name=paraName value={XPATH-expression}/ No, because the sitemap is built and those parameters are handled before the generator starts and any of that XML is seen. If you need to do that, you need to use flowscript as a controller, get the content, get your xpath value, and pass it to your pipeline. Regards, Upayavira - 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]
AW: Authentication question
Hi Gerry It could be done in the following way: In the map:act type=auth-login where you do your login check you have authorisation-OK processing step. This one could be a map:redirect-to uri=check-user-account-status/. In the check-user-account-status pipeline you can a) act depending on the account status, that can be checked by an specific action b) passing the control to a JavaScript that calls a pipeline depending on its result That's just an idea, any improvements are welcome ... Raffaele PS: But what do you do, if the users account status gets disabled during it is logged in? Should you not check the status on every request and design your response processing on the possibility of an OK or NOK status. If you would, it would solve the other problem automatically. -Ursprüngliche Nachricht- Von: Gerry Kaplan [mailto:[EMAIL PROTECTED] Gesendet: Montag, 7. November 2005 04:18 An: users@cocoon.apache.org Betreff: Authentication question My application requires an additional step for authentication. First, the user id and password must be validated as usual. I have this part working just fine. Once the user is authenticated, an additional check needs to be made to determine whether the user's account status is active. If the user is suspended (possibly due to a declined credit card transaction), then I want the user to be redirected to a page which tells them to contact customer support -- they should not be allowed to be authenticated. What is the best way to handle this. Here's a simple flow for what I need: User fills in the login page. If userid/pwd correct if account status is OK redirect to user's home page else invalidate the user's session redirect to contact us page end-if Else redirect to incorrect pwd, try again page. End-if Certainly this is a common scenario. I read through the Authentication framework and understand the basic authentication (which is working fine), but I don't understand what the additional configuration options give me (there's no examples of how to use them). Help please? Gerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Web Service Proxy Generator
Ciao Bertrand, ciao Upayavira After studying and changing the code of the WebServiceProxyGenerator I have discovered that the Set-Cookie application is handled correctly by the underlying Jakarta HttpClient 2.0.2 according to RFC 2109. The problem I had was caused by the MSIE 6.0 that does not accepts the Set-Cookie header if the response contains just XML. Therefore on every HTTP request a new session was created. And since the WebServiceProxyGenerator stores its HttpClient in the session he could not reuse the HttpClient that correctly handled the initial Set-Cookie of the requested Web-Service-Server. 1) The solution for the MSIE is, that you have initially request a HTML page (to accept the Set-Cookie of the Coocon application) and then go on with any WebServiceProxyGenerators. 2) Anyway I learned a lot about Java and Cocoon and - that the Firefox does not has this problem. Firefox remembers a cookie (Set-Cookie:) independent of the response. Hope this helps. Many thanks for your support ... Raffaele Merico Raffaele wrote: Ciao Bertrand Thanks a lot for the inspection of the source code and your suggestion how to fix the problem. How do we proceed now - does anybody of the developers will improve the WebServiceProxyGenerator according to your analysis. If you are capable with Java, then I think it is an invitation for you to improve it yourself and give us a patch. Regards, Upayavira ...Does anybody knows if there is any possibility to make the Web Service Proxy Generator remember a session with an invoked system?.. The Set-Cookie: directive of the invoked Web-Service-Server is ignored by Web Service Proxy Generator. Is there any HTTP header information that the Web Service Proxy Generator would remember for an invoked URL? Or do I have to write an own Generator?.. I'm no WebServiceProxyGenerator expert, but I think you're right that the current version doesn't store cookies. Looking at the WebServiceProxyGenerator source code, the getHttpClient() method uses a separate HttpClient instance for each session of your Cocoon application, so it should be possible to configure this HttpClient to store cookies. It might be just a matter of configuring the HttpClient differently in the getHttpClient() method. - 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]
AW: Web Service Proxy Generator
Ciao Bertrand Thanks a lot for the inspection of the source code and your suggestion how to fix the problem. How do we proceed now - does anybody of the developers will improve the WebServiceProxyGenerator according to your analysis. Thanks a lot for your support ... Raffaele ...Does anybody knows if there is any possibility to make the Web Service Proxy Generator remember a session with an invoked system?.. The Set-Cookie: directive of the invoked Web-Service-Server is ignored by Web Service Proxy Generator. Is there any HTTP header information that the Web Service Proxy Generator would remember for an invoked URL? Or do I have to write an own Generator?.. I'm no WebServiceProxyGenerator expert, but I think you're right that the current version doesn't store cookies. Looking at the WebServiceProxyGenerator source code, the getHttpClient() method uses a separate HttpClient instance for each session of your Cocoon application, so it should be possible to configure this HttpClient to store cookies. It might be just a matter of configuring the HttpClient differently in the getHttpClient() method. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Patch for WebServiceProxyGenerator
Hi Bertrand, hi Upayavira I will try to fix the problem. In the mean time I have painted a class diagram of the ServicableGenerator. But how do I patch? Do I have to a) correct org.apache.cocoon.generation.WebServiceProxyGenerator or b) extend org.apache.cocoon.generation.WebServiceProxyGenerator Thx ... Raffaele -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 31. Oktober 2005 11:43 An: users@cocoon.apache.org Betreff: Re: AW: Web Service Proxy Generator Le 31 oct. 05, à 11:24, Upayavira a écrit : Merico Raffaele wrote: Ciao Bertrand Thanks a lot for the inspection of the source code and your suggestion how to fix the problem. How do we proceed now - does anybody of the developers will improve the WebServiceProxyGenerator according to your analysis. If you are capable with Java, then I think it is an invitation for you to improve it yourself and give us a patch. That's what I meant ;-) A patch including a test case would be the best way - and you can get help here (or rather on the dev list) for any detail questions! -Bertrand - 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]
Web Service Proxy Generator
Dear community Does anybody knows if there is any possibility to make the Web Service Proxy Generator remember a session with an invoked system? The Set-Cookie: directive of the invoked Web-Service-Server is ignored by Web Service Proxy Generator. Is there any HTTP header information that the Web Service Proxy Generator would remember for an invoked URL? Or do I have to write an own Generator? Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication redirect-to uri
Dear community I hope somebody can explain me if the following situation is a feature or bug. The URL http://.../appl/auth/Index/TODO/ve2000 is auth-protected and matches the pattern=auth** in the appl/sitemap.xmap. The redirect-to uri=cocoon:/showLoginForm.cflow/ is than translated to appl/auth/Index/TODO/showLoginForm.cflow (auth/Index/TODO is added!). I aspected a redirect to appl/showLoginForm.cflow. Is this obvious to you? Thx in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Initialize Session Context Info
Hi Geert How do you create your sessions? Action? Flowscript? The map:act type=locale does it. I used flowscript to create sessions and it is very easy to add some initialization code to it as well.. OK, but does this mean that every request is going through your flowscript? Thx ... Raffaele Cheers, Geert Merico Raffaele wrote: Dear community I am looking for a way to initialize some session context information when the session is created. Which is the best way to initialize things at the session creation status? Is there a central point that can be extended? Many thank in advance ... Raffaele - 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]
RequestParameterExistsSelector
Dear community Depending on the existence of a RequestParameter I would like to choose the appropriate map:aggregate path. But I could not found any RequestParameterExistsSelector. There is only RequestParameterExistsAction that does not allow me to code a select-when-otherwise construct. Any suggestion would be very much appreciated. Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: RequestParameterExistsSelector
Hi Leszek To do (and I did) something like the following (a I assume such a case cannot be solved with an action): map:resource name=genXml map:select type=regexpSelector map:parameter name=parameter-name value=mpid/ map:when test=validMpid map:aggregate element=data map:part src=cocoon:/genXmlRequest?mpid={mpid} / map:part src=util/xml/menu/{language}/menupos-{mpid}.xml / map:part src={srcUri} / /map:aggregate /map:when map:otherwise map:aggregate element=data map:part src=cocoon:/genXmlRequest / map:part src={srcUri} / /map:aggregate /map:otherwise /map:select /map:resource The selector is defined as follows: map:selectors map:selector name=regexpSelector src=org.apache.cocoon.selection.RegexpRequestParameterSelector pattern name=empty^$/pattern pattern name=number^[0-9]+$/pattern pattern name=string^.+$/pattern pattern name=validMpid^([1-9]\d*|[^/]+)$/pattern /map:selector /map:selectors Cheers Raffaele -Ursprüngliche Nachricht- Von: Leszek Gawron [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 13. Oktober 2005 12:39 An: users@cocoon.apache.org Betreff: Re: RequestParameterExistsSelector Merico Raffaele wrote: Dear community Depending on the existence of a RequestParameter I would like to choose the appropriate map:aggregate path. But I could not found any RequestParameterExistsSelector. There is only RequestParameterExistsAction that does not allow me to code a select-when-otherwise construct. why do you need when/when/otherwise syntax if the result of request parameter exists action/selection has only two states: either exists or not? -- Leszek Gawron [EMAIL PROTECTED] IT Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65 - 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]
i18n: high-level def. of src-locale
Dear Community Is there any possibility to define a src-locale value for the i18n at a higher-level than on /i18n:? Many thx in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
may upload:// be used
Dear Community I have found a sample under http://localhost:8080/ve2000ic/samples/sources/xml-upload that contains a form/action that matches the following pipeline where upload:// is used. map:match pattern=xml-upload-post map:generate src=upload://formFieldOne/ map:transform src=context://stylesheets/system/xml2html.xslt/ map:serialize/ /map:match Since I have not found any information on upload:// I'm not sure what this pseudo protocol really does and if I may use it. I found this a solution to integrate a foreign system that uses cocoon to render an XML stream passed by the foreign system. I'm using cocoon 2.1.6 with tomcat 5.0.28. For your support many thanks in advance Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: may upload:// be used
Geert, many thanks, have a nice week end ... Raffaele -Ursprüngliche Nachricht- Von: Geert Josten [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. März 2005 14:39 An: users@cocoon.apache.org Betreff: Re: may upload:// be used Hi, If you are working with XML, you can use StreamGenerator or something alike to parse the InputStream of a request. Submit the XML as part of a POST request. If you want to use upload, make sure the upload feature in web.xml is active. I myself have used uploading successfully, but didn't use the upload: protocol for this. I simply uploaded files using a HTML form with a input of type file. The file is attached, saved as upload by Cocoon (unless the feature in web.xml is turned off), and the request-param that points to the file input field is changed to the local path of the saved upload. Hope this makes sense.. -s Cheers Merico Raffaele wrote: Dear Community I have found a sample under http://localhost:8080/ve2000ic/samples/sources/xml-upload that contains a form/action that matches the following pipeline where upload:// is used. map:match pattern=xml-upload-post map:generate src=upload://formFieldOne/ map:transform src=context://stylesheets/system/xml2html.xslt/ map:serialize/ /map:match Since I have not found any information on upload:// I'm not sure what this pseudo protocol really does and if I may use it. I found this a solution to integrate a foreign system that uses cocoon to render an XML stream passed by the foreign system. I'm using cocoon 2.1.6 with tomcat 5.0.28. For your support many thanks in advance Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- [EMAIL PROTECTED] IT-consultant at Daidalos BV, Zoetermeer (NL) http://www.daidalos.nl/ tel:+31-(0)79-3316961 fax:+31-(0)79-3316464 GPG: 1024D/12DEBB50 - 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]
AW: newlines to br
Hi Johannes Thanks a lot for your support and the script. In the mean time I have found an additional/alternative solution based on CSS: --- div style=white-space:pre; ... /div --- At the moment I'm still not able to judge which is the *most elegant* way to solve problems of formatting strings-parts within a string (br is just one formatting aspect in a multiline field). In the mean time again I have also realized that it makes a big difference in processing text-nodes with xsl:value-of/ or xsl:apply-templates/. The last approach combined with identity transformation enables one to include some basic formatting tags (as list, bold, italic and so on) within a string. Thanks again ... Raffaele -Ursprüngliche Nachricht- Von: Johannes Textor [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 9. Dezember 2004 09:22 An: [EMAIL PROTECTED] Betreff: Re: newlines to br Hi Merico, I have attached a stylesheet that I use for doing this. Works for me with xalan, hopefully also with saxon. HTH, Johannes Merico Raffaele wrote: Dear Community I'm looking for a way to translate the newlines in a text into HTML-BR when serializing to HTML. Can anybody give me a tip. I'm using cocoon.2.1.6 and saxonb.8.1.1. Many thanks in advance ... Raffaele - 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]
AW: Templating: experiments with Conal's html-to-xslt transform
Hi Bertrand As you maybe remember, this level of SOC is a main topic of my job. Although I do not understand all details of the attribute-based transformation, I actually see the following limitations (L) and disadvantages (D): L) The HTML-template to XSLT transformation is limited to one level of data access (i.e. what do you do if you want to process XPATH expressions that are in the XML-data stream?). L) How would you solve case specific (if) rendering within a for-each=...? D) I'm not sure if the web designers would be very happy to work with a mixed XSL/XPATH syntax, that's not familiar to them (i.e. div apply-templates=node()/ or h2[EMAIL PROTECTED]/h2). D) This approach needs an additional transformation step. In my opinion for the web designer it would be enough if they would have basic tags of procedural logic like ctpl:if/ and ctpl:for-each bundled with unlimited XPATH capabilities. I'm currently porting my static template language based on XSLT/XPATH 1.0 to XSLT/XPATH 2.0. As soon it is mature I will make it available for reflection to this list. /Raffaele -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 10. Dezember 2004 11:28 An: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Betreff: Templating: experiments with Conal's html-to-xslt transform (ccing users@ as I'm sure many subscribers there could contribute to this experiment as well, please discuss on dev@) I've been playing [1] with Conal Tuohy's transform [2], to generate XSLT transforms based on simple attribute-based templates (HTML in this case, could be whatever) and I like it very much. Converting attribute-based templates to XSLT instead of processing them directly is fairly easy to implement, easy to use for the template writer yet powerful by giving access, when needed, to all XSLT constructs. And the syntax of attributes like for-each or apply-templates *is* XSLT, so Bob can ask Alice for help when needed ([3]). There's more info, including source code, on the wiki [1]. Feel free to use this page as a poor man's source code control system for improving this, if people like it we might want to include this our distribution? Compared to Conal's version, the current version allows element templates to be defined in the HTML template, they are similar to XSLT templates but much easier to write. I think this adds a lot of power while allowing the template to remain concise and modular, and fairly editable in visual tools. There has to be a compromise somewhere I think, converting XML data to HTML or another format *is* programming at some stage, the 100% visual paradigm does not work for this in today's world IMHO. Comments/opinions/enhancements/flames are welcome (well, maybe not flames but if you think this sucks I'm all ears ;-) -Bertrand [1] http://wiki.apache.org/cocoon/HtmlToXsltExperiments [2] http://marc.theaimsgroup.com/?l=xml-cocoon-devm=110246247525208w=2 [3] http://marc.theaimsgroup.com/?l=xml-cocoon-devm=110231970204971w=2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
newlines to br
Dear Community I'm looking for a way to translate the newlines in a text into HTML-BR when serializing to HTML. Can anybody give me a tip. I'm using cocoon.2.1.6 and saxonb.8.1.1. Many thanks in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Setting the Locale during login
Hi Andrew I have seen a mail on this list telling you to use cocoon:raw. Rereading the following document http://cocoon.apache.org/2.1/developing/webapps/authentication.html, I think that this measure could solve your problem. In this document there is a note regarding cocoon:raw that says: --- You might be wondering why we explicitly pass the request parameters on to the internal pipeline call. Note that the authentication resource of the portalhandler is defined by cocoon:raw. By using this, no request parameter of the original request is passed on to the internal pipeline by default and therefore we have to define them explicitly. If you use cocoon: then the parameters of the form are by default passed on to the authentication resource and we could omit the parameter definition from above. But we feel that it is safer to explicitly define them. --- Raffaele -Ursprüngliche Nachricht- Von: Andrew MacDonald [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 8. Dezember 2004 18:20 An: [EMAIL PROTECTED] Betreff: AW: Setting the Locale during login Thank you for the reply Raffaele but it does not solve my problem entirely. Let me try to explain it more clearly. When the user logs in, a default locale is sent as a request parameter: form target=_top method=post action=auth?resource=portallocale=en_CA However, some users might have a different locale stored in their preferences on our server. What I'd like to do is replace the default locale with their preferred locale during the login process, so that it will already be set when they are logged in. Currently, I am setting the user's locale preference in their session in flow: if (authLocale != null authLocale != ) { locale = authLocale; } cocoon.session.setAttribute(locale, locale); ...where locale is the default locale, and authLocale is the user's locale preference. However, their preference doesn't take effect immediately, because the locale from the login is still appended as a request parameter on the URL. Once they click around the site and the request parameter is lost, then the user's locale preference in the session gets used. Any ideas on how I can set the locale with the user's preference before sending the main portal page (that they see after logging in)? Thanks, Andrew MacDonald __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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]
AW: Setting the Locale during login
Hi Andrew If you have your sitemap configured as follows: --- sitemap snip --- /map:components map:actions map:action logger=sitemap.action.locale name=locale src=org.apache.cocoon.acting.LocaleAction store-in-sessiontrue/store-in-session create-sessiontrue/create-session store-in-requesttrue/store-in-request store-in-cookiefalse/store-in-cookie !--locale-attributelocale/locale-attribute-- !--language-attributelanguage/language-attribute-- !--country-attributecountry/country-attribute-- !--variant-attributevariant/variant-attribute-- /map:action /map:actions /map:components map:pipeline map:act type=locale map:match type=wildcard pattern= ... map:transform type=i18n map:parameter name=locale value={../locale}/ map:parameter name=untranslated-text value=untranslated/ /map:transform ... /map:match /map:act /map:pipeline --- EOF sitemap snip --- than for the determination of the current locale the following rules are applied: 1) the request-parameter locale (ie locale=de_CH) is given and valid 2) the session-attribute locale is defined and valid 3) a cookie is found its parameter name is locale 4) the locale of the request-object is used (this corresponds usually to the definition in the Web Browser) When one rule is satisfied, the other one are ignored. Satisfied means: the locale is defined and can be referenced with {../locale} in the sitemap). So, using this approach a system can start working with the locale definition in the web browser of the user. If the user wants to change the locale he has to process a HTTP request (GET/POST) that contains also a locale=%NEW_LOCALE% parameter. This value is than stored in its session. Any further request will than be handled with this value stored in the session. Hope this helps ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil -Ursprüngliche Nachricht- Von: Andrew MacDonald [mailto:[EMAIL PROTECTED] Gesendet: Montag, 6. Dezember 2004 18:10 An: [EMAIL PROTECTED] Betreff: Setting the Locale during login Hello, We're trying to internationalize our portal and are having difficulty with the locale. Currently, when the user logs in to the portal, the locale is passed as a request parameter (tacked onto the login form action). However, we'd like to replace the request parameter locale with the user's locale preference (if they have one) which is loaded into the authentication context during login. Currently we're doing this replacement in flow after the login process, but would like to have it performed during login (in the sitemap). Any ideas on how this could be accomplished? Thanks, Andrew MacDonald __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 - 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]
AW: Paremeter in Sitemape ( request.getRemoteUser() )
Title: Paremeter in Sitemape ( request.getRemoteUser() ) Hi Dirk Try: map:parameter name="remoteUser" value="{request:remoteUser}"/ and declare it as: xsl:param name="remoteUser"/ hope this helps ... Raffaele -Ursprngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Gesendet: Montag, 6. Dezember 2004 10:57An: [EMAIL PROTECTED]Betreff: Paremeter in Sitemape ( request.getRemoteUser() ) Hi all,i want to use a sitemap parameter which refers to / use the request.getRemoteUser().Here is my actual part of the sitemap:map:transform type="xslt" src="" map:parameter name="varUser" value="{request:getRemoteUser()}"/ ?? thos doesn't work!!/map:transformHow must i do this. Can anyone give me a tip?Thanks for your help.Gru DirkDirk SkirdeHessische Zentrale fr DatenverarbeitungMainzer Strasse 50 Raum 00965189 WiesbadenTel.: +49 611 340 1941Fax: +49 611 340 5941EMail: [EMAIL PROTECTED]
AW: [SPAM] saxon:while suuport xslt cocoon
Hallo Andres Yesterday I have installed cocoon 2.1.6 and saxonb.8.1.1 under tomcat-5.0.28. I need a few tries, but at the end it worked. My recommandation is to follow the config instructions on http://wiki.apache.org/cocoon/Saxon and to do not forget to remove the META-INF/service directory in the saxon8.jar. For the last one: - unzip the saxon8.jar in a temp dir (you will get 2 dirs: META-INF/ and net/) - create a new nsaxon8.jar (%YOUR_JAVA_SDK_PATH%\bin\jar cfm nsaxon8.jar META-INF\MANIFEST.MF net) - if you work with Tomcat, copy the nsaxon8.jar to %CATALINA_HOME%/webapps/%COCOON_DIR_NAME%/WEB-INF/lib (you can name it as saxon8.jar) Hope this helps ... Raffaele PS: In the wiki it says: Add saxon8.jar to lib/local/. What does lib/local mean? In Tomcat there is not a lib/local. Raffaele -Ursprüngliche Nachricht- Von: Andres Taborda [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 2. Dezember 2004 06:13 An: [EMAIL PROTECTED] Betreff: [SPAM] saxon:while suuport xslt cocoon hello list i install and conigure the saxon xslt in cocoon (wiki howto ) saxon:while extension is support in cocoon 2.1.6? I get a processing error saying that saxon:while is an unrecognized element. some can help me. in my xsl have: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:saxon=http://saxon.sf.net/; extension-element-prefixes=saxon and display error with saxon:while _ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [SPAM] Re: css file wih images
Hi Phil Have you tried url(/imgcss/foo.gif)? Please note that this only works if the imgcss-dir is located directly under the doc-root. If it's not, as i remember it was located under the xsl-dir, adjust above absolute path. I.e. if foo.gif resp. its imgcss-dir can be addressed as follows http://www.myweb.com/dir1/dir2/imgcss/foo.gif than use url(/dir1/dir2/imgcss/foo.gif. That should work ... Raffaele -Ursprüngliche Nachricht- Von: pguillard [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 25. November 2004 16:33 An: [EMAIL PROTECTED] Betreff: [SPAM] Re: css file wih images Hum i get it with url(../foo.gif) and find the foo.gif in the actual folder, not the parent. Phil pguillard wrote: Thanks for the informations, unfortunately, i've put the file everywhere and tested relative paths and absolute : no way for me to get a .gif from css file... :-( Tested url(imgcss/foo.gif) url(imgcss/foo.gif) url(./imgcss/foo.gif) url(./imgcss/foo.gif) url(http://./imgcss/foo.gif) url(http://./imgcss/foo.gif;) I understand the sitemap is not concerned so no idea.. Phil Ugo Cei wrote: Il giorno 23/nov/04, alle 08:22, pguillard ha scritto: I have a css stylesheet that contains images. I don't see them on my HTML pages. When i put the css style directly in my XSL stylesheet in the html header they are rendered correctly, that means my entries for css and gif in sitemap are ok. Any idea ? When you put relative URLs in your CSS files, they are interpreted as relative to the location of the CSS file itself. When you wite CSS code inline, relative URLs are interpreted as relative to the location of the containing HTML file. Ugo - 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]
AW: question on xsl
Hi Andreas I you wish to set a new value to a xsl:variable/ saxon may have the extensions you are looking for. Saxon offers something like xsl:variable name=posX saxon:assignable=yes/. Such a variable can than be reset with saxon:assign name=posX select=$posX + 1/. I am using saxonb-8.1.1. HTH Raffaele -Ursprüngliche Nachricht- Von: Andres Taborda [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 21. November 2004 03:44 An: [EMAIL PROTECTED] Betreff: question on xsl hello list, excuse me by the following question progamming in any language a value auto-increment is for ($i=1;$i6;$i++) $i+=1; in xsl how can make the auto-increment. I have the follow code, not make sum and auto-increment !--value initial -- xsl:variable name=posX1/xsl:variable !-- this cicle have 5 element-- xsl:for-each select=child::* xsl:variable name=posX xsl:value-of select=$posX + 1/ /xsl:variable /xsl:for-each the output should be 1 2 3 4 5 6 the ouput what display is 1 1 1 1 1 some know how make it? thanks _ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [SPAM] css file wih images
Hi Phil That has probably to do with the location of the imgcss directory. It seems that the imgcss dir. is located under the xml dir. The css url() instruction tries to resolve the imgcss/foo.gif from the position of the css dir. And this can not be done, because the imgcss dir. is located unter the xsl dir. Adjust your relative urls or use absolute instead. Hope this helps Raffaele -Ursprüngliche Nachricht- Von: pguillard [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 23. November 2004 08:23 An: users cocoon Betreff: [SPAM] css file wih images Hi, I have a css stylesheet that contains images. I don't see them on my HTML pages. When i put the css style directly in my XSL stylesheet in the html header they are rendered correctly, that means my entries for css and gif in sitemap are ok. Any idea ? Regards Phil -- in main.css: div#foo { background: transparent url(imgcss/foo.gif) repeat-x bottom left; height: 26px; margin-bottom: 10px; } In sitemap: map:match pattern=css/*.css map:read mime-type=text/css src={1}.css/ /map:match map:match pattern=imgcss/*.gif map:read mime-type=image/gif src={1}.gif/ /map:match - 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]
JXTemplate Transformer
Dear Community As I understand the JXTemplate-Transfomer it works on the base of JXTemplate generated by the previous map:generate/. My question is now: is there any possibility to define the JXTemplate as the src= of the map:transform/ and having within this JXTemplate access to the XML data generated by the previous map:generate/? If yes, could you please support me with a small example. Many thanks in advance ... Raffaele stillLearning/ Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
small DB Read overview
Dear Cocooners I am learning Cocoon by translating the doc-input in grafics. Concerning on how to read from a DB I have initiated the attached PowerPoint grafic. Could the cocoon experts please review its content and may be complete the missing 'Action/Avalon Component' part (sorry I am not a Java expert yet). If you find that the overview is usable be free to correct and redistribute it. If you find I should stop with stuff like this, just let me know. Cheers ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil devel-cocoon-db-read-overview.ppt Description: MS-Powerpoint presentation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JXTemplate Transformer
Hi Bart Many thx for the confermation of my misgivings. What a shame! If the XML-SAXs could be referenced by a JXTemplate-Transformer-Script invoked by map:transform type=jx src=myJXTemplate.xml/ it would be possilbe to elimnate one XSLT transformation (a Style-free XSL Transformation) step. No, the source for the transformer comes from the generator or transformer prior to where you defined the JXTemplate transformer. E.g. map:generate src=test.xml/ map:transform type=jx/ ... Now the JXTemplate transformer transforms the XML generated by the map:generate/. There is also a JXTemplateGenerator, and it is advised (for performance reasons) that you use that. In that case you'll have to specify the name of the source file, e.g.: map:generate type=jx src=my-jx-template-file.xml/ ... HTH Bart. What does HTH mean ... Raffaele -Original Message- From: Merico Raffaele [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 12:56 PM To: '[EMAIL PROTECTED]' Subject: JXTemplate Transformer Dear Community As I understand the JXTemplate-Transfomer it works on the base of JXTemplate generated by the previous map:generate/. My question is now: is there any possibility to define the JXTemplate as the src= of the map:transform/ and having within this JXTemplate access to the XML data generated by the previous map:generate/? If yes, could you please support me with a small example. Many thanks in advance ... Raffaele stillLearning/ Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil - 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] Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JXTemplate Transformer
Dear Bart Many thx for the confermation of my misgivings. What a shame! If the XML-SAXs could be referenced by a JXTemplate-Transformer-Script invoked by map:transform type=jx src=myJXTemplate.xml/ it would be possilbe to elimnate one XSLT transformation (a Style-free XSL Transformation) step. I would see JXT and XSL as two different things. JXT for putting data into XML and XSLT to transform the XML generated by JXT (e.g. adding style for HTML output, or making XSL:FO, or ...) I don't know your use-case, but why do you want to eliminate the XSLT transformation step (just curious)? What I have done can be seen as SoC at rendering level. Because I think, that XSLT is a) not the language that a WebDesigner should unterstand and b) I find it very strange when the (XML) data steers the rendering logic I have developetd a custom XSLT template solution (google for 'Style-free XSLT Style Sheets' and 'Template Languages in XSLT') that allows the use of $var for the data binding. The logic (i.e. my:forEach.../ my:if-exists.../) is implemented with the well known xsl:template match=my:forEach-row/. Using this approach the rendering template (XHTML/FO etc.) is not cut into several pieces. The designer can implement its stuff following the natural way, HTML pages are defined/constructed. When he needs some data he has the $vars, when he needs some logic he use the defined custom language elements (i.e. my:forEach-rowtrtd$anyVar/td/tr/my:forEach-row). So much to the working things with XSLT, that is because of the limitations of XSLT no generic. When I discovered JXTemplate I 1st) saw that a lot of logic is already implemented there and 2nd) the data could be referenced by JXPath So I looked for a way to substitute my non-generic-custom template implementation with JXTemplate. That was my hope. And therefore I would need to access the XML-SAX at transformation level. But by the way, if I can reference #{$cocoon/.} there should also been a way to reference the XML-SAX as #{$xmlsax???/...} (sorry again, i am a very java beginner)? Thx for your reflection ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can not fin FOM info
Hi Cocooner Following the doc. I try to access some FOM data. But I never get any information. My function looks as follows: function flowFirst () { var bla =[ + cocoon.request.getAttribute(bla) + ]; var contentType = [ + cocoon.request.getContentType() + ]; cocoon.sendPage(flowFirstJXTemplate.xml, { name: Merico, vorname: Raffaele Piero, cookie: cocoon.cookie, attrBla: bla, contentTypeJs: contentType}); } the jxtemplate script looks as follows: --- ?xml version=1.0 encoding=ISO-8859-1? page xmlns:c=http://apache.org/cocoon/templates/jx/1.0; xmlns:h=http://apache.org/cocoon/request/2.0; name#{name}/name vorname${vorname}/vorname cookieName${cookie.name}/cookieName attrBlaJs${attrBla}/attrBlaJs attrBlaFom${cocoon.request.getAttribute(bla)}/attrBlaFom contentTypeJs${jsContentTypect}/contentTypeJs contentTypeJexl${cocoon.request.contentType}/contentTypeJexl contentTypeJxpath#{cocoon/request/contentType}/contentTypeJxpath /page --- and the result is (http://localhost:8080/ve2000ic/dbc2/flowFirst.xml?bla=x) --- ?xml version=1.0 encoding=ISO-8859-1 ? page xmlns:c=http://apache.org/cocoon/templates/jx/1.0; xmlns:h=http://apache.org/cocoon/request/2.0; nameMerico/name vornameRaffaele Piero/vorname cookieName / attrBla / contentTypeJexl / contentTypeJxpath / /page --- What do I do wrong? Thx in advance ... Raffaele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Graphical Overview On The Authentication Framework
Dear community, dear Carsten Ziegler By reading your doc. on the Authentication Framework I have created a one-page-graphical-overview covering 60-80% of this theme (see MS Power Point Attachment). To Carsten and to the community: if you think that this overview is usable: - either correct it by yourself and redistribute it - or provide me with your feedback Thx in advance ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Attachment: Graphical Overview On The Authentication Framework
here comes the attachment ... Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil devel-cocoon-auth-fw-overview.ppt Description: MS-Powerpoint presentation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Velocity versus pure XSLT
Dear Bertrand First of all, sorry for the long interrput. When I got your email I was in vacation until today. 2) thanks a lot for your tips 3) Yes, we are willing to share our know how on style-free XSLT style sheets. I just want to remember, that our contribution has a main focus on XSLT and therefore I'm not sure if this is the right place for it. Reflect it and tell me if it's OK. Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 30. September 2004 12:20 An: [EMAIL PROTECTED] Betreff: Re: Velocity versus pure XSLT Hi Raffaele, ...Finally I have implemented my own application specific template language that separates XSLT from (X)HTML/FO. The XML templates (i.e. XHTML or FO) use $Vars for the value bindings and my:tags/ for logic steering. Now this (X)HTML templates can be edited with a WYSIWYG-Editor like Dreamweaver... Sounds interesting - this might be a nice contribution or example for others, would you be willing to share this? You could either write an article on the wiki or, submit a patch with samples of what you've done. ..In the mean time I have written some XSP-Pages and combined them with above described XSLT template solution. This solution works fine if all the data is in the XML stream. But now I'm asking myself, if Velocity or another template language would be better. Especially if beside the XML data there is also some information stored in the session that must be processed.. Note that XSP is not recommended for new applications, if you're starting you should rather use Flowscript and the JXTemplate generator, for example. You can find an overview of this in the tour block, accessible from a link on the samples page once you've started Cocoon. Velocity is a nice templating language but I don't think it makes a difference in terms of combining multiple data sources: the usual way to combine data in Cocoon is to convert it to XML via a generator, and to aggregate several XML flows with map:aggregate or the with the CInclude transformer. Hope this helps! -- Bertrand Delacretaz independent consultant, Lausanne, Switzerland http://www.codeconsult.ch - 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]
Velocity versus pure XSLT
Dear community I have a story, a solution and a question ... I would be very happy to hear from any experiences ... thx The story: I got the job to reengineer an XML application that used XSL and HTML respectively FO in the same file. Because of this the application could not be changed by a Web-Designer, and every custom and/or language specific implementation brought the duplication of all the code (XSL plus HTML/FO) with it. The solution: I looked at Cocoon, I was excited and I found many statements/concepts that I was looking for. But I did not find a solution or the right how to. And the beginning with Cocoon is very hard ... especially for somebody like me that knows some programming languages but nearly nothing on Java. I stucked for a long time until I finally found two articles in the Web that brought me on the right way (google for: Style-free XSLT Style Sheet and Template Languages in XSLT). Finally I have implemented my own application specific template language that separates XSLT from (X)HTML/FO. The XML templates (i.e. XHTML or FO) use $Vars for the value bindings and my:tags/ for logic steering. Now this (X)HTML templates can be edited with a WYSIWYG-Editor like Dreamweaver. The question: Now I'm looking again to Cocoon, and I will learn to use it for my future developments. In the mean time I have written some XSP-Pages and combined them with above described XSLT template solution. This solution works fine if all the data is in the XML stream. But now I'm asking myself, if Velocity or another template language would be better. Especially if beside the XML data there is also some information stored in the session that must be processed. Any tips, tutorials or google keywords will be very appreciated - and if you, dear ultimate supporter, should be in Italy/Lecce next summer, a great sea food meal with some bottles of wine will guaranteed. Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: map:generate - servlet - empty session problem
Hi Joerg Many thanks for your tip. Calling the servlet within a jsp-file ends in the same session. The jsp-file constists of only on line: jsp:forward page=/v2?action=callSGenericveAction=redirectoutput=.xml/ The problem that I have now is that the returned XML data misses two chars. at the end. I got '/Resul' instead of '/Result'. Do you see any solution ... many thanks in advance Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Joerg Heinicke [mailto:[EMAIL PROTECTED] Gesendet: Montag, 26. Juli 2004 13:35 An: [EMAIL PROTECTED] Betreff: Re: map:generate - servlet - empty session problem On 21.07.2004 12:53, Merico Raffaele wrote: Hi I'm using Cocoon 2.1.5.1 under Tomcat 4.0.4. I have a servlet tixj.VE2000i does a login and starts a session. When I try to invoke the servlet again to generate some XML data using the following sitemap it always has an empty session. map:match pattern=**VersicherterSuchen.html map:generate src={request:concat(scheme, '://', serverName, ':', serverPort, '/ve2000ic/servlet/tixj.VE2000i?', queryString)}/ You should not access your servlet in that way is it starts a new external request (over http again, and with a new request object, so without session). The JSPGenerator (which is indeed a ServletGenerator as Unico stated somewhere in the Javadocs IIRC) might be the solution for you. You can of course also add the session info into the above URL string, but that's not the perfect solution IMO. Joerg - 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]
Session problem
Hi I'm working with tomcat 5.0.27 and cocoon 2.1.5.1. I'm using a servlet that generates XML data. When I call this servlet direct with the browser (http://wsmer:8080/ve2000ic/v2?action=callSGenericveAction=redirectoutput= .xml) it produce the expected XML data. When I call this servlet within a pipline using the following URL http://wsmer:8080/ve2000ic/appl/VersicherterSuchen.html the servlet has always an empty session and therefore sends back the login page. map:match pattern=**VersicherterSuchen.html map:generate src=http://wsmer:8080/ve2000ic/v2?action=callSGenericamp;veAction=redirect amp;output=.xml/ map:transform type=xslt src=xsl/xml2html/appl/VersicherterSuchen/VersicherterSuchen.xslt map:parameter name=global.host value={request:concat(scheme, '://', serverName, ':', serverPort)}/ map:parameter name=global.contextPath value=/ve2000ic/appl/ map:parameter name=global.lang value=de/ /map:transform map:serialize type=xhtml/ /map:match Why does the servlet gets an empty session? For your support many thanks in advance. Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
map:generate - servlet - empty session problem
Hi I'm using Cocoon 2.1.5.1 under Tomcat 4.0.4. I have a servlet tixj.VE2000i does a login and starts a session. When I try to invoke the servlet again to generate some XML data using the following sitemap it always has an empty session. map:match pattern=**VersicherterSuchen.html map:generate src={request:concat(scheme, '://', serverName, ':', serverPort, '/ve2000ic/servlet/tixj.VE2000i?', queryString)}/ map:transform type=xslt src=xsl/xml2html/appl/VersicherterSuchen/VersicherterSuchen.xslt map:parameter name=global.host value={request:concat(scheme, '://', serverName, ':', serverPort)}/ map:parameter name=global.contextPath value=/ve2000ic/appl/ map:parameter name=global.lang value=de/ /map:transform map:serialize type=xhtml/ /map:match For your support many thanks in advance ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
map:generate Session Problem
Hi I'm using Cocoon 2.1.5.1 under Tomcat 4.0.4. I have a servlet tixj.VE2000i does a login and starts a session. When I try to invoke the servlet again to generate some XML data using the following sitemap it always has an empty session. map:match pattern=**VersicherterSuchen.html map:generate src={request:concat(scheme, '://', serverName, ':', serverPort, '/ve2000ic/servlet/tixj.VE2000i?', queryString)}/ map:transform type=xslt src=xsl/xml2html/appl/VersicherterSuchen/VersicherterSuchen.xslt map:parameter name=global.host value={request:concat(scheme, '://', serverName, ':', serverPort)}/ map:parameter name=global.contextPath value=/ve2000ic/appl/ map:parameter name=global.lang value=de/ /map:transform map:serialize type=xhtml/ /map:match For your support many thanks in advance ... Raffaele Raffaele Merico LESS Informatik AG Böhnirainstrasse 14 CH-8800 Thalwil Tel: +41 1 723 12 22 Dir: +41 1 723 92 45 Fax: +41 1 723 12 23 mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]