Re: bad lookup of log4j.dtd
I think the problem is that the log4j.xconf that comes with cocoon has: !DOCTYPE log4j:configuration SYSTEM log4j.dtd Fernando Mato Mira wrote: Antonio Gallardo wrote: [EMAIL PROTECTED] escribió: Cocoon 2.1.8 is looking for log4j.dtd in the webapp directory instead of the log4j jar file. Would you provide more info? Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Internal Server Error Message: /myapp/build/cocoon/webapp/log4j.dtd (No such file or directory) Description: org.apache.cocoon.ProcessingException: Failed to load sitemap from file:/myapp/build/cocoon/webapp/sitemap.xmap Sender: org.apache.cocoon.servlet.CocoonServlet Source: Cocoon Servlet Request URI privapps/multi/do-login cause java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd (No such file or directory) request-uri /privapps/multi/do-login full exception chain stacktrace org.apache.cocoon.ProcessingException: Failed to load sitemap from file:/myapp/build/cocoon/webapp/sitemap.xmap at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:368) at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildConcreteProcessor(TreeProcessor.java:335) at org.apache.cocoon.components.treeprocessor.TreeProcessor.setupConcreteProcessor(TreeProcessor.java:300) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:246) at org.apache.cocoon.Cocoon.process(Cocoon.java:679) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:789) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) Caused by: java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at java.io.FileInputStream.init(FileInputStream.java:66) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) at org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:128) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:190) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:139) at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:361) ... 19 more stacktrace java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) at
Anyone got any nice Cocoon-based photo album lying around?
OK. I admit that I'm being lazy. There, I said it! :) I need a web-based photo album as part of a project. Preferably Cocoon-based, perhaps using a database to store pictures and thumbs. Reason that I'm asking is that other parts of the project are taking up a lot of time, and I need to get a demo up and running ASAP. Perhaps someone has a nice example lying about - and willing to share? Sandor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Flowscript - amend file
Hi, I am using CForms to generate and store files on the server. I want to take some of the entered data and use it to amend a different file stored on the server. Within the CForm javascript I extract the data from the form using var lodge= form.getChild(name).getValue(); I then load the file which I wish to amend with var doc = loadDocument(test.xml); find the element which I wish to amend with doc.getElementById('a') save the doc with saveDocument(doc, 'test1.xml'); All this works fine, but when I try append the data to the file with doc.getElementById('a').appendChild(doc.createTextNode(lodge)); I get the following error org.mozilla.javascript.EcmaError: Cannot convert null to an object. Please can anyone tell me what I am doing wrong. Peter Sparkes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a Proxy Server for Cocoon
http://wiki.apache.org/cocoon/ApacheModProxy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
First Cocoon application help needed
I have downloaded the latest cocoon release 2.1.8. After running the build I have copied the webapp folder instead of the war file in the TOMCAT_HOME/webapps directory. I then accessed the http://127.0.0.1:8080/cocoon/ I was able to see the cocoon welcome page. I hope that confirms proper installation of the cocoon. I am using jdk1.5.0.6 and Tomcat/5.0.28 I am trying to run a example in the JavaXML 2 edition book. I put 2 files in the WEB-INF folder cocoon.properties and web.xml I aslo add two directories cocoon/XSL and cocoon/DTD containing the xsl and dtd files respectively I copied the contents.xml which contains of the javaxml book in xml format When I type the URL, http://127.0.0.1:8080/cocoon/contents.xml I get an error message org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: contents.xml This is my first cocoon application. Does anybody know what is going wrong?. If anybody has a simple xml cocoon application to run, please help so I can get a hang of cocoon. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: First Cocoon application help needed
I suggest you try and look at the samples. Normally you should be able to go to http://localhost:8080/cocoon/samples You have to go to webapps/cocoon/samples/ and look at the different sitemap.xmap files present in each directory for each sample sitemap.xmap file are very important files. Learn how they are built. You can go to http://cocoon.apache.org/2.1/tracks/first-steps-track.html to help you get you started with cocoon. Philippe -Message d'origine- De : jigo jacob [mailto:[EMAIL PROTECTED] Envoyé : jeudi 30 mars 2006 15:01 À : users@cocoon.apache.org Objet : First Cocoon application help needed I have downloaded the latest cocoon release 2.1.8. After running the build I have copied the webapp folder instead of the war file in the TOMCAT_HOME/webapps directory. I then accessed the http://127.0.0.1:8080/cocoon/ I was able to see the cocoon welcome page. I hope that confirms proper installation of the cocoon. I am using jdk1.5.0.6 and Tomcat/5.0.28 I am trying to run a example in the JavaXML 2 edition book. I put 2 files in the WEB-INF folder cocoon.properties and web.xml I aslo add two directories cocoon/XSL and cocoon/DTD containing the xsl and dtd files respectively I copied the contents.xml which contains of the javaxml book in xml format When I type the URL, http://127.0.0.1:8080/cocoon/contents.xml I get an error message org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: contents.xml This is my first cocoon application. Does anybody know what is going wrong?. If anybody has a simple xml cocoon application to run, please help so I can get a hang of cocoon. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Using a Proxy Server for Cocoon
-Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Edwin Kapauni http://wiki.apache.org/cocoon/ApacheModProxy Unless I'm misreading this (which I might be) it was probably me not explaining my question very well. That's for getting cocoon to act as a proxy or to find out the original address from a proxy. I'm trying to get cocoon to use a proxy server for non-local addresses so that if I'm requesting a resource foo.com cocoon will use the proxy server settings to then go through another proxy to get the resource. However that got me thinking that the settings I'm looking for might be at the server container level so I'll have a quick look at the Tomcat documents as well. Thanks, Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * If you work for NHS Lothian and wish to have help to stop smoking, support is available by contacting [EMAIL PROTECTED] or 0131 537 9494 - internal 49494. For anyone else living/working in Lothian, please contact 0800 848484 for your nearest NHS stop smoking service. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: First Cocoon application help needed
From: jigo jacob [EMAIL PROTECTED] Date: Thu, 30 Mar 2006 04:46:04 -0800 (PST) I have downloaded the latest cocoon release 2.1.8. After running the build I have copied the webapp folder instead of the war file in the TOMCAT_HOME/webapps directory. I then accessed the http://127.0.0.1:8080/cocoon/ I was able to see the cocoon welcome page. I hope that confirms proper installation of the cocoon. I am using jdk1.5.0.6 and Tomcat/5.0.28 I am trying to run a example in the JavaXML 2 edition book. I put 2 files in the WEB-INF folder cocoon.properties and web.xml I aslo add two directories cocoon/XSL and cocoon/DTD containing the xsl and dtd files respectively I copied the contents.xml which contains of the javaxml book in xml format When I type the URL, http://127.0.0.1:8080/cocoon/contents.xml I get an error message org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: contents.xml This is my first cocoon application. Does anybody know what is going wrong?. If anybody has a simple xml cocoon application to run, please help so I can get a hang of cocoon. Do you have a sitemap pipeline that matches the content.xml URL? The No pipeline matched request message would suggest not. Just because the file is present on disk, doesn't mean cocoon will serve it up, unless there's a pipeline which tells it to do so. You need to edit sitemap.xmap and define a pipeline that reads the file (with the file generator), possibly does things to it via transformers (e.g. applying your stylesheet templates to it with the XSL transformer), then serialises the results to the browser in a suitable form (with the HTML or XML serialiser). The thing to remember is it's the pipelines' matchers that define the URL space in your web app, not the contents of the filesystem. You can organise things into subdirectories corresponding to the URL paths if you wish, but it's not compulsory. In fact, if you wanted, you could run the whole site with a single sitemap file and everything else read from a database (or content management repository, or web service, etc.) with normal filenames extensions in all the URLs so that the user can't tell the difference! Or you could define a single pipeline with a reader that takes the full path filename from the requested URL, looks for a static file of that name under your web app's root directory, and streams it back with the appropriate mime type. Not that you'd really want to do that, though, since Apache would probably do the same job a lot faster... Andrew. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a Proxy Server for Cocoon
Le 28 mars 06 à 17:40, Stewart, Gary a écrit : ...Is there any way to specify a proxy server for cocoon to use on either a per-pipeline basis, for a sitemap, or for the whole of the cocoon deployment? Search for proxy in http://wiki.apache.org/cocoon/FAQs - proxies are defined at the JVM level and are by default global. -Bertrand smime.p7s Description: S/MIME cryptographic signature
RE: Using a Proxy Server for Cocoon
-Original Message- From: Bertrand Delacretaz [mailto:[EMAIL PROTECTED] Search for proxy in http://wiki.apache.org/cocoon/FAQs - proxies are defined at the JVM level and are by default global. -Bertrand Thank you, I feel really bad that I asked this since it is in the FAQ and everything. Sorry to bother people with these sorts of questions! I'm adding to my every expanding collection of Look at the Wiki, Look at the mailing list archives. Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * If you work for NHS Lothian and wish to have help to stop smoking, support is available by contacting [EMAIL PROTECTED] or 0131 537 9494 - internal 49494. For anyone else living/working in Lothian, please contact 0800 848484 for your nearest NHS stop smoking service. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating bookmarks with JavaFlow
Hi Harlan, AFAIK unfortunately there is no equivalent of createWebContinuation in javaflow. I need it too and tried to add something similar but got no much time to work on it. Could you please file a bug on http://issues.apache.org/jira/browse/COCOON about it? I will try to add a method on AbstractContinuable to create an arbitary new javaflow continuation, but it's hard stuff and cannot grant to make it. Simone Harlan Iverson wrote: Hello, I would like to port my javascript flow to JavaFlow, however I can't figure out how to create a bookmark from JavaFlow. In essense, I am looking for the JavaFlow equivalent of var bookmark = cocoon.createWebContinuation(); I have searched, and this thread is all I was able to find on the subject: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109049896205583w=2 Thanks, Harlan Iverson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Simone Gianni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
petstore explaination needed
Hello, I'm trying to understand the petstore sample and I hoped someone could help me understand how the following code works. function main(funName) { var fun = this[funName]; var args = new Array(arguments.length -1); for (var i = 1; i arguments.length; i++) { args[i-1] = arguments[i]; } getPetStore(); fun.apply(args); } What I understand here is that the only purpose of the function called main is to be sure that it is called each time a request matches *.do map:match pattern=*.do map:call function=main map:parameter name=page value={1}/ /map:call /map:match I don't understand why we fetch other arguments, arguments.length should always equal one. I tried to copy-paste this in my own application because I need that too. It doesn't work. In my application fun stays empty so fun.apply(args) doesn't work ... In my application funName takes the value of the page parameter Also I don't any function called apply in javascript and I don't understand what this[funName] should return... I'm lost here. Also I don't understand something else in the pagination management (for example in the function viewCategory() in petstore.js) I don't get why we need the cocoon.createPageLocal(). From what I understand about continuations, Cocoon automatically creates a continuation when we call sendPageAndWait(). So Cocoon should automatically remember the values of rowcount and skipmaxresults without having to call createPageLocal(). There's something that I don't get here. The code is below. Thanks in advance for your help and the time given. Philippe function viewCategory() { var categoryId = cocoon.request.get(categoryId); var category = getPetStore().getCategory(categoryId); var maxResults = MAX_RESULTS; /* page local variable to keep track of pagination */ var local = cocoon.createPageLocal(); local.skipResults = 0; while (true) { var productList = getPetStore().getProductListByCategory(categoryId, local.skipResults, maxResults); local.lastPage = !productList.isLimitedByMaxRows; local.rowCount = productList.rowCount; var contextData = { accountForm: accountForm, productList: productList.rows, category: category, firstPage: local.skipResults == 0, lastPage: local.lastPage }; cocoon.sendPageAndWait(view/Category + EXT, contextData, function () { /* release contextData and productList */ contextData = null; productList = null; }); var page = cocoon.request.get(page); if (page == previous) { if (local.skipResults != 0) { local.skipResults -= maxResults; } } else if (page == next) { if (!local.lastPage) { local.skipResults += local.rowCount; } } } } I also - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
reauthentication?
Hello, I have a webapp which connects to a cocoon webapp sending a token for authentication. When the user logs out and logs in again from the first webapp, I get an error in the flow in cocoon webapp because it uses the token stored in the session which is still valid instead of the new token. Is there any way to make the authentication mechanism smarter, not just reusing the active session, but invalidating the session and reauthenticating when the token parameter presented is different from the one stored in the session? Thanks
Re: Best way to launch external applications as generators?
Hi Simone, thank's for the advice! Best regards Hans On 3/28/06, Simone Gianni [EMAIL PROTECTED] wrote: Hi Jonas, I don't know of an existing ExecuteGenerator, so i think you should implement a new generator in java. AFAIK the oo macros will save the output file, so knowing the input file you can specify or desume an output file. If that's the case, you have to stream this second file down the pipeline, right? Inside your new generator you can use a java.lang.Runtime.exec call to run the external process. It will return a Process object on which you can call the waitFor mathod to wait until it finishes processing, then you can get the output (now XML) file and stream SAX events for the pipeline, and then eventually delete the output file if you don't need it anymore. If you have a look at the FileGenerator (cocoon-2.1.X/src/java/org/apache/cocoon/generation/FileGenerator.java) it does generate SAX events from a file. So I think subclassing it could be a good choice. You should need to override only the setup and generate methods. In the setup you receive the src=... from the sitemap, which i suppose will contain your .doc document, so put it in a field, calculate the resulting output XML file name, and use this as a src for the super.setup() call. In the generate method, simply run the external soffice.exe, wait for it to finish, the call super.generate() and have the FileGenerator stream the resulting file for you. Then eventually delete it. If properly configured in the sitemap, you can have cocoon cache the result for you, so that soffice.exe isn't called too often. It's not the easier task, but I hope this helps. Simone Jonas Lundberg wrote: I have been looking around for word .doc - xml converters for a while. The docvert approach seems promising ( http://holloway.co.nz/docvert/index.html ). It uses openOffice batch conversion to achieve the transformation. It does so by invoking: C:\Program Files\OpenOffice.org 2.0\program\soffice.exe %1 macro://macros/Standard.convert.toOasisOpenDocumentFormat(%2,%3) Let's say I wanted to do this in Cocoon, as a Generator, giving a file as parameter. What would the best approach then be? Any ideas? Regards Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Simone Gianni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a Proxy Server for Cocoon
Le 30 mars 06 à 15:55, Stewart, Gary a écrit : ...I feel really bad that I asked this since it is in the FAQ and everything... well, we know our docs are not the best organized ones, so you don't have to feel so bad ;-) -Bertrand smime.p7s Description: S/MIME cryptographic signature
online survey tool based on Cocoon?
Hello, I was wondering if someone knew of an online survey tool based on Cocoon. We have been looking around, but couldn't find anything close to that. It would be great to be able to reuse some code :-) TIA, Renaud -- Renaud Richardet COO America Wyona Inc. - Open Source Content Management - Apache Lenya office +1 857 776-3195 mobile +1 617 230 9112 renaud.richardet at wyona.com http://www.wyona.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon + XQuery + SQLServer?
Hi Lars, The main problem is that there is no standardized method for doing XQueries, not even amongst the native xml databases. Both XQueryGenerator's I know of (eXist and X-Hive) use their own proprietary interfaces, so you would need to write your own for SQLServer. I think that the only out-of-the-box option you have is to call the SOAP interface from flowscript. On Mar 29, 2006, at 11:40 PM, Lars Huttar wrote: Lars Huttar wrote: Hello, Our web apps require us to get data out of SQLServer databases (in general, relational db's) as XML and integrate it with other XML data. So far we've been using XSP/esql/SQLTransformer to get the data out as XML. I'm pretty interested in trying out XQuery as an alternative, and I'm trying to find out if that's possible in Cocoon. I see there is the eXist project with its XQueryGenerator (http://exist.sourceforge.net/api/org/exist/cocoon/ XQueryGenerator.html), which looks perfect... but as far as I can tell, it will only connect to an eXist database (or a native XML database). Is that true? One of the design goals of XQuery, and reasons for its success, is that it's aimed at integrating data from relational databases as well as from XML data sources. Does anybody know whether XQueryGenerator could connect to a SQLServer instance that supports an XML view of its data, such as SQLServer 2000 + SQLXML, or SQLServer 2005? I see also that SQLServer 2005 provides XQuery support via web services (SOAP); that might be our best bet for the time being. But I'm not sure how db-vendor-independent that would be.in the long run. (Also, SQLServer doesn't support all of XQuery, e.g. no let, I'm told.) It does seem to make sense to have XQueries run on the db server in terms of network usage. I think. My primary question, though, is: is it possible to run XQuery queries now in Cocoon that connect to a SQLServer database? Thanks for any info, Lars No takers? Anybody using Cocoon + XQuery + any relational database? Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating bookmarks with JavaFlow
Simone, I've created an issue in JIRA http://issues.apache.org/jira/browse/COCOON-1819 Thanks! Harlan Simone Gianni wrote: Hi Harlan, AFAIK unfortunately there is no equivalent of createWebContinuation in javaflow. I need it too and tried to add something similar but got no much time to work on it. Could you please file a bug on http://issues.apache.org/jira/browse/COCOON about it? I will try to add a method on AbstractContinuable to create an arbitary new javaflow continuation, but it's hard stuff and cannot grant to make it. Simone Harlan Iverson wrote: Hello, I would like to port my javascript flow to JavaFlow, however I can't figure out how to create a bookmark from JavaFlow. In essense, I am looking for the JavaFlow equivalent of var bookmark = cocoon.createWebContinuation(); I have searched, and this thread is all I was able to find on the subject: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=109049896205583w=2 Thanks, Harlan Iverson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: imagedirectory png width and height not generated?
Lincoln wrote: The generator type imagedirectory doesn't appear to generate the attributes width and height for png's. Gifs and jpg are fine. Is there a workaround? Am I doing something wrong? If you look at src/java/org/apache/cocoon/util/ImageUtils.java, you'll see that it only supports gifs and jpgs for the moment. It shouldn't be too hard to add support for other filetypes though, it only requires to have their magic numbers and write some code to peek into the first bytes of the file. Jorg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling SQL Transformer exceptions
Warrell,(sorry, was busy with more urgent problems)No, I don't have mainTemplate XML element, in fact I replaced template name with:xsl:template match='sht:Row' Not sure it is right. What happens if there are SQL Exceptions from SQL Transformer, where do Exceptions go in XML?which template should be used?.I tried putting map:serialize type="xml"/ between SQLTransformer and my SQL checking file - Didn't get anything.Tried: map:transform src="" label="debug1"/ and in URL put ?debug1Nope, nothing in the browser.Then have a look at how the default system stylesheet transforms errors into html. You can find the file at build\ webapp\ stylesheets\ system\ error2html.xslt I didn't understand that. I don't have any error2html.xslt. Please elaborate.Please help !Thank you in advance,Oleg.- Original Message From: [EMAIL PROTECTED]To: users@cocoon.apache.orgSent: Tuesday, March 28, 2006 3:59:48 AMSubject: Re: Handling SQL Transformer exceptions As Askild points out you are triggering on an XML element called mainTemplate. If you have not output this from your XSL setup stage prior to the SQLTransform stage you cannot trigger on it. It might be worth taking some time to 'get your head around' the declarative nature of XSLT and the way that Cocoon pipelines work. The best way to do this is have a look at the content of the pipeline at each stage by defining a view. You can pass in a parameter from your URL to make Cocoon halt pipeline processing at any stage and render the pipeline contents back to the browser. This is how most people debug their pipelines and is invaluable during development. If you don't know how to define a view just serialize the output after the SQLTransform as type="xml" and look at the content. Then have a look at how the default system stylesheet transforms errors into html. You can find the file at build\ webapp\ stylesheets\ system\ error2html.xslt Hope this helps and you don't abandon Cocoon because it takes a declarative, separation of concerns approach which is orthogonal (at right angles) to the more common imperative one. Warrell Harries | IT Services, West Sussex County Council | Location: Northleigh House Office: +44 (0) 1243-756837 | Email: [EMAIL PROTECTED] Askild Aaberg Olsen [EMAIL PROTECTED] 28/03/2006 07:36Please respond to users@cocoon.apache.org To users@cocoon.apache.org ccSubject Re: Handling SQL Transformer exceptions Oleg Konovalov wrote: Warrell, So what you are saying is that I can not do SQL exception (or error) handling inside that SQL transformer and have to do it from outside (and after the transformer itself). Yes, that's what he says. The stylesheet preparing the SQL have no knowledge of the actuall call. How could it, since the call has yet to be made? That is a pity, because in the same sql transformer file I have lots of column validations which call it to show user errors, so it would be very convenient. You can reuse templates in different stylesheets, so it should not be to much trouble to refactor. OK, so here is my new transformer. Please tell me if it looks OK to you. Have inserted it right after SQL Trasformer [before presentation screen.] Still doesn't work. ?xml version='1.0' encoding='UTF-8'? !-- Created to handle SQLExceptions during DB insert or update -- xsl:stylesheet version='1.0'xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:sql="http://apache.org/cocoon/SQL/2.0" xsl:output method='xml' indent='yes'/xsl:template match="/"page contentxsl:apply-templates/ This says: "Process all element-nodes below root" /content/page /xsl:templatexsl:template match='mainTemplate' This says: "Match an element node named mainTemplate (mainTemplate/)". Do you have this element in your stream?xsl:if test="count(//sql:error[1]) 0" !-- Do SQLExceptions check -- error messageERROR: Can not insert/update the record into the database (not recorded)/message/error/xsl:if /xsl:template /xsl:stylesheet Thank you, Oleg. Hope this helps. Askild - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This e-mail and any attachments are confidential and intended solely for the persons addressed. If it has come to you in error please reply to advise us but you should not read it, copy it, show it to anyone else nor make any other use of its content. West Sussex County Council takes steps to ensure e-mails and attachments are virus-free but you should carry out your own checks before opening any attachment.
Re: Anyone got any nice Cocoon-based photo album lying around?
On 3/30/06, Sandor Spruit [EMAIL PROTECTED] wrote: OK. I admit that I'm being lazy. There, I said it! :) I need a web-based photo album as part of a project. Preferably Cocoon-based, perhaps using a database to store pictures and thumbs. Reason that I'm asking is that other parts of the project are taking up a lot of time, and I need to get a demo up and running ASAP. Perhaps someone has a nice example lying about - and willing to share? Sandor It's not very mature at this point, but we have a PhotoGallery Plugin[1] in Forrest[2] (which is Cocoon-based). We'd love some help fixing and polishing. --tim [1] - http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.input.PhotoGallery/ [2] - http://forrest.apache.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wikis
What Cocoon-based wikis are recommended (if any)? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wikis
Peter Flynn wrote: What Cocoon-based wikis are recommended (if any)? ///Peter The chaperon block, try: http://jsn-server5.com/cocoon/samples/blocks/chaperon/view.do?page=index Here the demo: You might want to give a look at Apache Lenya [1], we just created a wiki module to create and edit wiki pages. Here the demo: http://lenya-1.4.demo.wyona.org/default/authoring/index.html login as lenya + levi, then menu File create new wiki page HTH, Renaud [1] http://lenya.apache.org/ -- Renaud Richardet COO America Wyona Inc. - Open Source Content Management - Apache Lenya office +1 857 776-3195 mobile +1 617 230 9112 renaud.richardet at wyona.com http://www.wyona.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling SQL Transformer exceptions
A little correction: the full path to the error structure I need to populate in case of error is: /root/upload/page/content/error (/message) And I have that root template: xsl:template match="/" page content xsl:apply-templates/ /content /page /xsl:template But the condition to find SQLException in that template is: xsl:if test="count(//sql:error[1]) 0" So what is a template name I should use, "error" ? Thank you,Oleg.- Original Message From: Oleg Konovalov [EMAIL PROTECTED]To: users@cocoon.apache.orgSent: Thursday, March 30, 2006 3:36:26 PMSubject: Re: Handling SQL Transformer exceptionsWarrell,(sorry, was busy with more urgent problems)No, I don't have mainTemplate XML element, in fact I replaced template name with:xsl:template match='sht:Row' Not sure it is right. What happens if there are SQL Exceptions from SQL Transformer, where do Exceptions go in XML?which template should be used?.I tried putting map:serialize type="xml"/ between SQLTransformer and my SQL checking file - Didn't get anything.Tried: map:transform src="" label="debug1"/ and in URL put ?debug1Nope, nothing in the browser.Then have a look at how the default system stylesheet transforms errors into html. You can find the file at build\ webapp\ stylesheets\ system\ error2html.xslt I didn't understand that. I don't have any error2html.xslt. Please elaborate.Please help !Thank you in advance,Oleg.- Original Message From: [EMAIL PROTECTED]To: users@cocoon.apache.orgSent: Tuesday, March 28, 2006 3:59:48 AMSubject: Re: Handling SQL Transformer exceptions As Askild points out you are triggering on an XML element called mainTemplate. If you have not output this from your XSL setup stage prior to the SQLTransform stage you cannot trigger on it. It might be worth taking some time to 'get your head around' the declarative nature of XSLT and the way that Cocoon pipelines work. The best way to do this is have a look at the content of the pipeline at each stage by defining a view. You can pass in a parameter from your URL to make Cocoon halt pipeline processing at any stage and render the pipeline contents back to the browser. This is how most people debug their pipelines and is invaluable during development. If you don't know how to define a view just serialize the output after the SQLTransform as type="xml" and look at the content. Then have a look at how the default system stylesheet transforms errors into html. You can find the file at build\ webapp\ stylesheets\ system\ error2html.xslt Hope this helps and you don't abandon Cocoon because it takes a declarative, separation of concerns approach which is orthogonal (at right angles) to the more common imperative one. Warrell Harries | IT Services, West Sussex County Council | Location: Northleigh House Office: +44 (0) 1243-756837 | Email: [EMAIL PROTECTED] Askild Aaberg Olsen [EMAIL PROTECTED] 28/03/2006 07:36Please respond to users@cocoon.apache.org To users@cocoon.apache.org cc Subject Re: Handling SQL Transformer exceptions Oleg Konovalov wrote: Warrell, So what you are saying is that I can not do SQL exception (or error) handling inside that SQL transformer and have to do it from outside (and after the transformer itself). Yes, that's what he says. The stylesheet preparing the SQL have no knowledge of the actuall call. How could it, since the call has yet to be made? That is a pity, because in the same sql transformer file I have lots of column validations which call it to show user errors, so it would be very convenient. You can reuse templates in different stylesheets, so it should not be to much trouble to refactor. OK, so here is my new transformer. Please tell me if it looks OK to you. Have inserted it right after SQL Trasformer [before presentation screen.] Still doesn't work. ?xml version='1.0' encoding='UTF-8'? !-- Created to handle SQLExceptions during DB insert or update -- xsl:stylesheet version='1.0'xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:sql="http://apache.org/cocoon/SQL/2.0" xsl:output method='xml' indent='yes'/xsl:template match="/"page contentxsl:apply-templates/ This says: "Process all element-nodes below root" /content/page /xsl:templatexsl:template match='mainTemplate' This says: "Match an element node named mainTemplate (mainTemplate/)". Do you have this element in your stream?xsl:if test="count(//sql:error[1]) 0" !-- Do SQLExceptions check -- error messageERROR: Can not insert/update the record into the database (not recorded)/message/error/xsl:if /xsl:template /xsl:stylesheet Thank you, Oleg. Hope this helps. Askild - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This e-mail and any attachments are confidential