RE: xsp-session : Bug with Cocoon? or Bug with programmer?
After searching the created Java file (apologies for my earlier mistake), the request helper is the only place it could be trying to set the variable. For example the following XSP (entire file) : +-+ ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true page xsp-session:set-attribute name=fruitApple/xsp-session:set-attribute fruitxsp-session:get-attribute name=fruit//fruit /page /xsp:page +-+ Generates the following Java +-+ public class test_xsp extends XSPGenerator { static { dateCreated = 1037088922427L; dependencies = new File[]{ }; } /* Built-in parameters available for use */ // context- ServletContext // request- HttpServletRequest // response - HttpServletResponse // parameters - parameters defined in the sitemap /* User Class Declarations */ /** * Generate XML data. */ public void generate() throws SAXException, IOException, ProcessingException { this.contentHandler.startDocument(); AttributesImpl xspAttr = new AttributesImpl(); this.contentHandler.startPrefixMapping(xml, http://www.w3.org/XML/1998/namespace;); this.contentHandler.startPrefixMapping(xsp, http://apache.org/xsp;); this.contentHandler.startPrefixMapping(xsp-session, http://apache.org/xsp/session/2.0;); this.contentHandler.startElement(, page, page, xspAttr); xspAttr.clear(); this.characters(\n); XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); this.characters(\n); this.contentHandler.startElement(, fruit, fruit, xspAttr); xspAttr.clear(); XSPObjectHelper.xspExpr(contentHandler, XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(fruit), )); this.contentHandler.endElement(, fruit, fruit); this.characters(\n ); this.contentHandler.endElement(, page, page); this.contentHandler.endPrefixMapping(xml); this.contentHandler.endPrefixMapping(xsp); this.contentHandler.endPrefixMapping(xsp-session); this.contentHandler.endDocument(); } } +-+ So as you can see from the above the only place it is possible creating the session variable is XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); And this is where the rogue semicolon appears. I can remove the rogue semicolon by creating the String Apple and reverencing that string through xsp:expr tags. But this leads to a nullPointerException. I think that either I am being really dim with this or some powers that I can't control are at work here! Thanks for everyone's help so far Tom Place - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
ey, i am not totally aware of the ideas behind the authentication-fw but i think you could use xsp/esql to generate an xml file from your database conforming to the authentication-fw specs. HTH, wouter Hi Guys, I am trying to use the C2 portal application and would like to transfer the storage of the roles from xml files to a mysql database. Can someone teach me how to do this? I cannot find anything on the sitemap file that transforms or uses the sunrise roles.xml btw, im using tomcat 4.1 sdk 1.3 c2.1 dev thanks - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
thanks for the input. - Original Message - From: Wouter Scheele [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 12, 2002 4:49 PM Subject: Re: Cocoon Portal - User Roles ey, i am not totally aware of the ideas behind the authentication-fw but i think you could use xsp/esql to generate an xml file from your database conforming to the authentication-fw specs. HTH, wouter Hi Guys, I am trying to use the C2 portal application and would like to transfer the storage of the roles from xml files to a mysql database. Can someone teach me how to do this? I cannot find anything on the sitemap file that transforms or uses the sunrise roles.xml btw, im using tomcat 4.1 sdk 1.3 c2.1 dev thanks - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing: javax.servlet.ServletException: Servlet.init()
On Tue, 2002-11-12 at 05:17, Geoff Howard wrote: Yes, that was the specific error that people were getting when the older jars distributed with the jdk were not properly overridden. http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103692889710176w=2 So do you see anything wrong in those installation notes? http://www.murrayc.com/temp/cocoon_install_notes.txt Clearly copying the jars has had some effect. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
Hi again guys, I have checked the source codes of the portal sample... I found out that if I am to add new user or to add new roles, both task will end up submitting forms with different parameters to this resource /cocoon/myportal/sunspotdemo-sunriseconf which inturn would exactly matchthis sitemap snippet in the process... map:match pattern="sunspotdemo-sunriseconf" !-- This pipeline can only be accessed if the current user is allowed to configure the 'administration' coplet -- map:act type="portal-auth" map:parameter name="coplet" value="administration"/ /map:act map:generate type="auth-conf"/ map:transform src="styles/sunriseconfHTML.xsl"/ map:transform type="encodeURL"/ map:serialize / Am I correct? Now I have checked the source codes for the "portal-auth" action and the "auth-conf" genarator, and I dont think they're very easy to modify. I hope I do not have to createour own portal genarators to use a database as a storage for user and roles. any ideas? thanks - Original Message - From: Richard Reyes To: cocoon-users Sent: Tuesday, November 12, 2002 2:18 PM Subject: Cocoon Portal - User Roles Hi Guys, I am trying to use the C2 portal application and would like to transfer the storage of the roles from xml files to a mysql database. Can someone teach me how to do this? I cannot find anything on the sitemap file that transforms or uses the sunrise roles.xml btw, im using tomcat 4.1 sdk 1.3 c2.1 dev thanks
RE: Cocoon Portal - User Roles
Hi, each function of the portal is mapped to a pipeline. So in order to change the storage - all you have to do is to modify the pipeline to use say the SQLGenerator etc. Read the documentation. http://xml.apache.org/cocoon/developing/webapps/authentication.html It explains this in detail (see under User Administration). Then look at the pipelines that are currently used to get a feel for how it works at the moment. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 10:06 AMTo: [EMAIL PROTECTED]Subject: Re: Cocoon Portal - User Roles Hi again guys, I have checked the source codes of the portal sample... I found out that if I am to add new user or to add new roles, both task will end up submitting forms with different parameters to this resource /cocoon/myportal/sunspotdemo-sunriseconf which inturn would exactly matchthis sitemap snippet in the process... map:match pattern="sunspotdemo-sunriseconf" !-- This pipeline can only be accessed if the current user is allowed to configure the 'administration' coplet -- map:act type="portal-auth" map:parameter name="coplet" value="administration"/ /map:act map:generate type="auth-conf"/ map:transform src="styles/sunriseconfHTML.xsl"/ map:transform type="encodeURL"/ map:serialize / Am I correct? Now I have checked the source codes for the "portal-auth" action and the "auth-conf" genarator, and I dont think they're very easy to modify. I hope I do not have to createour own portal genarators to use a database as a storage for user and roles. any ideas? thanks - Original Message - From: Richard Reyes To: cocoon-users Sent: Tuesday, November 12, 2002 2:18 PM Subject: Cocoon Portal - User Roles Hi Guys, I am trying to use the C2 portal application and would like to transfer the storage of the roles from xml files to a mysql database. Can someone teach me how to do this? I cannot find anything on the sitemap file that transforms or uses the sunrise roles.xml btw, im using tomcat 4.1 sdk 1.3 c2.1 dev thanks
SourceWritingTransformer and sub-sitemap
Hi, I use SourceWritingTransformer 3 times, and the XML stream that is processed by this transformer is produced by a sub-sitemap. So that my XML database queries are gathered there. The bug : my transformer wants to write in the ino folder, where is placed the sub-sitemap. Not the folder of the main sitemap. I tried to understand the transformer's code but it's a bit too hard for me :-( So here are the info : Cocoon CVS from 10/02 with JDK 1.3.1 Main sitemap snippet : !-- generates html body of email license and writes it on disk -- map:match pattern=writehtmlbody map:act type=request map:parameter name=parameters value=true/ map:act type=auth-protect map:parameter name=handler value=baepphandler/ map:generate src=cocoon://ino/licenseinfo/{../serialNumber}/ map:transform src=xsl/writelicensehtmlbody.xsl/ map:transform type=write-source map:parameter name=serializer value=html/ /map:transform map:serialize type=xml/ /map:act /map:act /map:match and in the same pipeline : !-- mount tamino queries -- map:match pattern=ino/** map:mount check-reload=yes src=ino/ uri-prefix=ino// /map:match writelicensehtmlbody.xsl : xsl:template match=/ source:write !-- get one step above because current directory is ino [bug ??] -- source:source../licensekeys/xsl:value-of select=//License_Info/SoftwareAG_License/Component/LicenseKey//htmlbody.h tml/source:source source:fragment xsl:call-template name=htmlbody/ /source:fragment /source:write You see that I have to add ../ to the source:source URI. I wonder why the call to a sub-sitemap changes some cocoon environment variable ?... Is the map:mount misconfigured ? Thanks a lot, Barbara PS : I am just doing cosmetics (to my project), this is why I reappear on the list... __ Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Cocoon from the command
I too had the same problems getting the command line to run. The jar files needed can be found in webapps/cocoon/WEB-INF/lib. I ran the class files from the build directory cocoon-2.0.3/build/cocoon/classes. The following worked for me. Maybe this will help. cd /usr/local/jakarta-tomcat-4.1.12/webapps/cocoon/WEB-INF/lib setenv CLASSPATH .:/usr/local/cocoon-2.0.3/build/cocoon/classes:avalon-framework- 20020627.jar:avalon-excalibur-vm12-20020705.jar java org.apache.cocoon.Main --help Hope that helps. Darren On Monday, November 11, 2002, at 07:02 PM, Alessio Sangalli wrote: Ugo Cei wrote: It SHOULD be possible to just unpack the cocoon.war file from the binary distribution, cd to WEB-INF/lib and run: java -jar cocoon-2.0.3.jar However, the Manifest in the JAR is wrong, since it contains: Class-Path: avalon-framework-4.1.2.jar avalon-excalibur-4.1.jar batik- libs-1.1.1.jar bsf-2.2.jar fop-0.20.3rc.jar jakarta-regexp-1.2.jar js tyle.jar logkit-1.0.1.jar rhino-1.5r3.jar xalan-2.3.1.jar xercesImpl- 2.0.0.jar xml-apis.jar xt-19991105.jar But the versions of the libraries are not those. For instance, it should be avalon-framework-20020627.jar instead. I've tried to modify the MANIFEST file but at the end it didn't work the same. It's likely I'm not able to build a JAR, however it seems Cocoon can't be used from the command line right now out-of-the-box, am I wrong? boh ciao as - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Darren Petrie [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamic models in XMLForms - was: Re: XMLForm - xf:repeat tag onDOM Nodes?
It needs further clarification before we can start design. Hopefully other people who asked for this feature will add a few more use cases. I know, thank you. Btw, what about filling a DOM node in the model from outside? For example, I'm using Xindice, and there's that nice pseudo protocol working on Cocoon. I would like to query the DB using the pseudo protocol. It returns me a collection. Now I want to feed the Form with this collection. A first approach would be to load the collection in a DOM node for example. But I can't see how I could do it, maybe with a sitemap parameter? May I load that result there and then get it in the action in the act method? The alternative is to query the DB directly inside the model or the action and load the values, but I think it is a worse approach. Well, that would be a first step. The second would be to have the model empty. Then, after loading the coleection, properties would be 'created at runtime' for every element. I do not know if it would be possible, but it sounds too hard to me. Just a random idea... Best. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xsp-session : Bug with Cocoon? or Bug with programmer?
I dont make use of it. But I use XSP. :-D Try to change the order of the namespaces to: xsp:page xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true xmlns:xsp=http://apache.org/xsp; The check again the Java code. It is a interesting error. What version are you using? Regards, Antonio Gallardo. Tom Place dijo: After searching the created Java file (apologies for my earlier mistake), the request helper is the only place it could be trying to set the variable. For example the following XSP (entire file) : +-+ ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true page xsp-session:set-attribute name=fruitApple/xsp-session:set-attribute fruitxsp-session:get-attribute name=fruit//fruit /page /xsp:page +-+ Generates the following Java +-+ public class test_xsp extends XSPGenerator { static { dateCreated = 1037088922427L; dependencies = new File[]{ }; } /* Built-in parameters available for use */ // context- ServletContext // request- HttpServletRequest // response - HttpServletResponse // parameters - parameters defined in the sitemap /* User Class Declarations */ /** * Generate XML data. */ public void generate() throws SAXException, IOException, ProcessingException { this.contentHandler.startDocument(); AttributesImpl xspAttr = new AttributesImpl(); this.contentHandler.startPrefixMapping(xml, http://www.w3.org/XML/1998/namespace;); this.contentHandler.startPrefixMapping(xsp, http://apache.org/xsp;); this.contentHandler.startPrefixMapping(xsp-session, http://apache.org/xsp/session/2.0;); this.contentHandler.startElement(, page, page, xspAttr); xspAttr.clear(); this.characters(\n); XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); this.characters(\n); this.contentHandler.startElement(, fruit, fruit, xspAttr); xspAttr.clear(); XSPObjectHelper.xspExpr(contentHandler, XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(fruit), )); this.contentHandler.endElement(, fruit, fruit); this.characters(\n ); this.contentHandler.endElement(, page, page); this.contentHandler.endPrefixMapping(xml); this.contentHandler.endPrefixMapping(xsp); this.contentHandler.endPrefixMapping(xsp-session); this.contentHandler.endDocument(); } } +-+ So as you can see from the above the only place it is possible creating the session variable is XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); And this is where the rogue semicolon appears. I can remove the rogue semicolon by creating the String Apple and reverencing that string through xsp:expr tags. But this leads to a nullPointerException. I think that either I am being really dim with this or some powers that I can't control are at work here! Thanks for everyone's help so far Tom Place - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Separation of concerns?
I have a (multi-part) question about the suggested separation of concerns that it is proposed that Cocoon achieves. I would like to ask how Cocoon is being used in a production environment, specifically how does separation of roles work out. Does it actually work in practice? How easy is it in production settings to find graphics designers who are also fluent in XSLT? Aren't such bi-skilled people essential to achieve the implementation of the style concern? Or, in practice, are real designers and real XSLT coders working together on the XSLT stylesheets? I guess that the suspicion that is lurking at the back of my mind is that the confusion of concerns (to coin a phrase) is, to some extent, being shuffled off into the style box. Of course, that may be a signficant improvement over other workflows. I can see pretty clearly the cleanness of the current approach for programmers/administrators ... designers don't touch the content nor the sitemaps ... but I do have slight doubts about the cleanness of the style concern. Or maybe my doubt is about the realisticness of finding graphics designers comfortable to code in XSLT. I notice, too, that style is little mentioned in the online documentation and doesn't appear as a term in the index of the Langham/Ziegeler book. That makes me wonder if others either have doubts too about the style concern or, perhaps, haven't looked (yet?) in a detailed way at how this will work. I wonder if what has mostly been happening up to now is XSLT-coders dabbling with design? :) I would be interested in any stories about the reactions of pure graphics designers in a production setting when first faced with the Cocoon approach and how they and, I suspect, XSLT-programmer colleagues actually worked out a practical workflow. Andrew Watt - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: enctype=multipart/form-data problem
Hi myself, this is a bug in MultipartParser.java in the readHeaders() method within Cocoon 2.0.2. When you define form name=form2 enctype=multipart/form-data method=post and you use a input name=uploadedfile type=file field, the header will contain: ...name=uploadedfile; filename= When filename is empty the StringTokenizer in readHeaders() will have no more tokens, but will get a nextToken() call. Here's an approach for a bug fix: ... while (tokenizer.hasMoreTokens()) { // old code // headers.put(tokenizer.nextToken( ;=\), // tokenizer.nextToken(=\)); // new code String key = tokenizer.nextToken( ;=\); String value = ; if (tokenizer.hasMoreTokens()) { value = tokenizer.nextToken(=\); } else { value = ; } headers.put(key, value); // end of new code } This helps unless the filename= is not followed by an additional attribute, but it helps for the moment. Please fix this bug, if it is not done yet. Best regards - Volker - -Original Message- From: Volker Schneider [mailto:volker.schneider;danet.de] Sent: Sonntag, 10. November 2002 22:32 To: [EMAIL PROTECTED] Subject: enctype=multipart/form-data problem Dear colleagues, if have a form and I want to upload a file from that form. When I define my form as form name=form2 enctype=multipart/form-data method=post the ordinary input fields will not be transferred. When I use method=get it works. Unfortunately I have to use the post method because I have to transfer a lot of data and I'm not sure, whether this is possible with the get method (because of limited URL length). Splitting the form is not possible, because I need the rest of the data too. Please help me, what can I do? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Separation of concerns?
Hi Andrew, Andrew Watt wrote: I wonder if what has mostly been happening up to now is XSLT-coders dabbling with design? :) Yup. I would be interested in any stories about the reactions of pure graphics designers in a production setting when first faced with the Cocoon approach and how they and, I suspect, XSLT-programmer colleagues actually worked out a practical workflow. What we do here is: - Designers build HTML, WML etc prototypes. - Programmers modify the prototypes to be XHTML+CSS compliant. Usually, the prototypes are enhanched during this stage (designers are very bad when it comes to download time, accesibility, usability etc. They give you huge images that can be replaced with much smaller versions manipulated with CSS). Many images are removed completely, using some common background image and real text. This is the most tricky stage and talented people are importand; I'm talking about programmers opening Gimp, editing images and code at the same time... - Programmers translate the prototypes to XSLT. IMHO, the only reason we need designers is for not eating up even more time from people that can code. Plus we always feed designers to the marketing dpt ;-) In general, I've been a designer, a programmer and whatever. I think the most valuable people are the ones that can wear many hats, thus able to coordinate the work of different people. Design tools suck and we only use them for prototyping. If it counts to anything, I believe Cocoon will help a lot in delivering different content from the same data. Doing that with JSP/PHP/ASP/whatever prooves to be a pain in large projects. Manos - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using matchers, especially sessionstate...
On 11.Nov.2002 -- 03:29 PM, Christian Joelly wrote: Hello! On Mon, Nov 11, 2002 at 11:17:15AM +0100, Christian Haul wrote: On 07.Nov.2002 -- 09:44 AM, Christian Joelly wrote: thanks for your answer. I'd prefer to use the version 2.0.1 for this application, because maybe there are some other problems rising when i switch the cocoon version during development... ;-) Fair enough. OTOH many issues have been resolved. There should be no change in the user visible interface apart from stuff in scratchpad. i'm now working to integrate cocoon 2.0.3 with my application, but i see there are some issues that are strange: i wrote lots of sql queries in the following manner: (as i usual did with other frameworks or dev tools) xsp:logic sQuery = SELECT DISTINCT nUserID, sUserName FROM users; if (sNachname != null) { sQuery =+ WHERE sNachname LIKE \ + sNachname + %\; } !-- lots of other tests go here... -- /xsp:logic Right, this appears to be a bug in Xalan, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8734 If you don't use the same type of quotes inside the string it is OK IIRC. The other option is to use search and replace all \ with ' s/\\/'/g Please be aware that the above code may allow a user to substitute sNachname with a string like '; close database; drop database somedb;' what is probably not intended. Consider using prepared statements like esql:queryselect distinct nUserID, sUserName from users where sNachname like esql:parameterxsp:exprsNachname+%/xsp:expr/esql:parameter Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
Hi Matthew, Thanks for the reminder! Hi, each function of the portal is mapped to a pipeline. So in order to change the storage - all you have to do is to modify the pipeline to use say the SQLGenerator etc. Read the documentation. http://xml.apache.org/cocoon/developing/webapps/authentication.html It explains this in detail (see under User Administration). Then look at the pipelines that are currently used to get a feel for how it works at the moment. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 10:06 AMTo: [EMAIL PROTECTED]Subject: Re: Cocoon Portal - User Roles Hi again guys, I have checked the source codes of the portal sample... I found out that if I am to add new user or to add new roles, both task will end up submitting forms with different parameters to this resource /cocoon/myportal/sunspotdemo-sunriseconf which inturn would exactly matchthis sitemap snippet in the process...
RE: xsp-session : Bug with Cocoon? or Bug with programmer?
Unfortunately this makes no difference. The cocoon version is 2.03 Going to try downloading the 2.03 for JDK 1.4 binary - see if this makes any difference . . . -Original Message- From: Antonio A. Gallardo Rivera [mailto:agallardo;agsoftware.dnsalias.com] Sent: 12 November 2002 10:25 To: [EMAIL PROTECTED] Subject: RE: xsp-session : Bug with Cocoon? or Bug with programmer? I dont make use of it. But I use XSP. :-D Try to change the order of the namespaces to: xsp:page xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true xmlns:xsp=http://apache.org/xsp; The check again the Java code. It is a interesting error. What version are you using? Regards, Antonio Gallardo. Tom Place dijo: After searching the created Java file (apologies for my earlier mistake), the request helper is the only place it could be trying to set the variable. For example the following XSP (entire file) : +-+ ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true page xsp-session:set-attribute name=fruitApple/xsp-session:set-attribute fruitxsp-session:get-attribute name=fruit//fruit /page /xsp:page +-+ Generates the following Java +-+ public class test_xsp extends XSPGenerator { static { dateCreated = 1037088922427L; dependencies = new File[]{ }; } /* Built-in parameters available for use */ // context- ServletContext // request- HttpServletRequest // response - HttpServletResponse // parameters - parameters defined in the sitemap /* User Class Declarations */ /** * Generate XML data. */ public void generate() throws SAXException, IOException, ProcessingException { this.contentHandler.startDocument(); AttributesImpl xspAttr = new AttributesImpl(); this.contentHandler.startPrefixMapping(xml, http://www.w3.org/XML/1998/namespace;); this.contentHandler.startPrefixMapping(xsp, http://apache.org/xsp;); this.contentHandler.startPrefixMapping(xsp-session, http://apache.org/xsp/session/2.0;); this.contentHandler.startElement(, page, page, xspAttr); xspAttr.clear(); this.characters(\n); XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); this.characters(\n); this.contentHandler.startElement(, fruit, fruit, xspAttr); xspAttr.clear(); XSPObjectHelper.xspExpr(contentHandler, XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(fruit), )); this.contentHandler.endElement(, fruit, fruit); this.characters(\n ); this.contentHandler.endElement(, page, page); this.contentHandler.endPrefixMapping(xml); this.contentHandler.endPrefixMapping(xsp); this.contentHandler.endPrefixMapping(xsp-session); this.contentHandler.endDocument(); } } +-+ So as you can see from the above the only place it is possible creating the session variable is XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); And this is where the rogue semicolon appears. I can remove the rogue semicolon by creating the String Apple and reverencing that string through xsp:expr tags. But this leads to a nullPointerException. I think that either I am being really dim with this or some powers that I can't control are at work here! Thanks for everyone's help so far Tom Place - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: link rel=
On Monday, Nov 11, 2002, at 18:21 Europe/London, Alessio Sangalli wrote: Hi I've a little problem because I want to automatically generate the link header (if you use Mozilla, it's very useful, if you want to show it: menu - view - show-hide - site navigation toolbar - show [as needed]). Here is an example: link rel=home type=text/html title=How to build an IR receiver href=./ link rel=prev type=text/html title=Circuit href=circuit.html/ link rel=next type=text/html title=Diode and Resistor href=02.html/ link rel=last type=text/html title=Links href=links.html/ what I do to deal with this kind of thing is to have a menu.xml structure, that is imported into all my pages via CInclude, then xslt (having been provided with the 'id' of the page via the sitemap) makes two structures from the menu.xml, 1) my html navigation 2) the meta links you mention. I also output rel=Chapter (of sub-pages) links so all nav can be done from the site nav toolbar. Mozilla also handles rel=Section and rel=SubSection. Hope this helps regards Jeremy - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with substitute-value in SQLTransformer
On Monday, Nov 11, 2002, at 19:41 Europe/London, Kjetil Kjernsmo wrote: I have problems with the SQLTransformer in a recent 2.1-dev, more specifically, I can't get the substitute-value element to work. Sorry, but this works fine for me in 2.1dev (I have different problems ;) regards Jeremy - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
Hi Matthew / Guys, Just want to confirm some things Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? Also, for the sunrise-newrole resource,the only thing this pipeline does is save a new role in the xml file (sunrise-roles.xml )? whose responsible for displaying the next page after saving the new role? And since this sitemap snippet is called inside a map:pipeline internal only clause I think it is being called by the portal generator or action. If in case I'd used custom actions over this pipeline, How would I know the parameters that have been passed and are being expected by the caller of this pipeline? Thanks a lot Richard - Original Message - From: Richard Reyes To: cocoon-users Cc: Alex Sent: Tuesday, November 12, 2002 7:18 PM Subject: Re: Cocoon Portal - User Roles Hi Matthew, Thanks for the reminder! Hi, each function of the portal is mapped to a pipeline. So in order to change the storage - all you have to do is to modify the pipeline to use say the SQLGenerator etc. Read the documentation. http://xml.apache.org/cocoon/developing/webapps/authentication.html It explains this in detail (see under User Administration). Then look at the pipelines that are currently used to get a feel for how it works at the moment. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 10:06 AMTo: [EMAIL PROTECTED]Subject: Re: Cocoon Portal - User Roles Hi again guys, I have checked the source codes of the portal sample... I found out that if I am to add new user or to add new roles, both task will end up submitting forms with different parameters to this resource /cocoon/myportal/sunspotdemo-sunriseconf which inturn would exactly matchthis sitemap snippet in the process...
RE: Cocoon Portal - User Roles
Hi Matthew / Guys, Just want to confirm some things Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? Also, for the sunrise-newrole resource,the only thing this pipeline does is save a new role in the xml file (sunrise-roles.xml )? whose responsible for displaying the next page after saving the new role? And since this sitemap snippet is called inside a map:pipeline internal only clause I think it is being called by the portal generator or action. If in case I'd used custom actions over this pipeline, How would I know the parameters that have been passed and are being expected by the caller of this pipeline? Thanks a lot Richard - Original Message - From: Richard Reyes To: cocoon-users Cc: Alex Sent: Tuesday, November 12, 2002 7:18 PM Subject: Re: Cocoon Portal - User Roles Hi Matthew, Thanks for the reminder! Hi, each function of the portal is mapped to a pipeline. So in order to change the storage - all you have to do is to modify the pipeline to use say the SQLGenerator etc. Read the documentation. http://xml.apache.org/cocoon/developing/webapps/authentication.html It explains this in detail (see under User Administration). Then look at the pipelines that are currently used to get a feel for how it works at the moment. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 10:06 AMTo: [EMAIL PROTECTED]Subject: Re: Cocoon Portal - User Roles Hi again guys, I have checked the source codes of the portal sample... I found out that if I am to add new user or to add new roles, both task will end up submitting forms with different parameters to this resource /cocoon/myportal/sunspotdemo-sunriseconf which inturn would exactly matchthis sitemap snippet in the process...
XML manipulation
I am trying to manipulate an xml document i placedwithin the addressbook collection in Xindice. I'mattempting to match the value contained within the email attribute in the departmental-office element.When i run this script it compiles but I'm not getting any output. Can you see where I'm going wrong? Many thanks, David //package org.apache.xindice.examples; /If I include this line the program wont compile import org.xmldb.api.base.*;import org.xmldb.api.modules.*;import org.xmldb.api.*; public class test { public static void main(String[] args) throws Exception { Collection col = null; try { String driver = "org.apache.xindice.client.xmldb.DatabaseImpl"; Class c = Class.forName(driver); Database database = (Database) c.newInstance(); DatabaseManager.registerDatabase(database); col = DatabaseManager.getCollection("xmldb:xindice:///db/addressbook"); String xpath = "//Departmental_Office[email='[EMAIL PROTECTED]']"; XPathQueryService service = (XPathQueryService) col.getService("XPathQueryService", "1.0"); ResourceSet resultSet = service.query(xpath); ResourceIterator results = resultSet.getIterator(); while (results.hasMoreResources()) { Resource res = results.nextResource(); System.out.println((String) res.getContent()); } } catch (XMLDBException e) { System.err.println("XML:DB Exception occured " + e.errorCode); } finally { if (col != null) { col.close(); } } }}Get a bigger mailbox -- choose a size that fits your needs.
RE: Cocoon Portal - User Roles
Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? You need to take a look at the file sunrise-newrole.xml. That file contains most of the dirty work. The transformers session, cinclude and writesource act on the information contained in there. Because sunrise-newrole.xml also flows through the pipeline it is then formatted by the stylesheet and returned to the browser. It is serialized to xml because it is being used inside the portal (in this case). If you wanted to write this to a database you would need to change the sunrise-newrole.xml and use the sqltransformer instead of cinclude and write-source. In all this should take you around 5 minutes or less to adapt. :-) So it really is quite simple really. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 12:53 PMTo: cocoon-usersSubject: RE: Cocoon Portal - User Roles Hi Matthew / Guys, Just want to confirm some things Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? Also, for the sunrise-newrole resource,the only thing this pipeline does is save a new role in the xml file (sunrise-roles.xml )? whose responsible for displaying the next page after saving the new role? And since this sitemap snippet is called inside a map:pipeline internal only clause I think it is being called by the portal generator or action. If in case I'd used custom actions over this pipeline, How would I know the parameters that have been passed and are being expected by the caller of this pipeline? Thanks a lot Richard - Original Message - From: Richard Reyes To: cocoon-users Cc: Alex Sent: Tuesday, November 12, 2002 7:18 PM Subject: Re: Cocoon Portal - User Roles Hi Matthew, Thanks for the reminder! Hi, each function of the portal is mapped to a pipeline. So in order to change the storage - all you have to do is to modify the pipeline to use say the SQLGenerator etc. Read the documentation. http://xml.apache.org/cocoon/developing/webapps/authentication.html It explains this in detail (see under User Administration). Then look at the pipelines that are currently used to get a feel for how it works at the moment. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent:
cinclude and sitemap parameters
hi all, is it possible to access a sitemap parameter, within the cinclude tag in a page like this: sitemap: map:match pattern=composite/** map:generate src=aggreate.xml / map:transform type=cinclude map:parameter name=uri value=cocoon:/{1} / /map:transform map:serialize/ /map:match aggregate.xml page cinclude:include src={uri} ... / /page this would be great since one could use this pattern for site-frameworks which don't know which pages they include thanks -- jakob __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cinclude and sitemap parameters
On Tue, 12 Nov 2002 13:43:42 +0100 (CET) Jakob Praher [EMAIL PROTECTED] wrote: hi all, is it possible to access a sitemap parameter, within the cinclude tag in a page like this: sitemap: map:match pattern=composite/** map:generate src=aggreate.xml / map:transform type=cinclude map:parameter name=uri value=cocoon:/{1} / /map:transform map:serialize/ /map:match aggregate.xml page cinclude:include src={uri} ... / /page Try like: map:match pattern=composite/** map:generate src=aggreate.xml / map:transform src=sample.xsl map:parameter name=uri value=cocoon:/{1} / /map:transform map:transform type=cinclude/ map:serialize/ /map:match sample.xsl ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:ci=http://apache.org/cocoon/include/1.0; version=1.0 xsl:output method=xml/ xsl:param name=uri/ xsl:template match=/ xsl:apply-templates select=page/ /xsl:template xsl:template match=page page cinclude:include src={$uri} ... / /page /xsl:template xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to handle xml-fragment from db
Hi Robert mainly the returned XmlFragment that u retrieve from DB as String must be parsed before u can deal with it ... that is why u have the code string for the symbol --- lt; ... I faced this problem also but I didn't use XSP ...I implemeted a Transformer to get this String fragment and parse it and stream it out into the pipline to be proccesed as u want through ur stylesheet. so u must parse the String before u deal with it. I wish that will help Mohamed El-Refaey Robert Sösemann wrote: Hey, who can help to solve the following problem? In my relational db I have a column with XHTML fragments and want to bring it into my cocoon pipline the following way. DB ROW CONTENT: --- ...Pfoobar/PB GENERATOR: --- XSP that extracts this rows value by ... TXT esql:get-string column=i.text/ /TXT TRANSFORMER: XSL that tries to obtain this: ... TD xsl:value-of select=TEXT/./ /TD THE RESULT THAT I WANT: - ... TD ...Pfoobar/PB /TD WHAT I GET INSTEAD: --- ... TD lt;Pgt; --- only escaped text /TD ... I also tried to use esql:get-xml column=i.text/ and xsl:text disable-output-escaping=yes. But without success. Whats wrong??? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: How to handle xml-fragment from db
Did you try: esql:get-columns/ coupled with xsl:value-of select=column_name disable-output-escapign=yes/ ? L. -Messaggio originale- Da: Robert Sösemann [mailto:robert.soesemann;gmx.de] Inviato: martedì 12 novembre 2002 13.44 A: [EMAIL PROTECTED] Oggetto: How to handle xml-fragment from db Hey, who can help to solve the following problem? In my relational db I have a column with XHTML fragments and want to bring it into my cocoon pipline the following way. DB ROW CONTENT: --- ...Pfoobar/PB GENERATOR: --- XSP that extracts this rows value by ... TXT esql:get-string column=i.text/ /TXT TRANSFORMER: XSL that tries to obtain this: ... TD xsl:value-of select=TEXT/./ /TD THE RESULT THAT I WANT: - ... TD ...Pfoobar/PB /TD WHAT I GET INSTEAD: --- ... TD lt;Pgt; --- only escaped text /TD ... I also tried to use esql:get-xml column=i.text/ and xsl:text disable-output-escaping=yes. But without success. Whats wrong??? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Separation of concerns?
Lorenzo, to ease the burden on your graphic designers, you could even build a sort of taglib with XML elements to be expanded by an appropriate XSL. I've done a lib which allows me to specify smart HTML without the need of XSL (well, it works behind the scenes)... here's an example: img src={insert-request-parameter:images-home}/blank.gif border=0 width=4/ I hope you got the idea :) Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Lorenzo De Sio [mailto:l.desio;w4b.it] Inviato: martedì 12 novembre 2002 12.35 A: '[EMAIL PROTECTED]' Oggetto: R: Separation of concerns? I think you pointed out quite a big issue, though from my point of view this is not such a problematic one. I currently work in a co-founded small company. We are 1 programmer, 1 HTML/graphic designer, 1 HTML/Flash developer, 1 junior developer which has no actual programming skills, but quickly learned HTML and XSL. You could ask: why Cocoon in such a small team? The answer is XSL itself. Currently, our application development work in the past few years (we are focused on small-medium businesses) has been mainly on e-commerce, data-driven, customer-updatable sites and, later, content management for small-to-medium publishing needs. We ended up in producing many, many times the same mini-applications, branding them differently each time. This led us (even on the ASP platform we were, and still mainly are, working on) to XSL. ASP already (no .NET) has a few underlooked features (XML serialization of a Recordset object to a Stream object, for example, which is quite fast and can support XSL transformation) which allowed us to separate the presentation layer from the content/logic one. This actually allowed me to totally drop the production of such applications to the junior programmer. He also benefits from the separation, by actually reusing 99% of the code (we embedded database write logic in a single library .asp file, the only required code changes are for changing SELECT queries), and by being able to personalize the look by only changing one XSL template file. This simple implementation of a XML/XSL separation, much simpler but similar to Cocoon's approach, already gave us these benefits. The next step, which we are experiencing in the development of quite a large e-learning site (with Cocoon), is to directly let the designers access the XSLs, by giving them the basic XSL skills required to do the job. I find that The XSL skills required are not really heavy. Heavy XSL skills are, in my opinion, required in working on complex structure transformations that come *before* the final, presentation-aimed XSL transformation. Our experience is that, instead, the final transformation deals 99% of the time with: a) a container with many rows of data (a master, which can be easily handled even with a simple xsl:for-each/; b) an item of data with many fiels (a detail). Such XSL-drive HTML renderings are done mostly using xsl:value-of/ inserted into traditional HTML markup and I found that even the HTML designer and the Flash developer are comfortable with them. Of course you need designers who know HTML. But even this requirement could fade in the future, since tools like Dreamweaver already support XHTML conformance, and they could easily be scripted to allow insertion of XSL value elements and for-each loops. L. -Messaggio originale- Da: Andrew Watt [mailto:andrew;andrewwatt.com] Inviato: martedì 12 novembre 2002 10.47 A: [EMAIL PROTECTED] Oggetto: Separation of concerns? I have a (multi-part) question about the suggested separation of concerns that it is proposed that Cocoon achieves. I would like to ask how Cocoon is being used in a production environment, specifically how does separation of roles work out. Does it actually work in practice? How easy is it in production settings to find graphics designers who are also fluent in XSLT? Aren't such bi-skilled people essential to achieve the implementation of the style concern? Or, in practice, are real designers and real XSLT coders working together on the XSLT stylesheets? I guess that the suspicion that is lurking at the back of my mind is that the confusion of concerns (to coin a phrase) is, to some extent, being shuffled off into the style box. Of course, that may be a signficant improvement over other workflows. I can see pretty clearly the cleanness of the current approach for programmers/administrators ... designers don't touch the content nor the sitemaps ... but I do have slight doubts about the cleanness of the style concern. Or maybe my doubt is about the realisticness of finding graphics designers comfortable to code in XSLT. I notice, too, that style is little mentioned in the online documentation and doesn't appear as a term in the index of the Langham/Ziegeler book. That makes me wonder if others either have doubts too about the style
Re: Using Cocoon from the command
Darren Petrie wrote: [alesan@valkyrie lib]$ pwd /home/alesan/java/jakarta-tomcat-4.1.12-LE-jdk14/webapps/cocoon/WEB-INF/lib [alesan@valkyrie lib]$ export CLASSPATH=.:/home/alesan/java/cocoon-2.0. .3/build/cocoon/classes/:avalon-framework-20020627.jar:avalon-excalibur-vm1 4-20020705.jar [alesan@valkyrie lib]$ java org.apache.cocoon.Main --help Apache Cocoon 2.0.3 Copyright (c) 1999-2002 Apache Software Foundation. All rights reserved. Usage: java org.apache.cocoon.Main [options] [targets] ok now it works. What a chaos however!!! bye as - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: link rel=
Jeremy Quinn wrote: what I do to deal with this kind of thing is to have a menu.xml structure, that is imported into all my pages via CInclude, then xslt mh, I've never understood the difference between Xinclude and Cinclude... (having been provided with the 'id' of the page via the sitemap) makes two structures from the menu.xml, 1) my html navigation 2) the meta links you mention. yes, cool; I would like to prepare accurate documentation about the way my website was built. This could also be a useful how-to for cocoon newbies. If you want to contribute, I'd accept some pieces of code from your xsl-transformations...! I also output rel=Chapter (of sub-pages) links so all nav can be done from the site nav toolbar. Mozilla also handles rel=Section and rel=SubSection. my data is rather simple so I don't need chapters and subchapters. Maybe I will use those features in the future, thank you! bye as - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XMLForm and dates
Hello, I use XMLForm and I want to put the today date in a form. The problem is that the today date has to be a String because the XMLForm simply display the value of the Bean class attribute. If this value is not a String, the date can't be read! But I want to store the today date in a Date format (because I have a timestamp format in my database). How to store the date in a Date type and display it like a String? How to do this?? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cinclude and sitemap parameters
Try like: map:match pattern=composite/** map:generate src=aggreate.xml / map:transform src=sample.xsl map:parameter name=uri value=cocoon:/{1} / /map:transform map:transform type=cinclude/ map:serialize/ /map:match sample.xsl ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:ci=http://apache.org/cocoon/include/1.0; version=1.0 xsl:output method=xml/ xsl:param name=uri/ xsl:template match=/ xsl:apply-templates select=page/ /xsl:template xsl:template match=page page cinclude:include src={$uri} ... / /page /xsl:template xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet good idea. but it invokes another transformation. given that the transformation could be chached, this should not matter too much. but it would be a good thing to be able to access the sitemap parameters within a resolver uri like that: cocoon:/{uri} ... this would denote the parameter uri or something like that... . -- Jakob __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLForm and dates
hat database are you using? I am using PostgreSQL 7.2. I resolve this problem setting the requiered field in the database with default value today. Antonio Gallardo El Martes, 12 de Noviembre de 2002 08:00, [EMAIL PROTECTED] escribió: Hello, I use XMLForm and I want to put the today date in a form. The problem is that the today date has to be a String because the XMLForm simply display the value of the Bean class attribute. If this value is not a String, the date can't be read! But I want to store the today date in a Date format (because I have a timestamp format in my database). How to store the date in a Date type and display it like a String? How to do this?? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Portal-fw tryout: IllegalStateException
Thanks for reply. In tomcat 4.1.12, however, it gets worse. Requesting http://localhost:8080/cocoon gives the following exception. I have been using a cvs 2.1-dev build of June 15; just wanna check out the new features, especially the portal framework, that may be added in latest cvs. Regards, KC HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:952) ... at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:479) root cause java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass0(Native Method) ... at java.lang.Thread.run(Thread.java:479) --- [EMAIL PROTECTED] wrote: I had the same problem. Try tomcat 4.1.12. Sylvain __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XMLForm and dates
I'm using MS SQL Server 2000. It means that you don't insert the date with the form but your database insert it automatically!? Sylvain -Message d'origine- De: Antonio Gallardo Rivera [mailto:agallardo;agsoftware.dnsalias.com] Date: mardi, 12. novembre 2002 15:14 À: [EMAIL PROTECTED] Objet: Re: XMLForm and dates hat database are you using? I am using PostgreSQL 7.2. I resolve this problem setting the requiered field in the database with default value today. Antonio Gallardo El Martes, 12 de Noviembre de 2002 08:00, [EMAIL PROTECTED] escribió: Hello, I use XMLForm and I want to put the today date in a form. The problem is that the today date has to be a String because the XMLForm simply display the value of the Bean class attribute. If this value is not a String, the date can't be read! But I want to store the today date in a Date format (because I have a timestamp format in my database). How to store the date in a Date type and display it like a String? How to do this?? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sending an xml document with POST
Hi, Is there a way to get an XML document from somewhere (xml stream in a normal pipeline) and POST it through an html form ? Or another way ? My issue is POSTing something to an XML database (Tamino) with the value of _process request parameter being the document's content. I tried to use xsl:copy in a stylesheet to fill this value but it did not work (missing and tags). I tried something with cinclude transformer but xalan grumbled about cinclude:include tag not being where it should... In fact I want to check the time processing improvement I get instead of using xml:db driver... this driver makes reads from database very slow compared to direct reads !! So what about writes ? :-) Thanks if you have an idea, otherwise don't worry. Have a nice day, just trying to improve my app... Babs __ Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing: javax.servlet.ServletException: Servlet.init()
Check that the user tomcat _is running as_ has write permission to webapps and tomcat/work - but I don't know who serviceconf makes as the user. If it's not the same user that you're logged in as, the chmod you did didn't help even besides the work dir. Also, it doesn't look like you did anything to the tomcat/lib/endorsed as mentioned in http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103121674125637w=2. Geoff --- Murray Cumming [EMAIL PROTECTED] wrote: On Tue, 2002-11-12 at 05:17, Geoff Howard wrote: Yes, that was the specific error that people were getting when the older jars distributed with the jdk were not properly overridden. http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103692889710176w=2 So do you see anything wrong in those installation notes? http://www.murrayc.com/temp/cocoon_install_notes.txt Clearly copying the jars has had some effect. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: enctype=multipart/form-data problem
It is already fixed in 2.0.3, the release version: private Hashtable readHeaders(TokenStream in) throws IOException { Hashtable headers = new Hashtable(); String hdrline = readln(in); while (!.equals(hdrline)) { StringTokenizer tokenizer = new StringTokenizer(hdrline); headers.put(tokenizer.nextToken( :).toLowerCase(), tokenizer.nextToken( :;)); // The extra tokenizer.hasMoreTokens() in headers.put // handles the filename= case IE6 submits for an empty // upload field. while (tokenizer.hasMoreTokens()) { headers.put(tokenizer.nextToken( ;=\), tokenizer.hasMoreTokens() ? tokenizer.nextToken(=\) : ); } hdrline = readln(in); } return headers; } --- Volker Schneider [EMAIL PROTECTED] wrote: Hi myself, this is a bug in MultipartParser.java in the readHeaders() method within Cocoon 2.0.2. When you define form name=form2 enctype=multipart/form-data method=post and you use a input name=uploadedfile type=file field, the header will contain: ...name=uploadedfile; filename= When filename is empty the StringTokenizer in readHeaders() will have no more tokens, but will get a nextToken() call. Here's an approach for a bug fix: ... while (tokenizer.hasMoreTokens()) { // old code // headers.put(tokenizer.nextToken( ;=\), // tokenizer.nextToken(=\)); // new code String key = tokenizer.nextToken( ;=\); String value = ; if (tokenizer.hasMoreTokens()) { value = tokenizer.nextToken(=\); } else { value = ; } headers.put(key, value); // end of new code } This helps unless the filename= is not followed by an additional attribute, but it helps for the moment. Please fix this bug, if it is not done yet. Best regards - Volker - -Original Message- From: Volker Schneider [mailto:volker.schneider;danet.de] Sent: Sonntag, 10. November 2002 22:32 To: [EMAIL PROTECTED] Subject: enctype=multipart/form-data problem Dear colleagues, if have a form and I want to upload a file from that form. When I define my form as form name=form2 enctype=multipart/form-data method=post the ordinary input fields will not be transferred. When I use method=get it works. Unfortunately I have to use the post method because I have to transfer a lot of data and I'm not sure, whether this is possible with the get method (because of limited URL length). Splitting the form is not possible, because I need the rest of the data too. Please help me, what can I do? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLForm and dates
El Martes, 12 de Noviembre de 2002 08:43, [EMAIL PROTECTED] escribió: I'm using MS SQL Server 2000. It means that you don't insert the date with the form but your database insert it automatically!? Yes. I mean create a default value for this. Then in the insert I omit to send a value for the date field and the database server make it for me. I am sure that in MS SQL Server must be a similar instruction to do that. Lets check the command for CREATE TABLE (or something similar) and how to create a default value for a date field. For example in PostgreSQL I write use: CREATE TABLE CanjeEstado ( can_id int4not null, tec_id int4not null default 1, usr_id int4not null, ces_tiempo timestamp not null default now(), primary key(can_id,tec_id), unique(can_id,tec_id), ); As you can see, the ces_tiempo is of type TIMESTAMP can not be null and there is a default value for the field tha is defined using the built-in function now(). Check for something similar in your database I am sure there must be a similar approach. Regards, Antonio Gallardo Sylvain -Message d'origine- De: Antonio Gallardo Rivera [mailto:agallardo;agsoftware.dnsalias.com] Date: mardi, 12. novembre 2002 15:14 À: [EMAIL PROTECTED] Objet: Re: XMLForm and dates hat database are you using? I am using PostgreSQL 7.2. I resolve this problem setting the requiered field in the database with default value today. Antonio Gallardo El Martes, 12 de Noviembre de 2002 08:00, [EMAIL PROTECTED] escribió: Hello, I use XMLForm and I want to put the today date in a form. The problem is that the today date has to be a String because the XMLForm simply display the value of the Bean class attribute. If this value is not a String, the date can't be read! But I want to store the today date in a Date format (because I have a timestamp format in my database). How to store the date in a Date type and display it like a String? How to do this?? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cinclude and sitemap parameters
yeah the question is what is then more efficient: the map:aggregate mechanics or a compiled xsp page I am only wondering since Ovidiu, on his weblog, states that map:aggregate is harmful. given that you can do dyamic includes with map:aggregate it is the question what is more performant... -- Jakob --- Geoff Howard [EMAIL PROTECTED] schrieb: IMHO it makes more sense to make aggreate.xml dynamic - a very simple xsp taking a parameter from the sitemap would do what you want and involves no further transforms beside the cinclude. Look into xsp. Geoff Howard --- Jakob Praher [EMAIL PROTECTED] wrote: Try like: map:match pattern=composite/** map:generate src=aggreate.xml / map:transform src=sample.xsl map:parameter name=uri value=cocoon:/{1} / /map:transform map:transform type=cinclude/ map:serialize/ /map:match sample.xsl ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:ci=http://apache.org/cocoon/include/1.0; version=1.0 xsl:output method=xml/ xsl:param name=uri/ xsl:template match=/ xsl:apply-templates select=page/ /xsl:template xsl:template match=page page cinclude:include src={$uri} ... / /page /xsl:template xsl:template match=* !-- remove element prefix (if any) -- xsl:element name={local-name()} !-- process attributes -- xsl:for-each select=@* !-- remove attribute prefix (if any) -- xsl:attribute name={local-name()} xsl:value-of select=./ /xsl:attribute /xsl:for-each xsl:apply-templates/ /xsl:element /xsl:template /xsl:stylesheet good idea. but it invokes another transformation. given that the transformation could be chached, this should not matter too much. but it would be a good thing to be able to access the sitemap parameters within a resolver uri like that: cocoon:/{uri} ... this would denote the parameter uri or something like that... . -- Jakob __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xsp-session : Bug with Cocoon? or Bug with programmer?
What version of cocoon are you using? Geoff --- Tom Place [EMAIL PROTECTED] wrote: After searching the created Java file (apologies for my earlier mistake), the request helper is the only place it could be trying to set the variable. For example the following XSP (entire file) : +-+ ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true page xsp-session:set-attribute name=fruitApple/xsp-session:set-attribute fruitxsp-session:get-attribute name=fruit//fruit /page /xsp:page +-+ Generates the following Java +-+ public class test_xsp extends XSPGenerator { static { dateCreated = 1037088922427L; dependencies = new File[]{ }; } /* Built-in parameters available for use */ // context- ServletContext // request- HttpServletRequest // response - HttpServletResponse // parameters - parameters defined in the sitemap /* User Class Declarations */ /** * Generate XML data. */ public void generate() throws SAXException, IOException, ProcessingException { this.contentHandler.startDocument(); AttributesImpl xspAttr = new AttributesImpl(); this.contentHandler.startPrefixMapping(xml, http://www.w3.org/XML/1998/namespace;); this.contentHandler.startPrefixMapping(xsp, http://apache.org/xsp;); this.contentHandler.startPrefixMapping(xsp-session, http://apache.org/xsp/session/2.0;); this.contentHandler.startElement(, page, page, xspAttr); xspAttr.clear(); this.characters(\n); XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); this.characters(\n); this.contentHandler.startElement(, fruit, fruit, xspAttr); xspAttr.clear(); XSPObjectHelper.xspExpr(contentHandler, XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(fruit), )); this.contentHandler.endElement(, fruit, fruit); this.characters(\n ); this.contentHandler.endElement(, page, page); this.contentHandler.endPrefixMapping(xml); this.contentHandler.endPrefixMapping(xsp); this.contentHandler.endPrefixMapping(xsp-session); this.contentHandler.endDocument(); } } +-+ So as you can see from the above the only place it is possible creating the session variable is XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); And this is where the rogue semicolon appears. I can remove the rogue semicolon by creating the String Apple and reverencing that string through xsp:expr tags. But this leads to a nullPointerException. I think that either I am being really dim with this or some powers that I can't control are at work here! Thanks for everyone's help so far Tom Place - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
null pointer exception in servlet
I'm having trouble with a recently set up cocoon instance, processing an example xml and xslt file. This seems to be happening inside Cocoon, so I am not sure how to fix it. org.apache.cocoon.ProcessingException: Exception during processing of http://jenny.myinfogenic.net/sitebuilder/simple.xsl: java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:211) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.transform(XSLTProcessorImpl.java:311) at jendvsl.web_post_xsl(jendvsl.java:87) Thanks. Jenny Brown - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Separation of concerns?
I have found it a great advantage to have someone who is a developer, not a designer, work with the designer to create the XSLT to produce a particular design. Most designers struggle with dynamic components and web-related efficiency concerns. The developer and designer working together usually produces a good rendition of the design, but adapted in a way that makes sense. Never let a pure designer produce your templates. I have a (multi-part) question about the suggested separation of concerns that it is proposed that Cocoon achieves. I would like to ask how Cocoon is being used in a production environment, specifically how does separation of roles work out. Does it actually work in practice? How easy is it in production settings to find graphics designers who are also fluent in XSLT? Aren't such bi-skilled people essential to achieve the implementation of the style concern? Or, in practice, are real designers and real XSLT coders working together on the XSLT stylesheets? I guess that the suspicion that is lurking at the back of my mind is that the confusion of concerns (to coin a phrase) is, to some extent, being shuffled off into the style box. Of course, that may be a signficant improvement over other workflows. I can see pretty clearly the cleanness of the current approach for programmers/administrators ... designers don't touch the content nor the sitemaps ... but I do have slight doubts about the cleanness of the style concern. Or maybe my doubt is about the realisticness of finding graphics designers comfortable to code in XSLT. I notice, too, that style is little mentioned in the online documentation and doesn't appear as a term in the index of the Langham/Ziegeler book. That makes me wonder if others either have doubts too about the style concern or, perhaps, haven't looked (yet?) in a detailed way at how this will work. I wonder if what has mostly been happening up to now is XSLT-coders dabbling with design? :) I would be interested in any stories about the reactions of pure graphics designers in a production setting when first faced with the Cocoon approach and how they and, I suspect, XSLT-programmer colleagues actually worked out a practical workflow. Andrew Watt - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The heights of genius are only measurable by the depths of stupidity. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing: javax.servlet.ServletException: Servlet.init()
Murray Cumming wrote: On Tue, 2002-11-12 at 05:17, Geoff Howard wrote: Yes, that was the specific error that people were getting when the older jars distributed with the jdk were not properly overridden. http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103692889710176w=2 So do you see anything wrong in those installation notes? http://www.murrayc.com/temp/cocoon_install_notes.txt Clearly copying the jars has had some effect. Murray For what its worth I finally pitched the rpms in favor of the Sun JWSDP package. I could not get soap running for the same dreaded error., and spent a week chasing xerces, endorsed libs, etc etc. Within five minutes of downloading jwsdp_1_0_01 I had a tomcat system running with soap then cocoon. I had installed both on NT side with tomcat 4 no problem. So There is something IMHO in the rpms . Although all my other apps worked fine.
Re: [ PHPGenerator ] Inital draft of PHPGenerator docs on Wiki
Hi there ! I made all the steps you sugest on your page and i got the following error : HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: bailout at net.php.servlet.send(Native Method) at net.php.servlet.service(servlet.java:188) at net.php.servlet.service(servlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) ... Any ideas ? Z. On Mon, 2002-11-11 at 22:47, Tony Collen wrote: http://outerthought.net/wiki/Wiki.jsp?page=PHPGenerator I've gone through the process myself up until make, and then I had to leave to work, so I made an educated guess as to what should happen afterwards. When I get home, I'll go through the rest and make sure the directions work. Could someone else with experience getting the PHPGenerator working please check my docs to make sure they're accurate? On a side note (to -dev), why is it PhpGenerator and not PHPGenerator? We have HTTPGenerator and SWFGenerator, so perhaps the file should be renamed to PHPGenerator for consistency's sake? Tony - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Linux is not user-friendly. It _is_ user-friendly. It is not ignorant-friendly and idiot-friendly. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Cocoon from the command
Darren Petrie wrote: unfortunately, I've talked too early. Althought an invocation with a simple --help parameter works, when I try it with all the arguments: $ java org.apache.cocoon.Main -c ~/java/jakarta-tomcat-4.1.12-LE-jdk14/webapps -d ~/lirc/cocoon/ -w /tmp/ -l ~/lirc/cocoon-log.txt -uINFO -f ~/lirc/uri-list Exception in thread main java.lang.NoClassDefFoundError: org/apache/log/Priority at org.apache.cocoon.Main.main(Main.java:312) I've tried to patch Manifest.mf in the sources and rebuild, but it's always the same... :( Why such a powerful interface, the command line, should be so difficult to use? bye, thank you... as - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ PHPGenerator ] Inital draft of PHPGenerator docs on Wiki
On 12 Nov 2002, Jose Borges Ferreira wrote: Hi there ! I made all the steps you sugest on your page and i got the following error : HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: bailout at net.php.servlet.send(Native Method) at net.php.servlet.service(servlet.java:188) at net.php.servlet.service(servlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) Off, nasty. I'll take a look at it when I have a chance. I wasn't able to get back to working on this last night. I'll keep you updated. Tony Tony Collen -- [EMAIL PROTECTED] College of Liberal Arts University of Minnesota, Minneapolis, West Bank - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
Jenny Brown wrote: I'm having trouble with a recently set up cocoon instance, processing an example xml and xslt file. This seems to be happening inside Cocoon, so I am not sure how to fix it. org.apache.cocoon.ProcessingException: Exception during processing of http://jenny.myinfogenic.net/sitebuilder/simple.xsl: Jenny I downloaded your two files simple.x?l to my own coccon installation and they run fine. I am running tomcat 4 and see you are on 3.3 .. Don't know what jdk you are using but it seems to be an installation prob as your xml is fine - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XSP from EJB?
Hello. I am new to Cocoon and XSP and was wondering if it is possible to use the XSP's on their own outside of the pipeline framework. More specifically would I be able to use a ServerPagesGenerator to process a XSP using ESQL to get an XML document from within a session bean? Currently we are constructing JDOM documents with the results of our SQL queries and returning these from our session beans. I was thinking XSP could offer a flexible means of doing this. If this is possible does this sound like a reasonable idea or are there other issues that I don't see at this time? In addition to this, is there any way of utilizing the connection pool defined in my app. server (I am using webLogic) rather than creating a cocoon connection pool? I would appreciate any comments, ideas, criticisms that anyone may have to offer. Regards, Eric - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Separation of concerns?
I've taken this approach in the past. I've found that it involves heavy (or at least essential) use of the document() function. This approach has been documented in a couple articles on XML.com. http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html http://www.xml.com/pub/a/2002/03/27/templatexslt.html But I learned there are apparently problems with use of the document() function in Cocoon, given current limitations with respect to caching. http://xml.apache.org/cocoon/faq/faq-xslt.html#faq-6 I was pleased to find Leigh Dodds' note on the Cocoon Wiki for metastylesheets. http://outerthought.net/wiki/Wiki.jsp?page=MetaStylesheets I'm now successfully using this approach in my current project to implement custom tag libraries in Cocoon without needing to use the document() function. However, I am wondering how much this approach really scales. I guess I will find out. I believe that putting XSLT into the hands of graphic designers and average Web developers does *not* achieve separation of concerns. Custom tag libraries is the way to go. XSP addresses that. But Cocoon appears yet to directly address the problem of implementing tag libraries *in XSLT*. Perhaps metastylesheets is the way to go. Or perhaps the document() function is the way to go, and the caching problems just need to get addressed. Or perhaps there is another approach that I haven't considered. In any case, this needs to be addressed, IMHO. It's also quite possible that this has been fully addressed and I just haven't seen it. In that case, I would appreciate a link to that discussion :-) Evan -Original Message- From: Luca Morandini [mailto:spectrum.morandini;ipzs.it] Sent: Tuesday, November 12, 2002 5:35 AM To: [EMAIL PROTECTED] Subject: R: Separation of concerns? Lorenzo, to ease the burden on your graphic designers, you could even build a sort of taglib with XML elements to be expanded by an appropriate XSL. I've done a lib which allows me to specify smart HTML without the need of XSL (well, it works behind the scenes)... here's an example: img src={insert-request-parameter:images-home}/blank.gif border=0 width=4/ I hope you got the idea :) Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Lorenzo De Sio [mailto:l.desio;w4b.it] Inviato: martedì 12 novembre 2002 12.35 A: '[EMAIL PROTECTED]' Oggetto: R: Separation of concerns? I think you pointed out quite a big issue, though from my point of view this is not such a problematic one. I currently work in a co-founded small company. We are 1 programmer, 1 HTML/graphic designer, 1 HTML/Flash developer, 1 junior developer which has no actual programming skills, but quickly learned HTML and XSL. You could ask: why Cocoon in such a small team? The answer is XSL itself. Currently, our application development work in the past few years (we are focused on small-medium businesses) has been mainly on e-commerce, data-driven, customer-updatable sites and, later, content management for small-to-medium publishing needs. We ended up in producing many, many times the same mini-applications, branding them differently each time. This led us (even on the ASP platform we were, and still mainly are, working on) to XSL. ASP already (no .NET) has a few underlooked features (XML serialization of a Recordset object to a Stream object, for example, which is quite fast and can support XSL transformation) which allowed us to separate the presentation layer from the content/logic one. This actually allowed me to totally drop the production of such applications to the junior programmer. He also benefits from the separation, by actually reusing 99% of the code (we embedded database write logic in a single library .asp file, the only required code changes are for changing SELECT queries), and by being able to personalize the look by only changing one XSL template file. This simple implementation of a XML/XSL separation, much simpler but similar to Cocoon's approach, already gave us these benefits. The next step, which we are experiencing in the development of quite a large e-learning site (with Cocoon), is to directly let the designers access the XSLs, by giving them the basic XSL skills required to do the job. I find that The XSL skills required are not really heavy. Heavy XSL skills are, in my opinion, required in working on complex structure transformations that come *before* the final, presentation-aimed XSL transformation. Our experience is that, instead, the final transformation deals 99% of the time with: a) a container with many rows of data (a master, which can be easily handled even with a simple xsl:for-each/; b) an item of data with many fiels (a detail). Such XSL-drive HTML renderings are done mostly using xsl:value-of/ inserted into traditional HTML markup and I found that even the HTML designer and
Re: null pointer exception in servlet
On Tue, 12 Nov 2002, Charles Brewster wrote: Jenny Brown wrote: I'm having trouble with a recently set up cocoon instance, processing an example xml and xslt file. This seems to be happening inside Cocoon, so I am not sure how to fix it. Jenny I downloaded your two files simple.xsl to my own coccon installation and they run fine. I am running tomcat 4 and see you are on 3.3 .. Don't know what jdk you are using but it seems to be an installation prob as your xml is fine I was pretty sure the XML was fine since it came from example code, but that doesn't help me much in solving my actual problem. I'm looking for why Cocoon is throwing a null pointer exception, as in, what do I even try to debug or look into to figure this out? I am running 1.4.0 jdk on a mandrake linux box: java version 1.4.0_01 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
Jenny Brown wrote: On Tue, 12 Nov 2002, Charles Brewster wrote: I was pretty sure the XML was fine since it came from example code, but that doesn't help me much in solving my actual problem. I'm looking for why Cocoon is throwing a null pointer exception, as in, what do I even try to debug or look into to figure this out? I am running 1.4.0 jdk on a mandrake linux box: java version 1.4.0_01 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode) A trivial point, not to be insulting, :-) but did you install the vm14 download version of cocoon built for 1.4.0 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
On Tue, 12 Nov 2002, Charles Brewster wrote: A trivial point, not to be insulting, :-) but did you install the vm14 download version of cocoon built for 1.4.0 Good question. I downloaded Cocoon-2.0.3 as a source tar/gzip. I then built it using the most recent version of ant. It built successfully and told me during build that it was built for 1.4 and wouldn't work with other versions. So... Hopefully that answers your question, as it is a rather important one. Thanks for any help. Jenny Brown - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: link rel=
Hello Alessio, Alessio Sangalli wrote: Joerg Heinicke wrote: Exactly the way I would do it. But beware: XSLTs are chached with their parameters. So it's interesting to know, how many pages you have or how big the XSLTs are. $ ls *.xml | wc -l 12 (to be honest two xml pages are only tests) $ wc -ml html.xsl 862055 html.xsl $ grep -c xsl:template html.xsl 13 the xsl file is rather small, 86 linees 2055 characters for 13 templates. that's ok ;-) It was more a general statement than a need for the numbers. Maybe it's an alternative to aggregate the XML source with the navigation XML. I don't understand this, could you explain? example of sitemap aggregation: map:match pattern=test map:aggregate element=page map:part src=navigation.xml/ map:part src=page-description.xml/ /map:aggregate map:transform src=xml2html.xsl/ map:serialize type=html/ /map:match Jeremy Quinn wrote: what I do to deal with this kind of thing is to have a menu.xml structure, that is imported into all my pages via CInclude, then xslt mh, I've never understood the difference between Xinclude and Cinclude... CInclude was an earlier implementation. Later the standard conform XInclude was implemented and the CInclude refactored. Now they have in general the same functionality AFAIK and somebody wanted to bring them to the same code and functionality (so that only the namespaces are different and both are usable and do the same). Regards, Joerg - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
Jenny Brown wrote: Good question. I downloaded Cocoon-2.0.3 as a source tar/gzip. I then built it using the most recent version of ant. It built successfully and told me during build that it was built for 1.4 and wouldn't work with other versions. So... Hopefully that answers your question, as it is a rather important one. That's ok. But did you read http://xml.apache.org/cocoon/installing/index.html Java 1.4 configuration?? Joerg - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xsp-session : Bug with Cocoon? or Bug with programmer?
Thanks for everyone's help with this. I was using cocoon 2.03 and when I downloaded a new copy, this bug seemed to disappear. Thanks anyway! Tom -Original Message- From: Geoff Howard [mailto:cocoongeoff;yahoo.com] Sent: 12 November 2002 15:46 To: [EMAIL PROTECTED] Subject: RE: xsp-session : Bug with Cocoon? or Bug with programmer? What version of cocoon are you using? Geoff --- Tom Place [EMAIL PROTECTED] wrote: After searching the created Java file (apologies for my earlier mistake), the request helper is the only place it could be trying to set the variable. For example the following XSP (entire file) : +-+ ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true page xsp-session:set-attribute name=fruitApple/xsp-session:set-attribute fruitxsp-session:get-attribute name=fruit//fruit /page /xsp:page +-+ Generates the following Java +-+ public class test_xsp extends XSPGenerator { static { dateCreated = 1037088922427L; dependencies = new File[]{ }; } /* Built-in parameters available for use */ // context- ServletContext // request- HttpServletRequest // response - HttpServletResponse // parameters - parameters defined in the sitemap /* User Class Declarations */ /** * Generate XML data. */ public void generate() throws SAXException, IOException, ProcessingException { this.contentHandler.startDocument(); AttributesImpl xspAttr = new AttributesImpl(); this.contentHandler.startPrefixMapping(xml, http://www.w3.org/XML/1998/namespace;); this.contentHandler.startPrefixMapping(xsp, http://apache.org/xsp;); this.contentHandler.startPrefixMapping(xsp-session, http://apache.org/xsp/session/2.0;); this.contentHandler.startElement(, page, page, xspAttr); xspAttr.clear(); this.characters(\n); XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); this.characters(\n); this.contentHandler.startElement(, fruit, fruit, xspAttr); xspAttr.clear(); XSPObjectHelper.xspExpr(contentHandler, XSPRequestHelper.getSessionAttribute(objectModel, String.valueOf(fruit), )); this.contentHandler.endElement(, fruit, fruit); this.characters(\n ); this.contentHandler.endElement(, page, page); this.contentHandler.endPrefixMapping(xml); this.contentHandler.endPrefixMapping(xsp); this.contentHandler.endPrefixMapping(xsp-session); this.contentHandler.endDocument(); } } +-+ So as you can see from the above the only place it is possible creating the session variable is XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf(fruit), this.characters(Apple); ); And this is where the rogue semicolon appears. I can remove the rogue semicolon by creating the String Apple and reverencing that string through xsp:expr tags. But this leads to a nullPointerException. I think that either I am being really dim with this or some powers that I can't control are at work here! Thanks for everyone's help so far Tom Place - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
I had indeed missed that step. I've done it now, but don't seem to be having any better results... same error. I'm not sure how to test that the /jre/lib/ changes actually took effect though. I did restart tomcat just in case. Here's the error I'm still getting: DEBUG 10371 [jendvsl ] (): XSLTProcessorImpl: transform source = org.apache.cocoon.components.source.URLSource@2c3327, stylesheet = org.apache.cocoon.components.source.URLSource@d24e3f, parameters = org.apache.avalon.framework.parameters.Parameters@f41e9, result = javax.xml.transform.stream.StreamResult@b05acd DEBUG 10371 [jendvsl ] (): Creating new Templates for http://jenny.myinfogenic.net/sitebuilder/simple.xsl DEBUG 10371 [jendvsl ] (): Source = org.apache.cocoon.components.source.URLSource@d24e3f, templatesHandler = org.apache.xalan.processor.StylesheetHandler@1989b5 java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) On Tue, 12 Nov 2002, Joerg Heinicke wrote: Jenny Brown wrote: Good question. I downloaded Cocoon-2.0.3 as a source tar/gzip. I then built it using the most recent version of ant. It built successfully and told me during build that it was built for 1.4 and wouldn't work with other versions. So... Hopefully that answers your question, as it is a rather important one. That's ok. But did you read http://xml.apache.org/cocoon/installing/index.html Java 1.4 configuration?? Joerg - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cocoon crashing
Hi , an hour ago I updated the sources from the cvs and now I run a build: build.bat -Dinclude.webapp.libs=yes -Dinclude.scratchpad.libs=yes webapp and after placing the war in the webapps dir and restarting Tomcat i get the following error while loading cocoon start page (note that I running on WinXP Pro PL and Tomcat 4.1.12.): HTTP Status 500 javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:952) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:509) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.createContentDispatcher(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.(XMLDocumentFragmentScannerImpl.java:248) at org.apache.xerces.impl.XMLDocumentScannerImpl.(XMLDocumentScannerImpl.java:245) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.(Unknown Source) at org.apache.xerces.parsers.IntegratedParserConfiguration.createDocumentScanner(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.(DTDConfiguration.java:366) at org.apache.xerces.parsers.StandardParserConfiguration.(StandardParserConfiguration.java:197) at org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown Source) at org.apache.xerces.parsers.IntegratedParserConfiguration.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:296) at java.lang.Class.newInstance(Class.java:249) at org.apache.xerces.util.ObjectFactory.newInstance(ObjectFactory.java:293) any ideas?? the idea is that I want to get the authentication classes to work (logging in, session handling et cetera) -- ilfrin mailto:ilfrin;box43.pl - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sunShine resource via cinclude or aggregate
Hello all, I'm trying to build up a web-application interface by separating the header and sidebar (menu of options) into different pipelines. Those two pipelines are built from resources and transformed with sunShine (session) and look like this: !-- Site construction resources: -- map:match pattern=sidebar map:generate src=docs/user-actions.xml/ map:transform type=sunShine/ map:transform src=stylesheets/actions2menu.xsl/ map:serialize type=xml/ /map:match map:match pattern=header map:generate src=docs/header.xml/ map:transform type=sunShine/ map:serialize type=xml/ /map:match If I request these resources directly, they resolve just fine and I get the exact XML output that I expect. But then I need to include them in the final page that the user will see in the web-app. I've tried two methods so far: using cinclude pointers in the main document and then using the cinclude transformer, or aggregating the parts on the sitemap. In both methods I get the exact same exception message. In both methods I'm also using the same URI to reference the parts: cocoon:/header and cocoon:/sidebar. I've also tried with two slashes: cocoon://header. So the best I can figure is that for some reason sunShine is having trouble doing it's resource-resolution when it is included in another request via the cocoon protocol as opposed to being requested on it's own. For anyone who thinks they might be able to help, the exception messages and stacktrace follow. Thanks a bunch. /S full exception chain stacktrace Original exception : java.lang.NullPointerException at org.apache.cocoon.sunshine.sunrise.context.SessionContextImpl.init(SessionContextImpl.java:107) at org.apache.cocoon.sunshine.sunrise.context.SessionContextProviderImpl.getSessionContext(SessionContextProviderImpl.java:97) at org.apache.cocoon.sunshine.SunShine.getReservedContext(SunShine.java:322) at org.apache.cocoon.sunshine.SunShine.getContext(SunShine.java:964) at org.apache.cocoon.sunshine.SunShine.streamContextFragment(SunShine.java:563) at org.apache.cocoon.sunshine.transformation.SunShinePreTransformer.startTransformingElement(SunShinePreTransformer.java:230) at org.apache.cocoon.sunshine.transformation.SunShinePostTransformer.startTransformingElement(SunShinePostTransformer.java:232) at org.apache.cocoon.transformation.AbstractSAXTransformer.startElement(AbstractSAXTransformer.java:326) at org.apache.cocoon.sunshine.transformation.SunShinePreTransformer.startElement(SunShinePreTransformer.java:201) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:126) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:219) at org.apache.cocoon.components.source.SitemapSource.toSAX(SitemapSource.java:353) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:148) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:399) at org.apache.cocoon.www.sitemap_xmap.matchN102E9(C:\Apache\Jakarta\jakarta-tomcat-4.1.12-LE-jdk14\work\Standalone\knuth\ideal\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3285) at org.apache.cocoon.www.sitemap_xmap.process(C:\Apache\Jakarta\jakarta-tomcat-4.1.12-LE-jdk14\work\Standalone\knuth\ideal\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1925) at org.apache.cocoon.www.sitemap_xmap.process(C:\Apache\Jakarta\jakarta-tomcat-4.1.12-LE-jdk14\work\Standalone\knuth\ideal\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1825) at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at
Re: link rel=
Joerg Heinicke wrote: that's ok ;-) It was more a general statement than a need for the numbers. :) ok I wanted to be precise! Maybe it's an alternative to aggregate the XML source with the navigation XML. I don't understand this, could you explain? example of sitemap aggregation: I use Mozilla 1.2b. When I quote xml code it doesn't appear. Is this a know bug? Back to aggragation: I see I can use it like a 'multiple generator' now I should read the docs/references. There is not so much difference than a Xinclude I think, and I'm going to (hopefully) use Cocoon by command line to generate static html, pdf, so performance isn't a key feature. Many thanks, this discussion clarified my ideas! bye as - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: link rel=
I use Mozilla 1.2b. When I quote xml code it doesn't appear. Is this a know bug? Hmm, what exactly do you mean? You request an XML page, but you don't see anything? Mozilla has no built-in stylesheet by default like IE. But you can see the source of the document (Ctrl + u). Joerg - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon and Cold Fusion
Is there a good way to integrate Cocoon and Cold Fusion or should I run Cocoon and its own and just have links from my Cold Fusion page to my XSLT pages? __ Christopher A Perrin, Chief Architect Office: 913-599-1600x231 / Fax: 913-599-2084 PS Holdings, L.L.C. Integrated Automotive Parts Fulfillment and Total Loss Network http://www.planetsalvage.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception in servlet
Jenny Brown wrote: I had indeed missed that step. I've done it now, but don't seem to be having any better results... same error. I'm not sure how to test that the /jre/lib/ changes actually took effect though. I did restart tomcat just in case. snip Also, make sure to delete the contents of the tomcat work directory before you restart tomcat. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tables in PDF
Hi: Can somebody send me an example XLS-FO file (formating objects) that generate tables in .pdf file? Or a XSL-FO tutorial applied, with good examples... Thanks in advance. Carlos Marcelo Santos. [EMAIL PROTECTED] www.3pilares.com Buenos Aires. Argentina. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tables in PDF
Check this: http://www.xml.com/pub/a/2001/01/17/xsl-fo/index.html http://www.dpawson.co.uk/xsl/sect3/index.html http://www.ibiblio.org/xml/books/bible2/chapters/ch18.html It helps me to resolve my problems. :-D Antonio Gallardo Carlos Marcelo Santos dijo: Hi: Can somebody send me an example XLS-FO file (formating objects) that generate tables in .pdf file? Or a XSL-FO tutorial applied, with good examples... Thanks in advance. Carlos Marcelo Santos. [EMAIL PROTECTED] www.3pilares.com Buenos Aires. Argentina. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need example of modular db select at work
Is there anyone that can provide a working example of the modular db select. An addtional bonus would be to see how to get at the values output from the action in the sitemap. Thanks, Phil - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need example of accessing request attributes in the sitemap
Can anyone provide a working sample of accessing any request attributes in the sitemap? Thanks, Phil - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLForm and dates
Try the following: Use a Date property with its own getter and setter for the database access. Implement an extra property named dateString. Then write the getter of the property to convert the Date object into String when invoked. Also write a setter to convert a string to a date. The Java DateFormat class can help. http://java.sun.com/j2se/1.3/docs/api/java/text/DateFormat.html In your XMLForm documents refer to the dateString property, instead of the date property. In your Java code, use the date property. Hope this helps. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 12, 2002 8:00 AM Subject: XMLForm and dates Hello, I use XMLForm and I want to put the today date in a form. The problem is that the today date has to be a String because the XMLForm simply display the value of the Bean class attribute. If this value is not a String, the date can't be read! But I want to store the today date in a Date format (because I have a timestamp format in my database). How to store the date in a Date type and display it like a String? How to do this?? Thank you Sylvain - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need example of modular db select at work
Check the examples of mod-db in your Cocoon installation. Antonio Gallardo Is there anyone that can provide a working example of the modular db select. An addtional bonus would be to see how to get at the values output from the action in the sitemap. Thanks, Phil - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need example of modular db select at work
Right, those are great, but i need an example of the select at work and can't seem to find one. On Tuesday 12 November 2002 09:21 pm, Antonio Gallardo R. wrote: Check the examples of mod-db in your Cocoon installation. Antonio Gallardo Is there anyone that can provide a working example of the modular db select. An addtional bonus would be to see how to get at the values output from the action in the sitemap. Thanks, Phil - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon Portal - User Roles
Hi Matthew, If I understand it right, I have to change thesunrise-newrole.xml into something that the sql transformer would understand and remove the cinclude and writesource transformer on the pipeline? In this case... Whats the advantage of using transformer than an action? In the end of this map:matchpattern it is returning an xml like this... ?xml version="1.0" encoding="UTF-8" ? - !-- $Id: sunrise-newrole.xml,v 1.1 2002/06/03 11:45:54 cziegeler Exp $ Description: Add a new role-- - addrole xmlns:source="http://apache.org/cocoon/source/1.0" xmlns:session="http://cocoon.apache.org/session/1.0" - sourceResult executionsuccess/execution messagecontent inserted at: roles/message behaviourinsert/behaviour actionoverwritten/action sourcefile:/C:/ApacheGroup/Tomcat4.1/webapps/cocoon/myportal/resources/sunrise-roles.xml/source serializerxml/serializer /sourceResult /addrole If I'd use an action, do I have to serialized these kinds of xml? And can you tell me where the sunrise-newrole resource is being called and returned to? Thanks again. Richard - Original Message - From: Matthew Langham To: [EMAIL PROTECTED] Sent: Tuesday, November 12, 2002 8:16 PM Subject: RE: Cocoon Portal - User Roles Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? You need to take a look at the file sunrise-newrole.xml. That file contains most of the dirty work. The transformers session, cinclude and writesource act on the information contained in there. Because sunrise-newrole.xml also flows through the pipeline it is then formatted by the stylesheet and returned to the browser. It is serialized to xml because it is being used inside the portal (in this case). If you wanted to write this to a database you would need to change the sunrise-newrole.xml and use the sqltransformer instead of cinclude and write-source. In all this should take you around 5 minutes or less to adapt. :-) So it really is quite simple really. Matthew --Open Source Group Cocoon { Consulting, Training, Projects }=Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 PaderbornTel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de-Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20Weblog: http://radio.weblogs.com/0103021/= -Original Message-From: Richard Reyes [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 12, 2002 12:53 PMTo: cocoon-usersSubject: RE: Cocoon Portal - User Roles Hi Matthew / Guys, Just want to confirm some things Since the the "new role" function in the portal sample is mapped to new-role uri="cocoon:raw:/sunrise-newrole"/ uri, it is using this sitemap snippet right? map:match pattern="sunrise*" map:generate src="resources/sunrise{1}.xml"/ map:transform type="session"/ map:transform type="cinclude"/ map:transform type="write-source"/ map:transform src="styles/portal.xsl"/ map:serialize type="xml"/ /map:match and the documentations says that The new-role resource creates a new role in the system. It gets the parameters "type" with the value "role" and "role" with the new rolename. Where is the "type" and "role" parameter? and why does it have to serialized in an xml type in the end? Also, for the sunrise-newrole resource,the only thing this pipeline does is save a new role in the xml file (sunrise-roles.xml )? whose responsible for displaying the next page after saving the new role? And since this sitemap snippet is called inside a map:pipeline internal only clause I think it is being called by the portal generator or action. If in case I'd used custom actions over this