Cocoon and cokies
Hi all we have introduced a new Intranet portal framework in our organization (very successful for around 3000+ users). This portal framework is based on two components. Cocoon2 and Livelink (a CMS from Opentext). We use Livelink as the data entry tool for users. Livelink is already well known in the organization so we reuse this tool. As Livelink offers a function to export metadata to XML we use this and publish the relevant data to the Cocoon2 environment. This is a real publishing process, content managers maintain data and at one point in time they publish. So we publish the data on demand and present on the portal whatever we do with the data using XSLT (and other features from Cocoon). The export of the data can be triggered by using http request from any browser. Something like: http://livelink/id=12345objaction=xmlexportscope=subattributeinfo. This generates a XML file (if already logged in). If I am not logged into Livelink, I get a prompt and can provide my username/password. Livelink uses cockie to handle the session and priviliges. I can also provide username/password in the URI http://livelink/func=ll.loginusername=XXXpassword=YYY. This works from a browser. Livelink is recognizing the request does a login, sets the cockie at the client browser by sending a page using the meta tag redirect. As we have such a great success in using this framework (Thanks to all of you who have participated in building Cocoon2!!!) we now want to go a step further and generate the XML file on request by the portal user. So the sitemap shall have an entry like map:aggregate element=live map:part src=http://livelink/livelink.exe?func=ll.loginamp;username=xxxamp;password=yyy/ map:part src=http://livelink/livelink.exe?func=llamp;objAction=XMLExportamp;objId=6152797amp;attributeinfoamp;scope=one/ /map:aggregate This is working when sending these two http requests from an browser, with the first request setting the cockie, so the second request gets 'through'. I have no idea on how we would do this in using Cocoon2. Any idea? How can Cocoon handle cockies? Does anyone know? Thanks for any help Thomas Ruth [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon and cokies
Thomas, I know this will sound rather naive but... did you look into the cookie logicsheet ? Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Ruth, Thomas {PDBI~Basel} [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 04, 2002 6:10 PM To: '[EMAIL PROTECTED]' Subject: Cocoon and cokies Hi all we have introduced a new Intranet portal framework in our organization (very successful for around 3000+ users). This portal framework is based on two components. Cocoon2 and Livelink (a CMS from Opentext). We use Livelink as the data entry tool for users. Livelink is already well known in the organization so we reuse this tool. As Livelink offers a function to export metadata to XML we use this and publish the relevant data to the Cocoon2 environment. This is a real publishing process, content managers maintain data and at one point in time they publish. So we publish the data on demand and present on the portal whatever we do with the data using XSLT (and other features from Cocoon). The export of the data can be triggered by using http request from any browser. Something like: http://livelink/id=12345objaction=xmlexportscope=subattributein fo. This generates a XML file (if already logged in). If I am not logged into Livelink, I get a prompt and can provide my username/password. Livelink uses cockie to handle the session and priviliges. I can also provide username/password in the URI http://livelink/func=ll.loginusername=XXXpassword=YYY. This works from a browser. Livelink is recognizing the request does a login, sets the cockie at the client browser by sending a page using the meta tag redirect. As we have such a great success in using this framework (Thanks to all of you who have participated in building Cocoon2!!!) we now want to go a step further and generate the XML file on request by the portal user. So the sitemap shall have an entry like map:aggregate element=live map:part src=http://livelink/livelink.exe?func=ll.loginamp;username=xxxa mp;password=yyy/ map:part src=http://livelink/livelink.exe?func=llamp;objAction=XMLExport; amp;objId=6152797amp;attributeinfoamp;scope=one/ /map:aggregate This is working when sending these two http requests from an browser, with the first request setting the cockie, so the second request gets 'through'. I have no idea on how we would do this in using Cocoon2. Any idea? How can Cocoon handle cockies? Does anyone know? Thanks for any help Thomas Ruth [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [esql] Nesting after INSERT (result or no-result)?
On 04.May.2002 -- 06:50 PM, von Schwerdtner, Thomas (GXS, FPI) wrote: I'm doing something wrong here but I cannot find answers in the mailing list or in the docs. I simply want to run a SELECT after an INSERT has completed, but neither esql:resutls or esql:no-results seem to get triggered. Referencing the following, the INSERT statement suceeds just fine, but I get nothing from either results or no-results. Try esql:update-results/ for successful and esql:no-results/ for unsuccessful inserts. BTW I prefer actions for data manipulation and esql for queries. 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSP + Dynamic XML generator ??
Can you use 2 transforms instead ie: genXML -- XSLT -- XSLT -- Serialize ? or does the XSP draw from another data - source .. just kind of soundslike you want to re arrange your data then transform ?? could be wrong too :) -Original Message- From: Zack Angelo [mailto:[EMAIL PROTECTED]] Sent: Sunday, 5 May 2002 8:45 AM To: [EMAIL PROTECTED] Subject: Re: XSP + Dynamic XML generator ?? Chris, Generally speaking, you don't use XSP to transform XML that has already been generated, you use it generate XML in the first place. So it seems that you'd want to follow the typical pipeline layout, generate your XML with XSP based on parameters gathered from your datasource (perhaps via esql or some embedded java code). Then apply a stylesheet to that and serialize it. So, XSP-XSLT-Serialize. I'm sorry if I'm completely off, I don't quite get what you're trying to do. -Zack On 5/3/02 2:03 PM, Chris Wolf [EMAIL PROTECTED] wrote: I am working on a project where we have a datasource which produces XML based on certain parameters. I would like to use this as input to an XSP page which defines overall content structure (semantics) then, finally, apply a stylsheet appropriate for the invoking client. Problem: It seems that a pipeline must start with one, and only one Generator. The problem is that if I create an implementation of Generator which produces the XML, then I cannot use XSP (since the XSP code handler is itself a Generator). I then tried to implement the XML generator from an XSP page by invoking a method using xsp:expr, but then the whole document is treated as a single string. What I would like to do is some thig like: Ideas anyone? +---+ | XML Generator | +--++ | v +---+ | XSP structure | +--++ | +--v---+ | XSL presentation | +--+---+ | +--v+ | Serializer| +---+ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing cocoon
Conrad, Thanks by your attention !!! I would like a lot of if you returned your steps to install the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4. So, like you have more experience with this softwares, I would like to know if this is a better option to convert files xml to pdf !?!?! Do you have some examples about this ?!?! Thanks, one more time !! Robert Conrad F. D'Cruz wrote: Bobrs, Yes I struggled with that one too. You will have to download the cocoon-2.0.2-src.zip and that's where you will find the missing pieces. I did have trouble with J2DK1.4 ... so I backtracked to jdk1.3 + tomcat 4.0.1 + cocoon 2.0.1 and everything worked okay. I am planning on revisiting the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4 install sometime next week and I will document the steps (and/or frustrations and email them to you.) Hope that helps. Conrad - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Try this Re: Can't connect to MySQL with Cocoon 2
Daniel, Maybe I don't understand using databases with Cocoon after all. Are you using the database for logging? If not why did you define it in the jdbc block in the xconf file that way (as a logger)? Here is what I did to get it working (and I got these steps from the userdocs) 1) I put the mysql.jar file (which contains the mysql jdbc driver) in the tomcat4.01/lib directory. I vaguely remember having trouble when it was in the cocoon/WEB-INF/lib ... and once it started working I did not complain or spend additional time researching why it failed down in the lower directory. 2) I created a jdbc block in the cocoon.xconf file as follows ... jdbc name=mysql_pool pool-controller min=5 max=10/ dburljdbc:mysql://localhost/mydb/dburl userroot/user password/password /jdbc where ... mydb is the (very creative) name I chose for the database. 3) In the webapps/cocoon/WEB-INF directory ... I put the following in the web.xml file ... init-param param-nameload-class/param-name param-value !-- For MySQL on localhost-- org.gjt.mm.mysql.Driver !-- For JDBC-ODBC Bridge: -- sun.jdbc.odbc.JdbcOdbcDriver !-- For parent ComponentManager sample: org.apache.cocoon.samples.parentcm.Configurator -- /param-value /init-param 4) Finally I use the mysql_pool, as follows In the sitemap ... within the map:pipelinethe transformer looks like this map:transform type=sql map:parameter name=use-connection value=mysql_pool/ 5) In the content source file for the map:generator component I have this code ... (note there is more than just this code in the file. In the interest of space I am just showing the sql stuff) execute-query xmlns=http://apache.org/cocoon/SQL/2.0; query select * from emp where name='Conrad' /query /execute-query (of course there was a table named emp in mydb ... and it was set up correctly and I made sure there was data in that table -- I verified everything from the mysql console) ... then I fired up Cocoon (and prayed for a miracle!!). The C2 gods must have been pleased with me that day ... because ... it worked!!! I, however, did not have a bottle of champagne when I saw the data in my browser ... but it worked!! and I was not going to complain about format etc etc. That is the topic for another bottle of champagne :) Hope that helps Conrad [EMAIL PROTECTED] wrote: Hello all, I have a problem connecting to a MySQL database with Cocoon. When I try to access a page that goes through the SQLTransformer, the browser doesn't deliver any result. There's no error message, the browser just sits there and waits for data. The Coccon core.log file contains an error message No valid Jdbc Connection class available. (More details follow below.) I've checked Google, the mailing list archive, and the FAQs, but didn't find anything that seemed to help. I'm surely missing something; aynone out there can help me? Thanks, Daniel - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing cocoon
Robert, I would not classify myself as a C2 expert by any long shot. I have been bloodying my nose on Cocoon for about 5 months. Every day is a new experience ... every step is a new experience. If I succeed in the install I will send you the steps. If I fail ... you will hear about that too!! By the time I get done mastering Cocoon 2.0 maybe I will become a philosopher :) Conrad Bobrs wrote: Conrad, Thanks by your attention !!! I would like a lot of if you returned your steps to install the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4. So, like you have more experience with this softwares, I would like to know if this is a better option to convert files xml to pdf !?!?! Do you have some examples about this ?!?! Thanks, one more time !! Robert Conrad F. D'Cruz wrote: Bobrs, Yes I struggled with that one too. You will have to download the cocoon-2.0.2-src.zip and that's where you will find the missing pieces. I did have trouble with J2DK1.4 ... so I backtracked to jdk1.3 + tomcat 4.0.1 + cocoon 2.0.1 and everything worked okay. I am planning on revisiting the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4 install sometime next week and I will document the steps (and/or frustrations and email them to you.) Hope that helps. Conrad - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't connect to MySQL with Cocoon 2
Hello Zack, Apparently a lot of people have been having trouble getting mySQL+C2 to work with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH. Thanks; that solves it. With IBM's JDK 1.3 my setup worked right away. The reason I used JDK 1.4 is because I don't run X. According to the FAQ, only JDK 1.4 can run in 'headless' mode, and indeed with JDK 1.3 Cocoon doesn't start unless I also run X. So my problem is solved for now, but I'm hoping for a better long-term solution (i.e., no X, and still MySQL access). Thanks everyone! Sincerely, Daniel [original problem was:] I have a problem connecting to a MySQL database with Cocoon. When I try to access a page that goes through the SQLTransformer, the browser doesn't deliver any result. There's no error message, the browser just sits there and waits for data. The Coccon core.log file contains an error message No valid Jdbc Connection class available. (More details follow below.) I've checked Google, the mailing list archive, and the FAQs, but didn't find anything that seemed to help. I'm surely missing something; aynone out there can help me? [snip] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing cocoon
Have you all read the installation instructions? Getting it to work in 4.0.3 is a pain. Either be happy with 4.0.1 or go to 4.0.4b2 both of which are easy. I'd consider tomcat 4.0.2/3 duds overall anyhow. I've not had time to really look into what exactly is wrong with them, but things tend not to work in them that work elsewhere. Be advised that jdk 1.4 breaks database code. You'll have to create special compiles of avalon components to get that puppy to fly. Sun feels this only effects database vendors -Andy On Sun, 2002-05-05 at 09:36, Conrad F. D'Cruz wrote: Robert, I would not classify myself as a C2 expert by any long shot. I have been bloodying my nose on Cocoon for about 5 months. Every day is a new experience ... every step is a new experience. If I succeed in the install I will send you the steps. If I fail ... you will hear about that too!! By the time I get done mastering Cocoon 2.0 maybe I will become a philosopher :) Conrad Bobrs wrote: Conrad, Thanks by your attention !!! I would like a lot of if you returned your steps to install the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4. So, like you have more experience with this softwares, I would like to know if this is a better option to convert files xml to pdf !?!?! Do you have some examples about this ?!?! Thanks, one more time !! Robert Conrad F. D'Cruz wrote: Bobrs, Yes I struggled with that one too. You will have to download the cocoon-2.0.2-src.zip and that's where you will find the missing pieces. I did have trouble with J2DK1.4 ... so I backtracked to jdk1.3 + tomcat 4.0.1 + cocoon 2.0.1 and everything worked okay. I am planning on revisiting the 4.0.3 + cocoon 2.0.2 + j2sdk 1.4 install sometime next week and I will document the steps (and/or frustrations and email them to you.) Hope that helps. Conrad - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.superlinksoftware.com - software solutions for business http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in Java http://krysalis.sourceforge.net/centipede - the best build/project structure a guy/gal could have! - Make Ant simple on complex Projects! The avalanche has already started. It is too late for the pebbles to vote. -Ambassador Kosh - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't connect to MySQL with Cocoon 2
You can install *headless X* (Xvfb) which is BTW faster than X. Or you can just *not* install Batik (delete the batik jar and compile cocoon). The samples may have to be tweaked not to use Batik, but it will work. Lastly if you're really industrious you can use PJAbut I couldn't get the sucker to work with jdk 1.3.1. -Andy On Sun, 2002-05-05 at 10:03, Daniel Vogelheim wrote: Hello Zack, Apparently a lot of people have been having trouble getting mySQL+C2 to work with the 1.4 JDK. I'd try 1.3 and see if that helps any. HTH. Thanks; that solves it. With IBM's JDK 1.3 my setup worked right away. The reason I used JDK 1.4 is because I don't run X. According to the FAQ, only JDK 1.4 can run in 'headless' mode, and indeed with JDK 1.3 Cocoon doesn't start unless I also run X. So my problem is solved for now, but I'm hoping for a better long-term solution (i.e., no X, and still MySQL access). Thanks everyone! Sincerely, Daniel [original problem was:] I have a problem connecting to a MySQL database with Cocoon. When I try to access a page that goes through the SQLTransformer, the browser doesn't deliver any result. There's no error message, the browser just sits there and waits for data. The Coccon core.log file contains an error message No valid Jdbc Connection class available. (More details follow below.) I've checked Google, the mailing list archive, and the FAQs, but didn't find anything that seemed to help. I'm surely missing something; aynone out there can help me? [snip] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.superlinksoftware.com - software solutions for business http://jakarta.apache.org/poi - Excel/Word/OLE 2 Compound Document in Java http://krysalis.sourceforge.net/centipede - the best build/project structure a guy/gal could have! - Make Ant simple on complex Projects! The avalanche has already started. It is too late for the pebbles to vote. -Ambassador Kosh - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ESQL Update problem
I have been developing an application for a few months now and up till now I haven't need to use the SQL UPDATE command, but when I added the code below to a logicsheet today... esql:execute-query esql:queryUPDATE item set number='xsp:exprbase.xsl:value-of select=@type//xsp:expr' where tech_id='xsp:exprtech/xsp:expr' and player_id='xsp:exprplayer/xsp:expr'/esql:query esql:results esql:row-results updateupdate complete/update /esql:row-results /esql:results /esql:execute-query Cocoon seems to ignore the code? I don't think it is a cacheing problem as I emptied the work folder and re-tried it. It just appears to ignore the code. Can anyone help? Sharat Koya WinXP, MySQL 3.23, cocoon 2.02, Java 1.3 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ESQL Update problem
[EMAIL PROTECTED] wrote: I have been developing an application for a few months now and up till now I haven't need to use the SQL UPDATE command, but when I added the code below to a logicsheet today... esql:execute-query esql:queryUPDATE item set number='xsp:exprbase.xsl:value-of select=@type//xsp:expr' where tech_id='xsp:exprtech/xsp:expr' and player_id='xsp:exprplayer/xsp:expr'/esql:query esql:results esql:row-results updateupdate complete/update /esql:row-results /esql:results /esql:execute-query Cocoon seems to ignore the code? I don't think it is a cacheing problem as I emptied the work folder and re-tried it. It just appears to ignore the code. Can anyone help? Please see my reply to Thomas von Schwerdtner [esql] Nesting after INSERT... Basically, you want to use esql:update-results/ HTH Chris. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSP + Dynamic XML generator ??
One line for you: http://localhost:8080/cocoon/sub/xsp-cocoon Other samples might be useful too. PS Why not use xsp, then xinclude your xml and xslt as necessary? Vadim -- Resistance is futile. From: Chris Wolf [mailto:[EMAIL PROTECTED]] I am working on a project where we have a datasource which produces XML based on certain parameters. I would like to use this as input to an XSP page which defines overall content structure (semantics) then, finally, apply a stylsheet appropriate for the invoking client. Problem: It seems that a pipeline must start with one, and only one Generator. The problem is that if I create an implementation of Generator which produces the XML, then I cannot use XSP (since the XSP code handler is itself a Generator). I then tried to implement the XML generator from an XSP page by invoking a method using xsp:expr, but then the whole document is treated as a single string. What I would like to do is some thig like: Ideas anyone? +---+ | XML Generator | +--++ | v +---+ | XSP structure | +--++ | +--v---+ | XSL presentation | +--+---+ | +--v+ | Serializer| +---+ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
have serialized xml use doctype?
I'm generating XML that is to be fetched by an external browser. In the serialized XML file, I need it to specify a DTD to use.how do I do it? I've tried doing [CDATA[ !doctype ... ]] .and just the doctype by itself (which throws a transform exception). Any ideas? TIA. -Zack - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: have serialized xml use doctype?
Zack Angelo wrote: I'm generating XML that is to be fetched by an external browser. In the serialized XML file, I need it to specify a DTD to use.how do I do it? Check the xsl:output element http://www.w3.org/TR/xslt#output add doctype-system and doctype-public as needed. J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon 2, Batik, URL encoding, bug? (long-ish, sorry)
Hello, I have a problem with non-English letters in URLs. I suspect it's a bug, but I'm not sure where exactly the problem is. So I think it's best to give a description of what I'm doing: I want to automatically create text buttons with Batik: First, I create the graphics in StarOffice and save it as .svg file. The Cocoon pipeline then reads this, a simple XSLT script exchanges the text in the .svg file with part of the URL, and then Batik renders it as JPEG. The corresponding pipeline definition looks like this: map:pipeline map:match pattern=xxx/auto-img/*/*.jpg map:generate src=xxx/auto-img/{1}.svg/ map:transform src=xxx/auto-img/auto-img.xsl type=xslt map:parameter name=text value={2}/ /map:transform map:serialize type=svg2jpeg/ /map:match The auto-img.xsl is a dead simple script consisting of the well-known XSLT copy rule, and one other rules which exchanges the text REPLACE with {$text}. Result: The url xxx/auto-img/button/Hello%20World.jpg delivers a fancy graphical button based on button.svg, saying Hello World. I use this from another style sheet which reads elements menu href=target.htmldescription/menu and translates them into: a href=target.html img src=xxx/auto-img/button/description.jpg/ /a Result: Nice looking graphical menus with very little effort. All of this actually works, and took me only 1.5 hours. :-))) But the problem is... it doesn't work with non-ASCII letters. E.g. if my text contains German Umlauts (vowels a,o,u with two dots on them), the resulting button displays two arbitrary characters. I suspect what goes bad is the URL encoding (i.e. encoding 'special' characters as %xx escape sequences). I think at some point the string gets converted into URLs using UTF-8, but elsewhere gets decoded in some 8-bit character set. Thus, I get two garbage characters where I expected my Umlaut. My questions are: - How does Cocoon encode URLs? As UTF-8, with %xx escapes? - I would think this to be a common problem. Are there URL-encoding/decoding methods available in XSLT that I could use to manually solve the problem? (I checked the XSLT standard, and it doesn't have this. I also checked the library of extension functions on the Xalan page.) - How can I find out where the encoding (or decoding) actually goes wrong? So far, I can only see the outcome, but I don't know how to do debugging on this. Thanks for all answers... Sincerely, Daniel P.S.: I noticed that in my setup Batik has terrible kerning problems: All characters are of equals width! 'i' and 'l' leave huge gaps, and 'm' overlaps with following letters. Is this a known problem of Batik, or is maybe something wrong with my environment? (e.g. fonts?) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't connect to MySQL with Cocoon 2
Hello, You can install *headless X* (Xvfb) which is BTW faster than X. Yes, I had already discovered this in the FAQ, but had hoped to get away without. I'll first try the configuration that Conrad F. D'Cruz sent (btw, thanks Conrad!), to make sure I can't fix it in my configuration. If that doesn't work, I will install Xvfb. Either way, I think that problem is solved. Or you can just *not* install Batik (delete the batik jar and compile cocoon). The samples may have to be tweaked not to use Batik, but it will work. ... but I _want_ to use Batik. And MySQL. But not X! ;-) Thanks. Sincerely, Daniel - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: have serialized xml use doctype?
Thanks for the link. Xalan/C2 doesn't seem to like xsl:output doctype-public=... too much. However, the page you posted let me to another solution that works as well: xsl:text disable-output-escaping=yes ![CDATA[ !DOCTYPE ... ]] /xsl:text ...hope that helps anyone that might be having the same problem. -Zack -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 05, 2002 3:43 PM To: [EMAIL PROTECTED] Subject: Re: have serialized xml use doctype? Zack Angelo wrote: I'm generating XML that is to be fetched by an external browser. In the serialized XML file, I need it to specify a DTD to use.how do I do it? Check the xsl:output element http://www.w3.org/TR/xslt#output add doctype-system and doctype-public as needed. J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A SOAP Transformer?
Dear Cocoon Users: Does it make sense that a SOAP Transformer could be added to the Cocoon arsenal? An incoming XML doc would contain the URL of the web service to be accessed, perhaps also necessary authentication information, and the SOAP body. The SOAP Transformer would simply send the message, and insert the response into the document stream. Does this make sense as a useful component? Or are there some hidden issues that would introduce complexity? Steve Punte [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon and DocBook?
I bet that's not cocoon problem but the stylesheet you are using and Xalan. I bet that the next line after org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.RuntimeException: 2 = 2 is something like: at org.apache.xalan. Check your stylesheet for problems or change Xalan version. Vadim -- Resistance is futile. From: Michael Cortez [mailto:[EMAIL PROTECTED]] I've browsed a bit through the archives, but I haven't found much on this -- so here goes. I'm using Cocoon with DocBook, and Norman Walsh's DocBook 1.50 HTML style sheets. I've been able to successfully render trivial DocBook Articles, but can't get cocoon to render and DocBook books. Attached below are the relevant DocBook files, sitemap info and error message. Both DocBook XML files render fine outside of cocoon with my normal DocBook tool chain, so I'm relatively sure the problem has something to do with setting it up with cocoon. Any Suggestions would be greatly appreciated. = My setup in sitemap.xmap: ... map:match pattern=noagg.htm map:generate src=ogc/test.xml/ map:transform src=ogc/docbook/html/docbook.xsl/ map:serialize type=html/ /map:match ... = When test.xml is this article, it renders correctly: ... article titleFlare Pebbles/title para A bag of twenty pebbles. Each is enchanted with a cantrip. When thrown against a target, the pebble flares to a bright light on impoact, casuing the target to suffer a -1 penalty on attack rolls for 1 minute. (DC13 for Fortitude saving throw to negate.) They cause no damage, but up to three pebbles can be thrown at once at the same target. Pebbles cannot be reused. /para /article ... = When test.xml is this book, it fails: ... book titleFlare Pebbles/title para A bag of twenty pebbles. Each is enchanted with a cantrip. When thrown against a target, the pebble flares to a bright light on impoact, casuing the target to suffer a -1 penalty on attack rolls for 1 minute. (DC13 for Fortitude saving throw to negate.) They cause no damage, but up to three pebbles can be thrown at once at the same target. Pebbles cannot be reused. /para /book ... = When it fails, it provides the following error: ... The org.apache.cocoon.www.sitemap_xmap notifies that org.apache.cocoon.ProcessingException says: Failed to execute pipeline. More precisely: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.RuntimeException: 2 = 2 -- Michael Cortez Development Services Fullerton College http://www.fullcoll.edu - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon and DocBook?
I bet that's not cocoon problem but the stylesheet you are using and Xalan. I bet that the next line after Actually I finally debugged it -- it was Xalan. I had to switch out to Saxon, which brought with it Alfred, which caused it's own problems, which I've solved via a work around (Alred doesn't handle relative URIs very well.) Check your stylesheet for problems or change Xalan version. Stylesheet = Good Xalan = Bad Stylesheet + Saxon = very good. 8-D But now I've a new problem, to be posted under a new subject... -- Mike - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Caching, Xindice, Aggregate
Now that I've solved my DocBook rendering problem, I'm getting a new problem. Approximately every other request fails with a null pointer exception. Attached below is the full stack trace. I noticed, combing through it that it was either trying to setup or use caching, but my setup is using the Xindice access (which from the documentation, I believed could not be cached.) So is it possible that cocoon is trying to cache or use a cache, but can't? Is there a way to force caching off (so that I can test my hypothesis?) Thanks, -- Mike The org.apache.cocoon.www.sitemap_xmap notifies that org.apache.cocoon.ProcessingException says: Exception during processing of cocoon://ogc-gen/Item13 More precisely: org.apache.cocoon.ProcessingException: Exception during processing of cocoon://ogc-gen/Item13: java.lang.NullPointerException Full stack trace: Original exception : java.lang.NullPointerException at org.apache.cocoon.components.xslt.XSLTProcessorImpl.resolve(XSLTProcessorImp l.java:428) at com.icl.saxon.functions.Document.makeDoc(Document.java:201) at com.icl.saxon.functions.Document.getDocuments(Document.java:134) at com.icl.saxon.functions.Document.evaluate(Document.java:70) at com.icl.saxon.style.XSLGeneralVariable.getSelectValue(XSLGeneralVariable.jav a:251) at com.icl.saxon.style.XSLParam.process(XSLParam.java:65) at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:626) at com.icl.saxon.Controller.transformDocument(Controller.java:1071) at com.icl.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java :101) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91) at com.icl.saxon.output.ContentHandlerProxy.endDocument(ContentHandlerProxy.jav a:94) at com.icl.saxon.output.ProxyEmitter.endDocument(ProxyEmitter.java:70) at com.icl.saxon.output.GeneralOutputter.close(GeneralOutputter.java:693) at com.icl.saxon.Controller.resetOutputDestination(Controller.java:437) at com.icl.saxon.Controller.transformDocument(Controller.java:1082) at com.icl.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java :101) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91) at com.icl.saxon.output.ContentHandlerProxy.endDocument(ContentHandlerProxy.jav a:94) at com.icl.saxon.output.ProxyEmitter.endDocument(ProxyEmitter.java:70) at com.icl.saxon.output.GeneralOutputter.close(GeneralOutputter.java:693) at com.icl.saxon.Controller.resetOutputDestination(Controller.java:437) at com.icl.saxon.Controller.transformDocument(Controller.java:1082) at com.icl.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java :101) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java: 157) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv entPipeline.java:251) at org.apache.cocoon.components.source.SitemapSource.toSAX(SitemapSource.java:3 51) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv entPipeline.java:251) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:399) at org.apache.cocoon.www.sitemap_xmap.matchd0e1590(C:\tomcat4\work\localhost\co coon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:12260) at org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat4\work\localhost\cocoon\ cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3912) at org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat4\work\localhost\cocoon\ cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3127) at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) 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:998) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at
RE: Cocoon and cokies
From: Luca Morandini [mailto:[EMAIL PROTECTED]] Thomas, I know this will sound rather naive but... did you look into the cookie logicsheet ? Unfortunately, this won't help him. He wants to act Cocoon as a client to Livelink and manage cookies sent by Livelink on Cocoon side (like usual browser does). I would say that this requires patching of URLSource which is responsible for handling external HTTP sources, and adding cookie management capabilities to in. Vadim -- Resistance is futile. Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Ruth, Thomas {PDBI~Basel} [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 04, 2002 6:10 PM To: '[EMAIL PROTECTED]' Subject: Cocoon and cokies Hi all we have introduced a new Intranet portal framework in our organization (very successful for around 3000+ users). This portal framework is based on two components. Cocoon2 and Livelink (a CMS from Opentext). We use Livelink as the data entry tool for users. Livelink is already well known in the organization so we reuse this tool. As Livelink offers a function to export metadata to XML we use this and publish the relevant data to the Cocoon2 environment. This is a real publishing process, content managers maintain data and at one point in time they publish. So we publish the data on demand and present on the portal whatever we do with the data using XSLT (and other features from Cocoon). The export of the data can be triggered by using http request from any browser. Something like: http://livelink/id=12345objaction=xmlexportscope=subattributein fo. This generates a XML file (if already logged in). If I am not logged into Livelink, I get a prompt and can provide my username/password. Livelink uses cockie to handle the session and priviliges. I can also provide username/password in the URI http://livelink/func=ll.loginusername=XXXpassword=YYY. This works from a browser. Livelink is recognizing the request does a login, sets the cockie at the client browser by sending a page using the meta tag redirect. As we have such a great success in using this framework (Thanks to all of you who have participated in building Cocoon2!!!) we now want to go a step further and generate the XML file on request by the portal user. So the sitemap shall have an entry like map:aggregate element=live map:part src=http://livelink/livelink.exe?func=ll.loginamp;username=xxxa mp;password=yyy/ map:part src=http://livelink/livelink.exe?func=llamp;objAction=XMLExport; amp;objId=6152797amp;attributeinfoamp;scope=one/ /map:aggregate This is working when sending these two http requests from an browser, with the first request setting the cockie, so the second request gets 'through'. I have no idea on how we would do this in using Cocoon2. Any idea? How can Cocoon handle cockies? Does anyone know? Thanks for any help Thomas Ruth [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]