Re: Help with esql:more-results
Hi: I was checking the code behind esql. I think the problem is related to the new LIMT OFFSET in the Query: If we set the limit of returned rows the database will return in the recordset only the numbers of rows that we requested with the LIMIT keyword. That means that we cannot know if there are more rows. XSP does not know it too and then the esql:more-results do nothing. I thinked that we can change this because one of the use of the esql:more-results tag is pagination. If we cannot know if there are more rows then we cannot make use of the previous page and next page approach. I hope you will resolve this issue or please tell us how to resolve this. Thanks in advance, Antonio Gallardo Antonio Gallardo dijo: Hi! I am trying to make use of esql:more-results in a simple PostgreSQL database page using XSP. I am using Cocoon 2.1 CVS (today - 25-Dic-02 at night CST). My problem is that the esql:more-results is not working. I know already there are more than 50 registers of the database that can be retrieved. snip esql:execute-query esql:query esql:use-limit-clause/ esql:skip-rows1/esql:skip-rows esql:max-rows10/esql:max-rows esql:results tableheader-stuff/ esql:row-results esql:previous-resultsprevious rows/esql:previous-results esql:more-resultsmore rows/esql:more-results tdesql:get-string column=name//td /esql:row-results /table /esql:results /esql:query /snip The point is: everything works well but the more-results is not working no matter if you put it as descendant of esql:results or esql:row-results My database is PostgreSQL 7.2 on Red Hat Linux 7.2 Please help me. Regards, Antonio Gallardo - 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 can not be cached by Squid proxy server.
Hi all (B (BI installed Cocoon on my Pertium 600 machine, OS is Linux. I also setup a (BSquid transparent proxy server for caching documents. (BBut it seems Cocoon server does not provide "last modified" date in http (Bresposed header, (Bso Squid can not do cache. (BWhat can I do? (B (Bthank you very much in advance. (B (B (B (B- (BPlease check that your question has not already been answered in the (BFAQ before posting. http://xml.apache.org/cocoon/faq/index.html (B (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]
Bug in JTidy?
Hi all. I use an HTMLGenerator to tidy up the pages that I load, and I encountered a very strange behaviour concerning scripts. This is my input file: test.html html head titleTesting JTidypage/title /head body pThis is test/p table tr tdHello world/td /tr script language="JavaScript" document.write('tr'); document.write('td'); document.write('testing the JavaScript'); document.write('/td'); document.write('/tr'); /script tr tdAfter script/td /tr /table /body /html As you can notice, the script tag is not inside the tr/td tag, but it writes them, so the result table contains three rows (one of them output by the script). This is the actual code that I took from somebody's page. When I put this page into the pipeline, using HTMLGenerator (to tidy it), this is the VERY weird result that I get: pipeline: map:match pattern="test" map:generate src="" type="html"/ map:serialize type="xml"/ /map:match the result shown in the Cocoon browser window: ?xml version="1.0" encoding="utf-8" ? html head titleTesting JTidypage/title /head body pThis is test/p script language="JavaScript" type="text/javascript" / document.write(''); document.write(''); document.write(''); table tr tdHello world/td /tr tr td'); document.write('testing the JavaScript'); document.write('/td /tr /table table tr tdAfter script/td /tr /table /body /html The JTidy took out the script and messed the table! Somebody encountered such behaviour when using HTMLGenerator? I know that this is not really related to the Cocoon, but Cocoon uses JTidy, so I thought that somebody may have dealt with this thing already. Also, I looked on the JTidy page on sourceforge, but I didn't find anything related to this. Please, I somebody understands what going on with this JTidy feature, please help me. Sorry for a not-so-related question. Thank you very much for help. Anna
Re: Cocoon 2.0.4, Tomcat 4.1.18, Java 1.4, and xsl:for-each ...
If it is not a XSLT problem in general, but only a problem with this expression, it is most probably a bug in Xalan or XSLTC (I don't know what's your default.). Try to reformulate the expression, e.g. in one of the following ways: xsl:for-each select=tr[position() != 1][position() != last()] xsl:for-each select=tr[position() 1][position() lt; last()] xsl:for-each select=tr xsl:if test=position() != 1 and position() != last() but different context positions inside!! /xsl:if /xsl:for-each xsl:for-each select=tr[preceding-sibling::tr and following-sibling::tr] xsl:for-each select=tr[preceding-sibling::tr][following-sibling::tr] and so on. Is there any hint in the logs? Regards, Joerg Jonathan Lancelle wrote: Well, after being happy with a stable installation, I just had to go for it and install the latest stuff. On a linux system I currently have Cocoon 2.0.4, Tomcat 4.1.18, and Java 1.4 working happily together...speed better than the Resin servlet environment I was using...and getting it going in a record time of 10 minutes! It works great...except for one bizzare thing. When transforming using the included xerces/xalan jar files I have been defeated by the simple xsl:for-each select=tr[position()1 and position()!=last()] .../xsl:for-each structure. It doesn't work. The system simply hangs when encountering this structure, returning nothing. The browser loads and loads until timeout time. What happened? Is the xercesImpl-2.0.0.jar included with Cocoon 2.0.4 broken? Or is there a broken Xerces/xalan jar associated with Java 1.4 getting in the way? Should I backtrack to the Java 1.3 installation environment for now? (will probably do...) happy seasonal winter celebrations. jkl - 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: Bug in JTidy?
Hello Anna, JTidy is sometimes to intelligent ;-) It tries to fix to much. Have a look into the HTML DTD and see, whether script is allowed in table. If yes, post a bug at JTidy SourceForge, otherwise the behaviour of JTidy is ok. We encountered many similar problems with JTidy. In your case JTidy gets especially confused by tr and td in the script. Maybe you must fix these pages by hand. Does CDATA exist in HTML?? If yes, maybe this helps. Regards, Joerg Anna Afonchenko wrote: Hi all. I use an HTMLGenerator to tidy up the pages that I load, and I encountered a very strange behaviour concerning scripts. This is my input file: test.html html head titleTesting JTidy page/title /head body pThis is test/p table tr tdHello world/td /tr script language=JavaScript document.write('tr'); document.write('td'); document.write('testing the JavaScript'); document.write('/td'); document.write('/tr'); /script tr tdAfter script/td /tr /table /body /html As you can notice, the script tag is not inside the tr/td tag, but it writes them, so the result table contains three rows (one of them output by the script). This is the actual code that I took from somebody's page. When I put this page into the pipeline, using HTMLGenerator (to tidy it), this is the VERY weird result that I get: pipeline: map:match pattern=test map:generate src=test.html type=html/ map:serialize type=xml/ /map:match the result shown in the Cocoon browser window: ?xml version=1.0 encoding=utf-8 ? **html head * * titleTesting JTidy page/title * */head body * * p*This is test*/p * * script language=*JavaScript* type=*text/javascript* / * * *document.write(''); document.write(''); document.write(''); * table tr * * td*Hello world*/td * */tr tr * * td*'); document.write('testing the JavaScript'); document.write('*/td * */tr * * /table table tr * *td*After script*/td * */tr * * /table * */body /html The JTidy took out the script and messed the table! Somebody encountered such behaviour when using HTMLGenerator? I know that this is not really related to the Cocoon, but Cocoon uses JTidy, so I thought that somebody may have dealt with this thing already. Also, I looked on the JTidy page on sourceforge, but I didn't find anything related to this. Please, I somebody understands what going on with this JTidy feature, please help me. Sorry for a not-so-related question. Thank you very much for help. Anna - 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: Bug in JTidy?
Hi Joerg. Thanks for answering. The HTML DTD does not allow script inside the table (I think so). But somebody actually uses script inside a table, and it probably works. BTW, if I embed the script tag inside the tr/td elements, then JTidy doesn't touch it. But this is not my code, and when I will use the JTidy inside HTMLGenerator, I will load pages from the web that are not mine, just any page, so I can't really control the content of these pages, but I want to run my stylesheet on those. And if JTidy messes things up like this, it becomes really complicated. What do you mean by CDATA? You say that if I embed the script tag into CDATA, it wil not be messed up? Can you clear this thing for me please? Anyway, I will post the bug report on JTidy SourceForge. Thank you very much for your help. Anna - Original Message - From: Joerg Heinicke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 26, 2002 2:54 PM Subject: Re: Bug in JTidy? Hello Anna, JTidy is sometimes to intelligent ;-) It tries to fix to much. Have a look into the HTML DTD and see, whether script is allowed in table. If yes, post a bug at JTidy SourceForge, otherwise the behaviour of JTidy is ok. We encountered many similar problems with JTidy. In your case JTidy gets especially confused by tr and td in the script. Maybe you must fix these pages by hand. Does CDATA exist in HTML?? If yes, maybe this helps. Regards, Joerg Anna Afonchenko wrote: Hi all. I use an HTMLGenerator to tidy up the pages that I load, and I encountered a very strange behaviour concerning scripts. This is my input file: test.html html head titleTesting JTidy page/title /head body pThis is test/p table tr tdHello world/td /tr script language=JavaScript document.write('tr'); document.write('td'); document.write('testing the JavaScript'); document.write('/td'); document.write('/tr'); /script tr tdAfter script/td /tr /table /body /html As you can notice, the script tag is not inside the tr/td tag, but it writes them, so the result table contains three rows (one of them output by the script). This is the actual code that I took from somebody's page. When I put this page into the pipeline, using HTMLGenerator (to tidy it), this is the VERY weird result that I get: pipeline: map:match pattern=test map:generate src=test.html type=html/ map:serialize type=xml/ /map:match the result shown in the Cocoon browser window: ?xml version=1.0 encoding=utf-8 ? **html head * * titleTesting JTidy page/title * */head body * * p*This is test*/p * * script language=*JavaScript* type=*text/javascript* / * * *document.write(''); document.write(''); document.write(''); * table tr * * td*Hello world*/td * */tr tr * * td*'); document.write('testing the JavaScript'); document.write('*/td * */tr * * /table table tr * *td*After script*/td * */tr * * /table * */body /html The JTidy took out the script and messed the table! Somebody encountered such behaviour when using HTMLGenerator? I know that this is not really related to the Cocoon, but Cocoon uses JTidy, so I thought that somebody may have dealt with this thing already. Also, I looked on the JTidy page on sourceforge, but I didn't find anything related to this. Please, I somebody understands what going on with this JTidy feature, please help me. Sorry for a not-so-related question. Thank you very much for help. Anna - 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: Bug in JTidy?
Anna, Anyway, I will post the bug report on JTidy SourceForge. Thank you very much for your help. I would not assume that this is a bug. It may well be on purpose. The purpose of JTidy, based upon Tidy, is to create valid XHTML from an HTML document. Therefore, if the source document is invalid, it will do its best to correct it, but success cannot be guaranteed, especially if someone does things in their HTML that are not strictly allowed (which no doubt includes a lot of sites). See http://www.w3.org/People/Raggett/tidy/ for details of the original Tidy program. So, if you plan to use the HTML Generator, you'll just have to find a way to work with this. Regards, Upayavira - 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: wsproxy generator
Thanks for the suggestion. Does html generator retrieve remote sources by https also or does it support http only? I've read that webserviceproxy works with https. If html generator works with https as well then that would be super and solve all my problems. Sushil From: Geoff Howard [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: wsproxy generator Date: Tue, 24 Dec 2002 11:41:46 -0500 Yes, you can use WebProxyGenerator with any url, but yes it needs to return xml. If you need to retrieve arbitrary html content it would be safer to use HTMLGenerator, which can retrieve remote sources via http, and runs the input through Tidy before sending the sax events through the pipeline, guaranteeing [?] that you get wellformed xml. There is an example this in the samples that ship with cocoon, coincidentally using yahoo as an example. If the sample is broken, there is a good chance that a recent yahoo site redesign has broken the xpath used in the example, as has happened in the past. Hope that helps, Geoff Howard -Original Message- From: Sushil Bhattarai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 24, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: wsproxy generator Hello Does wsproxy generator work only with xform or does it work for any url. If it works for any url, does that url need to return xml output? If it doesn't how to get around it? I'm trying to call a url which basically returns html. But I want to serialize this as xml and put it in my pipeline so that I can manipulate the xml and extract whatever I want to. Is this possible using wsproxy or am I in the wrong direction. Can I do this to get yahoo page as xml map:match pattern=yahoo map:generate type=wsproxy src=http://www.yahoo.com/ map:serialize type=xml/ /map:match Thanks Sushil _ MSN 8 with e-mail virus protection service: 3 months FREE*. http://join.msn.com/?page=features/virusxAPID=42PS=47575PI=7324 DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_e liminateviruses_3mf - 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] _ The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/junkmailxAPID=42PS=47575PI=7324DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_smartspamprotection_3mf - 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: wsproxy generator
Don't know that off hand - it's using Excalibur Source Resolver, so you'll have to go digging through docs/source there. Unfortunately, 90% of the time, the api docs at excalibur give a 404. I often wish the Avalon/Excalibur docs from the appropriate version were bundled with cocoon and this is one of those times. It may be faster to just try it. Geoff -Original Message- From: Sushil Bhattarai [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 26, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: RE: wsproxy generator Thanks for the suggestion. Does html generator retrieve remote sources by https also or does it support http only? I've read that webserviceproxy works with https. If html generator works with https as well then that would be super and solve all my problems. Sushil From: Geoff Howard [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: wsproxy generator Date: Tue, 24 Dec 2002 11:41:46 -0500 Yes, you can use WebProxyGenerator with any url, but yes it needs to return xml. If you need to retrieve arbitrary html content it would be safer to use HTMLGenerator, which can retrieve remote sources via http, and runs the input through Tidy before sending the sax events through the pipeline, guaranteeing [?] that you get wellformed xml. There is an example this in the samples that ship with cocoon, coincidentally using yahoo as an example. If the sample is broken, there is a good chance that a recent yahoo site redesign has broken the xpath used in the example, as has happened in the past. Hope that helps, Geoff Howard -Original Message- From: Sushil Bhattarai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 24, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: wsproxy generator Hello Does wsproxy generator work only with xform or does it work for any url. If it works for any url, does that url need to return xml output? If it doesn't how to get around it? I'm trying to call a url which basically returns html. But I want to serialize this as xml and put it in my pipeline so that I can manipulate the xml and extract whatever I want to. Is this possible using wsproxy or am I in the wrong direction. Can I do this to get yahoo page as xml map:match pattern=yahoo map:generate type=wsproxy src=http://www.yahoo.com/ map:serialize type=xml/ /map:match Thanks Sushil _ MSN 8 with e-mail virus protection service: 3 months FREE*. http://join.msn.com/?page=features/virusxAPID=42PS=47575PI=7324 DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_e liminateviruses_3mf - 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] _ The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/junkmailxAPID=42PS=47575PI=7 324DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_s martspamprotection_3mf - 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 Roles / Users
Hi, Currently this is not possible out of the box. You could probably cook up some way to do this (i.e. return the roles to the user and get him to select one before proceeding. 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: Thursday, December 26, 2002 12:01 PMTo: cocoon-usersSubject: Portal Roles / Users Hi Guys, Is is possible to have 1 user included into 2 roles? for example user cocoon is both admin and guest. Or to be more realistic, User cocoon is both Business manager and customer service agent. Thanks in advance Richard
RE: Cocoon tutorial available at CMSWatch.com and Sphere.com
Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and helpful books! Inspiring - now that's a word I hadn't yet heard in connection with the book. Thanks! Matthew -- Open Source Group Cocoon { Consulting, Training, Projects } = Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de - Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20 Weblogs: http://radio.weblogs.com/0103021/ http://www.oreillynet.com/weblogs/author/1014 = -Original Message- From: John R. Callahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 24, 2002 5:05 PM To: [EMAIL PROTECTED] Subject: Cocoon tutorial available at CMSWatch.com and Sphere.com FYI... I have written a brief article on Cocoon (with tutorial and downloadable demo). The article is available at: http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?feature_id=81 The associated demo is available at: http://www.sphere.com/docs/myapp.zip The demo is meant to be installed as a webapps subdirectory (no, not as a war file) in Tomcat 4.0.6. The myapp.zip file includes everything you need (all jar files, etc.) and could even serve as a minimal Cocoon application for beginners. It is based on 2.1dev and requires JDK1.3. I've tested it with Tomcat 4.0.6 and Resin 2.x. (I've also got PPT slides to accompany the article if anyone wants them :-p) Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and helpful books! Enjoy! -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation (www.sphere.com) - The Intelligence of XML [EMAIL PROTECTED] 410-772-9740 x1116 509-352-1536 (eFax) - 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]
Redirecting within the sitemap?
I've read that the map:redirect-to statement only works with client side redirects. Is there anyway to redirect processing to another pipeline via the cocoon:/ protocol? I'm checking to see if a file exists using the resource-exists action. If it does not I want to check each parent directory above the current one until I find it. Thoughts? Thanks, Benjamin - 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 tutorial available at CMSWatch.com and Sphere.com
Please let me know if you end up resolving this issue. I'd rather not downgrade back to 4.0.6 to get an example app working. Thanks for your time. On Tue, 24 Dec 2002 20:53:53 -0500 (EST), [EMAIL PROTECTED] wrote: J., I just installed myapp under Tomcat 4.1 and got the same error you did. I'm not enough of a Servlet API expert to know for sure, but it seems to be an API conflict. For now, I recommend using Tomcat 4.0.6 to run the myapp tutorial. -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation - The Intelligence of XML [EMAIL PROTECTED] 410-772-9740 x1116 509-532-1536 (efax) 410-598-2157 (cell) I took a look at your tutorial, and I'm having trouble getting the example application to work. ( Specifically, I'm getting this error ): javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper .java:962) java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass0(Native Method) I highly suspect that it has something to do with the way I tried to integrate it into my existing Tomcat 4.1 environment. ( Unpacked the zip file, named the folder cmswatch, put the folder under the webapps directory. ) -- and that's all, as far as setup. I did notice that the servlet has the same name as the servlet in the original cocoon directory. Will that cause a problem? ( Can you tell how new I am to this? ) Any help you can offer is appreciated. I'd like to at least get past this snag soon. Thanks, J. On Tue, 24 Dec 2002 08:04:49 -0800, John R. Callahan wrote: FYI... I have written a brief article on Cocoon (with tutorial and downloadable demo). The article is available at: http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?feat ur e_id=81 The associated demo is available at: http://www.sphere.com/docs/myapp.zip The demo is meant to be installed as a webapps subdirectory (no, not as a war file) in Tomcat 4.0.6. The myapp.zip file includes everything you need (all jar files, etc.) and could even serve as a minimal Cocoon application for beginners. It is based on 2.1dev and requires JDK1.3. I've tested it with Tomcat 4.0.6 and Resin 2.x. (I've also got PPT slides to accompany the article if anyone wants them :-p) Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and helpful books! Enjoy! -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation (www.sphere.com) - The Intelligence of XML [EMAIL PROTECTED] 410-772-9740 x1116 509-352-1536 (eFax) --- -- 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: cocoon-users- [EMAIL PROTECTED] For additional commands, e-mail: cocoon-users- [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: cocoon-users- [EMAIL PROTECTED] For additional commands, e-mail: cocoon-users- [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]
strange output when i use i18n transformation
hello people i have a very strange output when i use i18n when i use element i18n:textsomething/i18n:text /element and i ask xsl:value-of select=//element disable-output-escaping=yes/ i get in output: %0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09something%0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09 its very strange because when i remove the i18n element and try with element something /element i get in output the something string this hapend only when i get the elements value and i put it into a parameter look at xsl code that follow a part of my xml code - osm:hlink id= class=mainlink hclass=hmainlink outerclass= targetURLsitebuilder.Services/targetURL osm:linkparam name=locale osm:paramvalueen/osm:paramvalue /osm:linkparam osm:text..: i18n:text i18n:key=hmn_servicesarticle_text1/i18n:text/osm:text /osm:hlink osm:hlink id= class=mainlink hclass=hmainlink outerclass= targetURLsitebuilder.Activities/targetURL osm:linkparam name=locale osm:paramvalue i18n:text i18n:key=locale_langlocale_lang/i18n:text /osm:paramvalue /osm:linkparam osm:text..: i18n:text i18n:key=hmn_activitiesarticle_text1/i18n:text/osm:text /osm:hlink the xsl part that make the trasformation xsl:template match=osm:hlink span xsl:attribute name=classxsl:value-of select=@outerclass//xsl:attribute a onmouseover=changeUp(this) onmouseout=changeOut(this) xsl:attribute name=href xsl:value-of select=./targetURL/?xsl:call-template name=osm:linkparam/ /xsl:attribute xsl:attribute name=classxsl:value-of select=@class//xsl:attribute xsl:attribute name=oclassxsl:value-of select=@class//xsl:attribute xsl:attribute name=hclassxsl:value-of select=@hclass//xsl:attribute xsl:attribute name=namexsl:value-of select=@name//xsl:attribute xsl:value-of select=./osm:text disable-output-escaping=yes/ /a /span /xsl:template xsl:template name=osm:linkparam xsl:value-of select=./osm:linkparam/@name disable-output-escaping=yes/=xsl:value-of select=./osm:linkparam/osm:paramvalue disable-output-escaping=yes/ /xsl:template and the output in browser source span xmlns:fo=http://www.w3.org/1999/XSL/Format; class= a onmouseout=changeOut(this) onmouseover=changeUp(this) href=sitebuilder.Services?locale=en class=mainlink oclass=mainlink hclass=hmainlink name=..: services /a /span span xmlns:fo=http://www.w3.org/1999/XSL/Format; class= a onmouseout=changeOut(this) onmouseover=changeUp(this) href=sitebuilder.Activities?locale%0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09en%0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09 here is the problem . why i get this very strange string: %0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09 between locale and en class=mainlink oclass=mainlink hclass=hmainlink name=..: activities /a /span my browser display this string as one space any idea? thanx Stavros Kounis - 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]
Change in esql:more-results for postgresql
Hi! I thinked about the problem of non-working esql:more-results tag with PostgreSQL and the easy way to resolve this problem is to change in PostgresEsqlQuery.java in line 85 from: if (getMaxRows() -1) sb.append( LIMIT ).append(getMaxRows()); to: if (getMaxRows() -1) sb.append( LIMIT ).append(getMaxRows()+1); that way, when we will request maxrows=4 the code will limit the query to 5 (4+1) and there will be another row that will trigger the esql:more-results tag. Please review this little change. Thanks in advance, Antonio Gallardo Antonio Gallardo dijo: Hi: I was checking the code behind esql. I think the problem is related to the new LIMT OFFSET in the Query: If we set the limit of returned rows the database will return in the recordset only the numbers of rows that we requested with the LIMIT keyword. That means that we cannot know if there are more rows. XSP does not know it too and then the esql:more-results do nothing. I thinked that we can change this because one of the use of the esql:more-results tag is pagination. If we cannot know if there are more rows then we cannot make use of the previous page and next page approach. I hope you will resolve this issue or please tell us how to resolve this. Thanks in advance, Antonio Gallardo Antonio Gallardo dijo: Hi! I am trying to make use of esql:more-results in a simple PostgreSQL database page using XSP. I am using Cocoon 2.1 CVS (today - 25-Dic-02 at night CST). My problem is that the esql:more-results is not working. I know already there are more than 50 registers of the database that can be retrieved. snip esql:execute-query esql:query esql:use-limit-clause/ esql:skip-rows1/esql:skip-rows esql:max-rows10/esql:max-rows esql:results tableheader-stuff/ esql:row-results esql:previous-resultsprevious rows/esql:previous-results esql:more-resultsmore rows/esql:more-results tdesql:get-string column=name//td /esql:row-results /table /esql:results /esql:query /snip The point is: everything works well but the more-results is not working no matter if you put it as descendant of esql:results or esql:row-results My database is PostgreSQL 7.2 on Red Hat Linux 7.2 Please help me. Regards, Antonio Gallardo - 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: wsproxy generator
Actually, the WSProxyGen is using Jakarta HttpClient lib, which in turn supports HTTPS. - Original Message - From: Geoff Howard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 26, 2002 12:33 PM Subject: RE: wsproxy generator Don't know that off hand - it's using Excalibur Source Resolver, so you'll have to go digging through docs/source there. Unfortunately, 90% of the time, the api docs at excalibur give a 404. I often wish the Avalon/Excalibur docs from the appropriate version were bundled with cocoon and this is one of those times. It may be faster to just try it. Geoff -Original Message- From: Sushil Bhattarai [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 26, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: RE: wsproxy generator Thanks for the suggestion. Does html generator retrieve remote sources by https also or does it support http only? I've read that webserviceproxy works with https. If html generator works with https as well then that would be super and solve all my problems. Sushil From: Geoff Howard [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: wsproxy generator Date: Tue, 24 Dec 2002 11:41:46 -0500 Yes, you can use WebProxyGenerator with any url, but yes it needs to return xml. If you need to retrieve arbitrary html content it would be safer to use HTMLGenerator, which can retrieve remote sources via http, and runs the input through Tidy before sending the sax events through the pipeline, guaranteeing [?] that you get wellformed xml. There is an example this in the samples that ship with cocoon, coincidentally using yahoo as an example. If the sample is broken, there is a good chance that a recent yahoo site redesign has broken the xpath used in the example, as has happened in the past. Hope that helps, Geoff Howard -Original Message- From: Sushil Bhattarai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 24, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: wsproxy generator Hello Does wsproxy generator work only with xform or does it work for any url. If it works for any url, does that url need to return xml output? If it doesn't how to get around it? I'm trying to call a url which basically returns html. But I want to serialize this as xml and put it in my pipeline so that I can manipulate the xml and extract whatever I want to. Is this possible using wsproxy or am I in the wrong direction. Can I do this to get yahoo page as xml map:match pattern=yahoo map:generate type=wsproxy src=http://www.yahoo.com/ map:serialize type=xml/ /map:match Thanks Sushil _ MSN 8 with e-mail virus protection service: 3 months FREE*. http://join.msn.com/?page=features/virusxAPID=42PS=47575PI=7324 DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_e liminateviruses_3mf - 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] _ The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/junkmailxAPID=42PS=47575PI=7 324DI=7474SU= http://www.hotmail.msn.com/cgi-bin/getmsgHL=1216hotmailtaglines_s martspamprotection_3mf - 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:
using i18n:attr!!!!!!!!!!
Title: using i18n:attr!! Hi all, I got this problem in using i18n:attr, i read I18n:transformer and try to use it but it does not work!!! :( , i also try to find answers in mail archives but the answers seem not work for me too so ... i want to have different languages on my buttons (input type=submit) when i changing languages on my pages although i can change the remains of the pages!!! i defined an xml file with createi18n:text i18n:key=createCreate/i18n:text/create in my xsl file : i tried cases like these: 1. input type=submit name=create value=create i18n:attr=value/ 2. input type=submit name=create value={create} i18n:attr=value/ 3. input type=submit name=create value=create i18n:attr={value}/ but i just display 'create'!!! not Create in english and TM in VN and when i press the button it informs errror: Undeclared prefix in name: i18n:attr. description org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: Undeclared prefix in name: i18n:attr. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace so now i dont know how to deal with it??!!! :( do you know how to solve it?? Thanks so much !!!
Re: strange output when i use i18n transformation
From: Cocoon User [EMAIL PROTECTED] hello people i have a very strange output when i use i18n when i use element i18n:textsomething/i18n:text /element and i ask xsl:value-of select=//element disable-output-escaping=yes/ i get in output: %0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09something%0D%0A%09% 09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09 its very strange because when i remove the i18n element and try with element something /element i get in output the something string The string you get consists of CR/LF and Tab characters in URL encoded form. Probably, you have those characters in your dictionary file, e.g.: message[CR][LF] [tab][tab]something[CR][LF] /message and they come out as-is. The other possible source of those characters is the XSLT. Try to use: xsl:value-of select=normalize-space(./osm:text) disable-output-escaping=yes/ Regards, Konstantin this hapend only when i get the elements value and i put it into a parameter look at xsl code that follow a part of my xml code - osm:hlink id= class=mainlink hclass=hmainlink outerclass= targetURLsitebuilder.Services/targetURL osm:linkparam name=locale osm:paramvalueen/osm:paramvalue /osm:linkparam osm:text..: i18n:text i18n:key=hmn_servicesarticle_text1/i18n:text/osm:text /osm:hlink osm:hlink id= class=mainlink hclass=hmainlink outerclass= targetURLsitebuilder.Activities/targetURL osm:linkparam name=locale osm:paramvalue i18n:text i18n:key=locale_langlocale_lang/i18n:text /osm:paramvalue /osm:linkparam osm:text..: i18n:text i18n:key=hmn_activitiesarticle_text1/i18n:text/osm:text /osm:hlink the xsl part that make the trasformation xsl:template match=osm:hlink span xsl:attribute name=classxsl:value-of select=@outerclass//xsl:attribute a onmouseover=changeUp(this) onmouseout=changeOut(this) xsl:attribute name=href xsl:value-of select=./targetURL/?xsl:call-template name=osm:linkparam/ /xsl:attribute xsl:attribute name=classxsl:value-of select=@class//xsl:attribute xsl:attribute name=oclassxsl:value-of select=@class//xsl:attribute xsl:attribute name=hclassxsl:value-of select=@hclass//xsl:attribute xsl:attribute name=namexsl:value-of select=@name//xsl:attribute xsl:value-of select=./osm:text disable-output-escaping=yes/ /a /span /xsl:template xsl:template name=osm:linkparam xsl:value-of select=./osm:linkparam/@name disable-output-escaping=yes/=xsl:value-of select=./osm:linkparam/osm:paramvalue disable-output-escaping=yes/ /xsl:template and the output in browser source span xmlns:fo=http://www.w3.org/1999/XSL/Format; class= a onmouseout=changeOut(this) onmouseover=changeUp(this) href=sitebuilder.Services?locale=en class=mainlink oclass=mainlink hclass=hmainlink name=..: services /a /span span xmlns:fo=http://www.w3.org/1999/XSL/Format; class= a onmouseout=changeOut(this) onmouseover=changeUp(this) href=sitebuilder.Activities?locale%0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%0 9%09%09%09%09%09en%0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09 here is the problem . why i get this very strange string: %0D%0A%09%09%09%09%09%09%09%0D%0A%09%09%09%09%09%09%09%09 between locale and en class=mainlink oclass=mainlink hclass=hmainlink name=..: activities /a /span my browser display this string as one space any idea? thanx Stavros Kounis - 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: using i18n:attr!!!!!!!!!!
You should place attribute translations in a dictionary file in the same format as for all the other elements. Attribute translations are not different from the rest. They just use special syntax to get the values. There *a lot* ofsources about i18n where you could get answers for most of the cases: Internationalization docs: http://xml.apache.org/cocoon/userdocs/transformers/i18n-transformer.html i18n samples in Cocoon source at: /src/webapp/samples/i18n/ I18n transformer JavaDocs: http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/transformation/I18nTransformer.html LocaleAction JavaDocs: http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/acting/LocaleAction.html I hope they outline all the dark sides of Internationalization and localization in Cocoon. You just have to read them carefully. Konstantin - Original Message - From: Hong Gia Dinh To: [EMAIL PROTECTED] Sent: Friday, December 27, 2002 06:43 Subject: using i18n:attr!! Hi all, I got this problem in using i18n:attr, i read I18n:transformer and try to use it but it does not work!!! :( , i also try to find answers in mail archives but the answers seem not work for me too so ... i want to have different languages on my buttons (input type="submit") when i changing languages on my pages although i can change the remains of the pages!!! i defined an xml file with createi18n:text i18n:key="create"Create/i18n:text/create in my xsl file : i tried cases like these: 1. input type="submit" name="create" value="create" i18n:attr="value"/ 2. input type="submit" name="create" value="{create}" i18n:attr="value"/ 3. input type="submit" name="create" value="create" i18n:attr="{value}"/ but i just display 'create'!!! not Create in english and TM in VN and when i press the button it informs errror: Undeclared prefix in name: "i18n:attr". description org.apache.cocoon.ProcessingException: Exception in creating Transform Handler: org.xml.sax.SAXParseException: Undeclared prefix in name: "i18n:attr". sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace so now i dont know how to deal with it??!!! :( do you know how to solve it?? Thanks so much !!!