From mlim@encommerce.com Wed Dec 1 02:08:52 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 65808 invoked from network); 1 Dec 1999 02:08:52 -0000 Received: from mail.encommerce.com (166.90.168.4) by 63.211.145.10 with SMTP; 1 Dec 1999 02:08:52 -0000 Received: from yoshimitsu ([10.10.40.99]) by mail.encommerce.com (Netscape Messaging Server 3.62) with ESMTP id 276 for ; Tue, 30 Nov 1999 18:11:42 -0800 Message-Id: <4.2.0.58.19991130180709.00ac0460@mail.encommerce.com> X-Sender: mlim@mail.encommerce.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Tue, 30 Nov 1999 18:09:20 -0800 To: cocoon-dev@xml.apache.org From: "Mario Lim" Subject: DCP Questions!!! HELP!!! Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Hello there, I've being trying DCP on Coccon and I have a couple of questions. Please let me know if what I want to do is feasible: - How do I pass init parameters to a DCP java program. I know that the init function passes "Configurations" but I don't know how to set them in the JServ. - Inheriting from ServletDCPProcessor does not provide a destroy method. Am I missing something, Servlets have the destroy method that will be called when the servlet is killed. ---------------------------------------------------------------------- |Mario Lim | |enCommerce Inc. 2901 Patrick Henry Drive Suite 100 | |Software Engineer Santa Clara, CA. 95054 | |mlim@encommerce.com Tel: 408.222.7902 | |http://www.encommerce.com Tel: 800.318.6010 X7902 | | Fax: 408.733.7867 | |--------------------------------------------------------------------| |"The fiercest enemy is the man who has nothing left to lose." | | | | -- CSM (aka Cancerman) | ---------------------------------------------------------------------- From jh@netland.inka.de Wed Dec 1 02:20:39 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 66069 invoked from network); 1 Dec 1999 02:20:39 -0000 Received: from quechua.inka.de (HELO mail.inka.de) (mail@212.227.14.2) by 63.211.145.10 with SMTP; 1 Dec 1999 02:20:39 -0000 Received: from stiller.netland.inka.de by mail.inka.de with uucp (rmailwrap 0.4) id 11szNl-0005tO-00; Wed, 1 Dec 1999 03:20:37 +0100 Received: from owlglass (owlglass.netland.inka.de [10.1.1.5]) by stiller.netland.inka.de (8.9.3/8.9.3) with SMTP id RAA61769 for ; Tue, 30 Nov 1999 17:16:38 +0100 (CET) (envelope-from jh@netland.inka.de) Message-Id: <199911301616.RAA61769@stiller.netland.inka.de> From: "Juergen Hermann" To: "Cocoon Developers" Date: Tue, 30 Nov 1999 17:19:19 +0100 Reply-To: "Juergen Hermann" Priority: Normal X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Oracle XSL Engine Hi! When I try to active the Oracle parser/xslt combo, I get this from Cocoon 1.6-dev: Publishing Engine could not be initialized. java.lang.RuntimeException: Error creating org.apache.cocoon.parser.OracleXMLParser: does not have access at org.apache.cocoon.framework.Manager.create(Manager.java:96) at org.apache.cocoon.framework.Manager.create(Manager.java:73) at org.apache.cocoon.Engine.(Engine.java:107) at org.apache.cocoon.Cocoon.init(Cocoon.java:117) at org.apache.jserv.JServServletManager.load_init(JServServletManager.java:569) at org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:488) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:266) at org.apache.jserv.JServConnection.run(JServConnection.java:188) at java.lang.Thread.run(Thread.java:479) I checked that the Oracle stuff is in the classpath, of course. Any clues for me? Ciao, Juergen From sidney@krdl.org.sg Wed Dec 1 03:22:48 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 67703 invoked from network); 1 Dec 1999 03:22:48 -0000 Received: from rodin.krdl.org.sg (HELO krdl.org.sg) (192.122.139.27) by 63.211.145.10 with SMTP; 1 Dec 1999 03:22:48 -0000 Received: from mailhost.krdl.org.sg (mailbox.krdl.org.sg [192.122.134.30]) by krdl.org.sg (8.9.3/8.9.3) with ESMTP id LAA29855 for ; Wed, 1 Dec 1999 11:30:27 +0800 (SGT) Received: from dino (tptpc4 [192.122.131.29]) by mailhost.krdl.org.sg (8.9.3/8.9.3) with SMTP id LAA25189 for ; Wed, 1 Dec 1999 11:21:45 +0800 (SGT) Message-ID: <004401bf3bab$5588ac50$1d837ac0@krdl.org.sg> From: "Sidney Chong" To: References: Subject: Re: sqlprocessor question Date: Wed, 1 Dec 1999 11:22:44 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 ok, I'm found the problem: I was getting a null pointer exception. After a good deal of printlns (BTW, anyone knows a better way to debug cocoon code?), I came down to this: Class: ConnectionDefs Method: public Properties getQueryProperties(String name) BUG: this mtd returns null if name is not found in the query_props_table hence causing the nullpointer exception to be raised in SQLProcessor.process() (line 116) FIX: I've changed the mtd to the following: public Properties getQueryProperties(String name) { if (name == null) return default_query_props; Properties query_prop = query_props_table.get(name); if (query_prop == null) return default_query_props; return query_prop; } Donald, how does that sound? Sidney ----- Original Message ----- From: "Donald Ball" To: Sent: Wednesday, 01 December, 1999 5:22 AM Subject: Re: sqlprocessor question > On Tue, 30 Nov 1999, Sidney Chong wrote: > > > Hi, wondering if anyone can help... I'm trying to use the sqlprocessor but > > am not successful. The source file and output are as follows: > > > > I've setup the driver's classpath and in fact, I am using the same database > > in a producer. Hence I'm pretty sure the database access is ok. Any ideas? > > Offhand it looks like it's throwing an exception during connection > creation. Is there anything suspicious in your servlet engine's error > logs? > > - donald > From balld@phoenix.webslingerZ.com Wed Dec 1 03:41:05 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 68095 invoked from network); 1 Dec 1999 03:41:05 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 1 Dec 1999 03:41:05 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id WAA01055 for ; Tue, 30 Nov 1999 22:40:59 -0500 Date: Tue, 30 Nov 1999 22:40:59 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: sqlprocessor question In-Reply-To: <004401bf3bab$5588ac50$1d837ac0@krdl.org.sg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 1 Dec 1999, Sidney Chong wrote: > ok, I'm found the problem: I was getting a null pointer exception. > > After a good deal of printlns (BTW, anyone knows a better way to debug > cocoon code?), I came down to this: > > Class: ConnectionDefs > Method: public Properties getQueryProperties(String name) > BUG: this mtd returns null if name is not found in the query_props_table > hence causing the nullpointer exception to be raised in > SQLProcessor.process() (line 116) > > FIX: I've changed the mtd to the following: > > public Properties getQueryProperties(String name) { > if (name == null) return default_query_props; > Properties query_prop = query_props_table.get(name); > if (query_prop == null) return default_query_props; > return query_prop; > } > > Donald, how does that sound? Like a good patch. I also patched another bug in properties handling - I'm now returning clones of the properties objects so that specific connections don't overwrite named default properties bundles. I'll check it into CVS as soon as I figure out how. :) As far as the debugging goes - according to the cocoon model, a RuntimeException tossed out from a process indicates that all processing is complete. Since NullPointerExceptions are instances of RuntimeExceptions, cocoon isn't using its nice frontend error page for them. I'd say either: 1. Processors should always catch RuntimeExceptions and convert them into ProcessorExceptions. If this is so then it would be nice if ProcessorExceptions contained the original exceptions so that the frontend could print out the complete stack trace. 2. Cocoon should use a special exception, ProcessingDoneException or something like that as a signal that processing is complete rather than treating any RuntimeException as such, so that they'll get bumped up to the Cocoon class and get wrapped in the frontend. Or am I missing something even simpler? Clearly this needs to be addressed, since you're like the 5th person to actually report trouble debugging SQLProcessor connection creation. - donald From smuench@us.oracle.com Wed Dec 1 06:58:41 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 72044 invoked from network); 1 Dec 1999 06:58:41 -0000 Received: from inet16.us.oracle.com (209.246.15.50) by 63.211.145.10 with SMTP; 1 Dec 1999 06:58:41 -0000 Received: from usmail04 (usmail04.us.oracle.com [144.25.88.96]) by inet16.us.oracle.com (8.9.2/8.8.5) with SMTP id WAA18503 for ; Tue, 30 Nov 1999 22:58:40 -0800 (PST) Received: from smuenchlap by usmail04 with SMTP (SMI-8.6/37.9) id WAA02094; Tue, 30 Nov 1999 22:58:39 -0800 Message-ID: <00e501bf3bb8$b6b5c410$5a672382@us.oracle.com> From: "Steve Muench" To: References: <004401bf3bab$5588ac50$1d837ac0@krdl.org.sg> Subject: Re: sqlprocessor question Date: Tue, 30 Nov 1999 22:58:30 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 | After a good deal of printlns (BTW, anyone knows a better way to debug | cocoon code?), I came down to this: I use JDeveloper 3.0 that has built-in Servlet debugging to do all of my development, both on the Oracle XSQL Servlet and the poking around with Cocoon that I've done. http://technet.oracle.com/products/jdev Beat's System.out.println() any day :-) _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Development Team http://technet.oracle.com/tech/java http://technet.oracle.com/tech/xml ----- Original Message ----- From: Sidney Chong To: Sent: Tuesday, November 30, 1999 9:22 PM Subject: Re: sqlprocessor question | ok, I'm found the problem: I was getting a null pointer exception. | | After a good deal of printlns (BTW, anyone knows a better way to debug | cocoon code?), I came down to this: | | Class: ConnectionDefs | Method: public Properties getQueryProperties(String name) | BUG: this mtd returns null if name is not found in the query_props_table | hence causing the nullpointer exception to be raised in | SQLProcessor.process() (line 116) | | FIX: I've changed the mtd to the following: | | public Properties getQueryProperties(String name) { | if (name == null) return default_query_props; | Properties query_prop = query_props_table.get(name); | if (query_prop == null) return default_query_props; | return query_prop; | } | | Donald, how does that sound? | | Sidney | | | ----- Original Message ----- | From: "Donald Ball" | To: | Sent: Wednesday, 01 December, 1999 5:22 AM | Subject: Re: sqlprocessor question | | | > On Tue, 30 Nov 1999, Sidney Chong wrote: | > | > > Hi, wondering if anyone can help... I'm trying to use the sqlprocessor | but | > > am not successful. The source file and output are as follows: | > > | > > I've setup the driver's classpath and in fact, I am using the same | database | > > in a producer. Hence I'm pretty sure the database access is ok. Any | ideas? | > | > Offhand it looks like it's throwing an exception during connection | > creation. Is there anything suspicious in your servlet engine's error | > logs? | > | > - donald | > | | From smuench@us.oracle.com Wed Dec 1 06:58:49 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 72261 invoked from network); 1 Dec 1999 06:58:49 -0000 Received: from inet16.us.oracle.com (209.246.15.50) by 63.211.145.10 with SMTP; 1 Dec 1999 06:58:49 -0000 Received: from usmail04 (usmail04.us.oracle.com [144.25.88.96]) by inet16.us.oracle.com (8.9.2/8.8.5) with SMTP id WAA18542 for ; Tue, 30 Nov 1999 22:58:49 -0800 (PST) Received: from smuenchlap by usmail04 with SMTP (SMI-8.6/37.9) id WAA02173; Tue, 30 Nov 1999 22:58:49 -0800 Message-ID: <00e601bf3bb8$bc3cddb0$5a672382@us.oracle.com> From: "Steve Muench" To: References: <004401bf3bab$5588ac50$1d837ac0@krdl.org.sg> Subject: Re: sqlprocessor question Date: Tue, 30 Nov 1999 22:58:40 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 | After a good deal of printlns (BTW, anyone knows a better way to debug | cocoon code?), I came down to this: I use JDeveloper 3.0 that has built-in Servlet debugging to do all of my development, both on the Oracle XSQL Servlet and the poking around with Cocoon that I've done. http://technet.oracle.com/products/jdev Beat's System.out.println() any day :-) _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Development Team http://technet.oracle.com/tech/java http://technet.oracle.com/tech/xml ----- Original Message ----- From: Sidney Chong To: Sent: Tuesday, November 30, 1999 9:22 PM Subject: Re: sqlprocessor question | ok, I'm found the problem: I was getting a null pointer exception. | | After a good deal of printlns (BTW, anyone knows a better way to debug | cocoon code?), I came down to this: | | Class: ConnectionDefs | Method: public Properties getQueryProperties(String name) | BUG: this mtd returns null if name is not found in the query_props_table | hence causing the nullpointer exception to be raised in | SQLProcessor.process() (line 116) | | FIX: I've changed the mtd to the following: | | public Properties getQueryProperties(String name) { | if (name == null) return default_query_props; | Properties query_prop = query_props_table.get(name); | if (query_prop == null) return default_query_props; | return query_prop; | } | | Donald, how does that sound? | | Sidney | | | ----- Original Message ----- | From: "Donald Ball" | To: | Sent: Wednesday, 01 December, 1999 5:22 AM | Subject: Re: sqlprocessor question | | | > On Tue, 30 Nov 1999, Sidney Chong wrote: | > | > > Hi, wondering if anyone can help... I'm trying to use the sqlprocessor | but | > > am not successful. The source file and output are as follows: | > > | > > I've setup the driver's classpath and in fact, I am using the same | database | > > in a producer. Hence I'm pretty sure the database access is ok. Any | ideas? | > | > Offhand it looks like it's throwing an exception during connection | > creation. Is there anything suspicious in your servlet engine's error | > logs? | > | > - donald | > | | From jh@netland.inka.de Wed Dec 1 10:13:51 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 77675 invoked from network); 1 Dec 1999 10:13:51 -0000 Received: from quechua.inka.de (HELO mail.inka.de) (mail@212.227.14.2) by 63.211.145.10 with SMTP; 1 Dec 1999 10:13:51 -0000 Received: from stiller.netland.inka.de by mail.inka.de with uucp (rmailwrap 0.4) id 11t6lh-0003H0-00; Wed, 1 Dec 1999 11:13:49 +0100 Received: from owlglass (owlglass.netland.inka.de [10.1.1.5]) by stiller.netland.inka.de (8.9.3/8.9.3) with SMTP id LAA93658 for ; Wed, 1 Dec 1999 11:00:03 +0100 (CET) (envelope-from jh@netland.inka.de) Message-Id: <199912011000.LAA93658@stiller.netland.inka.de> From: "Juergen Hermann" To: "Cocoon Developers" Date: Wed, 01 Dec 1999 11:02:13 +0100 Reply-To: "Juergen Hermann" Priority: Normal X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: SQLProcessor Patch Hi! I already mailed Donald about it, this patch is missing from the current CVS (just so that nobody forgets :). RCS file: /home/cvspublic/xml- cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v retrieving revision 1.3 diff -r1.3 SQLProcessor.java 174c174 < if (query.equals("")) { --- > if (query == null || query.equals("")) { Ciao, Juergen From alex.muc@utoronto.ca Wed Dec 1 10:21:40 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 78162 invoked from network); 1 Dec 1999 10:21:40 -0000 Received: from bureau6.utcc.utoronto.ca (128.100.132.16) by 63.211.145.10 with SMTP; 1 Dec 1999 10:21:40 -0000 Received: from whq-s07-79-229.who.int ([158.232.79.229] EHLO utoronto.ca ident: NO-IDENT-SERVICE [port 1788]) by bureau6.utcc.utoronto.ca with ESMTP id <464144-19637>; Wed, 1 Dec 1999 05:21:30 -0500 Message-ID: <3844F69C.908E57B2@utoronto.ca> Date: Wed, 01 Dec 1999 11:21:16 +0100 From: Alex Muc X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: A bug and a fix in FileProducer.java Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I've been playing around with cocoon over the last few days using JSWDK-1.0 on my windows 95 machine with JDK1.2.2. I have been having some problems just getting the basic demos to work (hello.xml, etc.). I have cocoon setup and configured correctly in my classpath. In my webserver.xml file (which is the file which tells JSWDK-1.0 about it's server configuration) I had the following to setup the cocoon web application: When I made a request to the hello.xml example I got the following error: Error found handling the request. java.io.FileNotFoundException: C:\java\jswdk-1.0\cocoonwork\co\example\hello\hello.xml (The system cannot find the path specified) The problem is that cocoon is putting the "\co" directory in the path. On my system the path to the hello.xml example is: C:\java\jswdk-1.0\cocoonwork\example\hello\hello.xml (Note: The only difference between this and the path in the error message is that this path is missing the "\co" in middle of it and it really maps to a directory on my file system). I traced the problem back to the FileProducer.java file and in particular the getBaseName(HttpServletRequest request) function. Below is the function body (I've numbered the lines to make it easier to refer to): 10 return ((request.getPathInfo() == null) 20 ? request.getRealPath(request.getRequestURI()) 30 : request.getPathTranslated()).replace('\\','/'); The problem seems to be that the call to request.getRealPath() with the value of request.getRequestURI() returns the wrong string (line 20). I did some poking around and the request.getRealPath() function call is deprecated in the servlet API that ships with JSWDK-1.0. This is one of the problems. The main problem though is that the call to request.getRequestURI() returns a string which in JSWDK-1.0 includes mapping directory (in my case: "/co"), which I don't think it should because it can be any string you make up and specify within the webserver.xml file ("mydirectorymappingonmyserverontuesday" is ok in the webserver.xml file, and it doesn't have to map to anything in the actual file system). I think line 20 should read: ? request.getRealPath(request.getServletPath()) The call to request.getServletPath() returns just the path information, and none of the directory mapping info (the "/co" stuff in my case). I don't know for sure if this is a bug or it was designed on purpose this way (I'm pretty sure it's a bug), but one thing for sure is that on my system only a call to request.getServletPath() works properly, and calling request.getRequestURI() doesn't work properly. I think the above suggestion fixes the problem too. I hope this is some use to someone. If you want to discuss this more feel free to contact me. Sorry about the length of this message. Cheers. Alex Muc. From stefano@locus.apache.org Wed Dec 1 11:27:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 79782 invoked from network); 1 Dec 1999 11:27:55 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 1 Dec 1999 11:27:55 -0000 Received: (qmail 17524 invoked by uid 2016); 1 Dec 1999 11:27:54 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 17508 invoked from network); 1 Dec 1999 11:27:50 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 1 Dec 1999 11:27:50 -0000 Received: (qmail 79779 invoked by uid 1010); 1 Dec 1999 11:27:48 -0000 Date: 1 Dec 1999 11:27:48 -0000 Message-ID: <19991201112748.79778.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon EngineWrapper.java cocoon.properties stefano 99/12/01 03:27:48 Modified: . changes.xml src/org/apache/cocoon EngineWrapper.java cocoon.properties Log: Added new producer for processing document sent as request payload. Also allowed Cocoon to be called as an external module even if this is clearly a dirty hack. Revision Changes Path 1.3 +5 -1 xml-cocoon/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon/changes.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- changes.xml 1999/11/30 16:29:50 1.2 +++ changes.xml 1999/12/01 11:27:47 1.3 @@ -4,7 +4,7 @@ @@ -16,6 +16,10 @@ + + Add new producer for POST document processing, also useful for use of + Cocoon as a module (see EngineWrapper). + Fixed null problem in MemoryStore for command line operation. 1.4 +44 -11 xml-cocoon/src/org/apache/cocoon/EngineWrapper.java Index: EngineWrapper.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/EngineWrapper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- EngineWrapper.java 1999/11/09 02:29:14 1.3 +++ EngineWrapper.java 1999/12/01 11:27:48 1.4 @@ -1,4 +1,4 @@ -/*-- $Id: EngineWrapper.java,v 1.3 1999/11/09 02:29:14 dirkx Exp $ -- +/*-- $Id: EngineWrapper.java,v 1.4 1999/12/01 11:27:48 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -61,20 +61,32 @@ * This class implements wrapping methods that allow the engine to be * called even from other APIs or standalone applications. * + * NOTE: this is a dirty hack and I know it. The problem is that Cocoon is + * a servlet and the servlet API are not that easy to deal with when you + * enter other modes of operation (like command line or RMI). + * + * We will need to clean this up and remove the need of direct + * HttpServletRequest/Response emulation when we integrate with Stylebook. + * But I have more important stuff to do right now. + * * @author Stefano Mazzocchi - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:29:14 $ + * @version $Revision: 1.4 $ $Date: 1999/12/01 11:27:48 $ */ public class EngineWrapper extends Engine { - + public EngineWrapper(Configurations confs) throws Exception { super(confs); } + + public void handle(PrintWriter out, File pathToDocument) throws Exception { + this.handle(new HttpServletRequestImpl(pathToDocument), new HttpServletResponseImpl(out)); + } - public void handle(PrintWriter out, String document) throws Exception { - this.handle(new HttpServletRequestImpl(document), new HttpServletResponseImpl(out)); + public void handle(PrintWriter out, File documentPath, String document) throws Exception { + this.handle(new HttpServletRequestImpl(documentPath, document), new HttpServletResponseImpl(out)); } - + /** * Dummy implementation of the HttpServletRequest class to create a * fake but funtional request for the main engine. @@ -82,12 +94,23 @@ */ public class HttpServletRequestImpl implements HttpServletRequest { - private String pathTranslated; + private String pathTranslated = "/"; + private String document = null; - public HttpServletRequestImpl(String pathTranslated) { - this.pathTranslated = pathTranslated; + public HttpServletRequestImpl(File path) { + this(path, null); } + public HttpServletRequestImpl(File pathTranslated, String document) { + if (path != null) { + this.pathTranslated = pathTranslated.toString(); + } + + if (document != null) { + this.document = document; + } + } + public String getPathTranslated() { return this.pathTranslated; } @@ -95,8 +118,19 @@ // FIXME: this is a quick hack to make command line operation work // with FileProducer. Check this when Servlet 2.2 are in place. public String getPathInfo() { return ""; } + + public String getParameter(String name) { + if ((data != null) && (name.equalsIgnoreCase("producer"))) { + return "org.apache.cocoon.producer.ProducerFromRequest"; + } else { + return null; + } + } - public String getParameter(String name) { return null; } + public BufferedReader getReader () throws IOException { + return (document == null) ? null : new BufferedReader(new StringReader(document)); + } + public Enumeration getParameterNames() { return null; } public String[] getParameterValues(String name) { return null; } public int getContentLength() { return -1; } @@ -109,7 +143,6 @@ public String getRemoteHost() { return null; } public ServletInputStream getInputStream() throws IOException { return null; } public Object getAttribute(String name) { return null; } - public BufferedReader getReader () throws IOException { return null; } public String getCharacterEncoding () { return null; } public Cookie[] getCookies() { return null; } public String getMethod() { return null; } 1.3 +3 -1 xml-cocoon/src/org/apache/cocoon/cocoon.properties Index: cocoon.properties =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/cocoon.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cocoon.properties 1999/11/30 16:30:03 1.2 +++ cocoon.properties 1999/12/01 11:27:48 1.3 @@ -40,7 +40,9 @@ # The syntax for this is # producer.type.xxx = full.class.name # where "xxx" is the producer indentier used in the request -producer.type.file = org.apache.cocoon.producer.FileProducer +producer.type.file = org.apache.cocoon.producer.ProducerFromFile +producer.type.request = org.apache.cocoon.producer.ProducerFromRequest + producer.type.dummy = org.apache.cocoon.example.DummyProducer # When producer indication is present in the request From dirkx@webweaving.org Wed Dec 1 11:58:40 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 80341 invoked from network); 1 Dec 1999 11:58:40 -0000 Received: from ns.skylink.it (root@194.177.113.1) by 63.211.145.10 with SMTP; 1 Dec 1999 11:58:40 -0000 Received: from kim.ispra.webweaving.org (va-160.skylink.it [194.185.55.160]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id OAA28841; Wed, 1 Dec 1999 14:01:26 +0100 Received: from brunte.ispra.webweaving.org (brunte.ispra.webweaving.org [10.0.0.12]) by kim.ispra.webweaving.org (8.8.8/8.8.5) with ESMTP id LAA12778; Wed, 1 Dec 1999 11:57:03 GMT X-Passed: MX on Ispra.WebWeaving.org Wed, 1 Dec 1999 11:57:03 GMT and masked X-No-Spam: Neither the receipients nor the senders email address(s) are to be used for Unsolicited (Commercial) Email without the explicit written consent of either party; as a per-message fee is incurred for inbound and outbound traffic to the originator. Posted-Date: Wed, 1 Dec 1999 11:57:03 GMT Date: Wed, 1 Dec 1999 12:57:02 +0100 (CET) From: Dirk-Willem van Gulik X-Sender: dirkx@brunte.ispra.webweaving.org To: xerces-dev@xml.apache.org, xalan-dev@xml.apache.org, fop-dev@xml.apache.org, cocoon-dev@xml.apache.org, general@xml.apache.org Subject: Attribution of patches Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII May I gently remind _all_ committers in all xml apache projects of a small apache tradition :-) That when you commit a patch which you've gotten from someone else, (obviously after eyeballing it) from the mailing list, from the bug database, whereever... that you _really_ should mention: - who you got the patch/suggestion from - and what it fixes/does - and who else might have also eyeballed the patch and muttered approvingly. If possible, quote a message id, an email address, a bug tracking #, whatever. Unless of course the contributor has explicitly said he wants to be anonymous. The reason for this is partly fairness to the wide group of people who contribute, but mainly to comminicate things in this distributed enviroment a bit easier. Remember that typically there is no single person who has explict responsibility for funneling bug reports, tracking releases and doing all the usual project admin stuff. We have to do it ourselves. And this helps. If you want more people too look at a patch or idea, just commit it to the STATUS or todo.xml list each project has. With a ptr ot the patch and your idea's. Secondly, If you have commit access, make sure that you are subscribed to the relevant *-cvs mailing lists :-). It is a good way to avoid nasty suprizes whey you finally commit your master piece. And finally.. to remind you of general@xml.apache.org which is a list shared by all projects. Where general things are discussed. Such as this message really. It's volume is fairly low right now. In part because there are a lot of people only subscribed to a single *-dev list. Which is I guess my apology for crossposting this so nastily. Hafe vun! Dw. From balld@phoenix.webslingerZ.com Wed Dec 1 19:08:34 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 1444 invoked from network); 1 Dec 1999 19:08:34 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 1 Dec 1999 19:08:34 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id OAA06760; Wed, 1 Dec 1999 14:08:18 -0500 Date: Wed, 1 Dec 1999 14:08:16 -0500 (EST) From: Donald Ball To: Cocoon Developers , Juergen Hermann Subject: Re: SQLProcessor Patch In-Reply-To: <199912011000.LAA93658@stiller.netland.inka.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII As soon as I can figure out how to login to CVS on xml.apache.org I'll check in a whole slew of little patches. - donald On Wed, 1 Dec 1999, Juergen Hermann wrote: > Hi! > > I already mailed Donald about it, this patch is missing from the > current CVS (just so that nobody forgets :). > > RCS file: /home/cvspublic/xml- > cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v > retrieving revision 1.3 > diff -r1.3 SQLProcessor.java > 174c174 > < if (query.equals("")) { > --- > > if (query == null || query.equals("")) { > > > Ciao, Juergen > > From sidney@krdl.org.sg Thu Dec 2 04:25:48 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 33991 invoked from network); 2 Dec 1999 04:25:48 -0000 Received: from rodin.krdl.org.sg (HELO krdl.org.sg) (192.122.139.27) by 63.211.145.10 with SMTP; 2 Dec 1999 04:25:48 -0000 Received: from mailhost.krdl.org.sg (mailbox.krdl.org.sg [192.122.134.30]) by krdl.org.sg (8.9.3/8.9.3) with ESMTP id MAA28282 for ; Thu, 2 Dec 1999 12:33:17 +0800 (SGT) Received: from dino (tptpc4 [192.122.131.29]) by mailhost.krdl.org.sg (8.9.3/8.9.3) with SMTP id MAA09968 for ; Thu, 2 Dec 1999 12:24:34 +0800 (SGT) Message-ID: <003501bf3c7d$4889eb40$1d837ac0@krdl.org.sg> From: "Sidney Chong" To: References: Subject: SQLQueryCreator feature add Date: Thu, 2 Dec 1999 12:25:36 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Hi, I needed to use some session parameters (in addition to request parms) in my SQL queries but the stock SQLQueryCreator that came with cocoon-1.5 can only do request parameters (although the master_default_query_props did include session variable delimiters) hence I've decided to build it in myself. The code is attached below. It goes into the SQLQueryCreator class and replaces the getQuery() mtd. Hope this helps. Cheers Sidney /** * Variable type selection */ protected static final int SESSION=0; protected static final int REQUEST=1; public String getQuery(Connection conn, String query, Element query_element, Properties query_props, Dictionary parameters) throws Exception { HttpServletRequest req = (HttpServletRequest)parameters.get("request"); query = this.substitute(query, req, query_props.getProperty("session-variable-left-delimiter"), query_props.getProperty("session-variable-right-delimiter"), SESSION); query = this.substitute(query, req, query_props.getProperty("variable-left-delimiter"), query_props.getProperty("variable-right-delimiter"), REQUEST); return query; } protected String substitute(String query, HttpServletRequest req, String ldelim, String rdelim, int type) { int llength = ldelim.length(); int rlength = rdelim.length(); int offset = 0; StringBuffer buf = new StringBuffer(query); while (true) { int lindex = query.indexOf(ldelim,offset); if (lindex < 0) break; int rindex = query.indexOf(rdelim,offset+llength); if (rindex < 0 || rindex < lindex) break; String name = query.substring(lindex+llength,rindex); String value = this.getValue(req, name, type); if (value == null) break; buf = buf.replace(lindex, rindex+rlength, value); offset = lindex+value.length(); } return buf.toString(); } protected String getValue(HttpServletRequest req, String name, int type) { String val = null; switch ( type ) { case SESSION : val = (String) (req.getSession(true).getValue(name)); break; case REQUEST : val = req.getParameter(name); break; default : val = ""; } return val; } From CHRISTOPH.OEHLER@SBB.CH Thu Dec 2 09:11:51 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 36203 invoked from network); 2 Dec 1999 09:11:51 -0000 Received: from unknown (HELO memogw1.sbb.ch) (147.78.29.212) by 63.211.145.10 with SMTP; 2 Dec 1999 09:11:51 -0000 Received: from sbb.ch (I26741.sbb.ch [147.78.29.212]) by memogw1.sbb.ch (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id KAA01591 for ; Thu, 02 Dec 1999 10:11:19 +0100 From: CHRISTOPH.OEHLER@SBB.CH MIME-Version: 1.0 Date: Thu, 2 Dec 1999 10:01 +0100 Message-id: <199912020901.nCRG@sbb.ch> To: cocoon-dev@xml.apache.org Subject: DOM Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable --- Erhalten von I0.U150033 0512 20 5221 02.12.99 10.01 My problem is somewhat of topic, I'm sorry!! I have to DOM's (Dom_a and Dom_b). In a producer I'd like to copy a subtree of DOM_a to DOM_b. I tried to make a clone of the disired elemen of DOM_a and append it as child in DOM_b. I get an DOM_exception (WRONG_DOCUMENT_ERR). When I clone a element it looses the reference to its parent but not the documentowner. Does anyone know a easy and clean way to solve this problem? Thanks a lot! Christoph ---- 02.12.99 10.01 ---- Gesendet an --------------------------- -> cocoon-dev@xml.apache.org From balld@phoenix.webslingerZ.com Thu Dec 2 09:27:12 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 36658 invoked from network); 2 Dec 1999 09:27:12 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 2 Dec 1999 09:27:12 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id EAA13172 for ; Thu, 2 Dec 1999 04:26:47 -0500 Date: Thu, 2 Dec 1999 04:26:47 -0500 (EST) From: Donald Ball To: Cocoon Subject: SQLProcessor updated in CVS Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I finally got around to updating SQLProcessor in the new CVS server at apache.org (read: finally figured out how to use encrypted CVS. i'm slow sometimes.) I just committed my latest version of SQLProcessor to the CVS server. It's got some bug fixes (the ones y'all keep writing in about) and a couple new features, namely: * session variable support (this was suggested by Stefano Malimpensa a while back) - {@session.VARNAMEHERE}. uses toString method to convert non strings to strings, of course. * update-rows-attribute - (also from Stefano Malimpensa) if you set one on a query node with that has a nonempty doc-element attribute and contains a SQL insert, update, or delete statement, the named attribute will be created in the resultset with its value as the number of rows inserted, update, or deleted. for instance: delete from foo_table the results might look like this: I think that's it for new stuff. It's been a little hard to keep track of changes what with the move and all. I'll try to respond to the new feature suggestions and code submissions tomorrow when I'm not so sleepy; both are very welcome. It's very gratifying to be able to help others transition their sites to the cocoon world. I'd like to know who's using SQLProcessor so I can see how much time I should devote to managing its development and how much to my other areas of interest. If you don't mind, drop me a note in private email if you're using SQLProcessor (or gave up in frustration!). Thanks. - donald From stefano@locus.apache.org Thu Dec 2 11:49:39 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 39814 invoked from network); 2 Dec 1999 11:49:39 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 11:49:39 -0000 Received: (qmail 22834 invoked by uid 2016); 2 Dec 1999 11:49:28 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 22821 invoked from network); 2 Dec 1999 11:49:26 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 11:49:26 -0000 Received: (qmail 39439 invoked by uid 1010); 2 Dec 1999 11:49:25 -0000 Date: 2 Dec 1999 11:49:25 -0000 Message-ID: <19991202114925.39438.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java EngineWrapper.java stefano 99/12/02 03:49:25 Modified: src/org/apache/cocoon Cocoon.java EngineWrapper.java Log: stupid bugs that prevented compilation Revision Changes Path 1.4 +3 -3 xml-cocoon/src/org/apache/cocoon/Cocoon.java Index: Cocoon.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Cocoon.java 1999/11/09 02:29:04 1.3 +++ Cocoon.java 1999/12/02 11:49:24 1.4 @@ -1,4 +1,4 @@ -/*-- $Id: Cocoon.java,v 1.3 1999/11/09 02:29:04 dirkx Exp $ -- +/*-- $Id: Cocoon.java,v 1.4 1999/12/02 11:49:24 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -64,7 +64,7 @@ * separate different knowledge contexts in different processing layers. * * @author Stefano Mazzocchi - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:29:04 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 11:49:24 $ */ public class Cocoon extends HttpServlet implements Defaults { @@ -204,7 +204,7 @@ out = argument[i]; EngineWrapper engine = new EngineWrapper(new Configurations(properties)); - engine.handle(new PrintWriter(new FileWriter(out), true), xml); + engine.handle(new PrintWriter(new FileWriter(out), true), new File(xml)); } private static void usage() { 1.5 +7 -7 xml-cocoon/src/org/apache/cocoon/EngineWrapper.java Index: EngineWrapper.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/EngineWrapper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- EngineWrapper.java 1999/12/01 11:27:48 1.4 +++ EngineWrapper.java 1999/12/02 11:49:24 1.5 @@ -1,4 +1,4 @@ -/*-- $Id: EngineWrapper.java,v 1.4 1999/12/01 11:27:48 stefano Exp $ -- +/*-- $Id: EngineWrapper.java,v 1.5 1999/12/02 11:49:24 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -70,7 +70,7 @@ * But I have more important stuff to do right now. * * @author Stefano Mazzocchi - * @version $Revision: 1.4 $ $Date: 1999/12/01 11:27:48 $ + * @version $Revision: 1.5 $ $Date: 1999/12/02 11:49:24 $ */ public class EngineWrapper extends Engine { @@ -94,16 +94,16 @@ */ public class HttpServletRequestImpl implements HttpServletRequest { - private String pathTranslated = "/"; + private String path = "/"; private String document = null; public HttpServletRequestImpl(File path) { this(path, null); } - public HttpServletRequestImpl(File pathTranslated, String document) { + public HttpServletRequestImpl(File path, String document) { if (path != null) { - this.pathTranslated = pathTranslated.toString(); + this.path = path.toString(); } if (document != null) { @@ -112,7 +112,7 @@ } public String getPathTranslated() { - return this.pathTranslated; + return this.path; } // FIXME: this is a quick hack to make command line operation work @@ -120,7 +120,7 @@ public String getPathInfo() { return ""; } public String getParameter(String name) { - if ((data != null) && (name.equalsIgnoreCase("producer"))) { + if ((document != null) && (name.equalsIgnoreCase("producer"))) { return "org.apache.cocoon.producer.ProducerFromRequest"; } else { return null; From stefano@apache.org Thu Dec 2 11:50:57 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 40438 invoked from network); 2 Dec 1999 11:50:57 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 2 Dec 1999 11:50:57 -0000 Received: from apache.org (pv8-pri.systemy.it [194.21.255.8]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id MAA15700 for ; Thu, 2 Dec 1999 12:48:36 +0100 Message-ID: <38465A0C.50F2BF77@apache.org> Date: Thu, 02 Dec 1999 12:37:48 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: A bug and a fix in FileProducer.java References: <3844F69C.908E57B2@utoronto.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Alex Muc wrote: > > Hi, > > I've been playing around with cocoon over the last few days using > JSWDK-1.0 on my windows 95 machine with JDK1.2.2. [...] You touched a nerve: the only major Servlet API incompatibility is servlet mapping. We all know this, but we can't fix it until all servlet engines support the latest spec (which is clearly not the case). The patch you propose breaks both JServ and JRun behavior to allow Tomcat behavior. (yes, JSWDK has codename tomcat that we borrowed in Jakarta). Adding support for Tomcat and Servlet 2.2 mapping is in my todo list, but I have many other stuff to do before that. Anyway, you're welcome to come up with a solution, but make sure you don't break existing behavior or tons of users will kill you :) -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@locus.apache.org Thu Dec 2 11:52:03 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 40529 invoked from network); 2 Dec 1999 11:52:03 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 11:52:03 -0000 Received: (qmail 24516 invoked by uid 2016); 2 Dec 1999 11:52:03 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 24514 invoked from network); 2 Dec 1999 11:52:02 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 11:52:02 -0000 Received: (qmail 40492 invoked by uid 1010); 2 Dec 1999 11:52:02 -0000 Date: 2 Dec 1999 11:52:02 -0000 Message-ID: <19991202115202.40491.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/producer ProducerFromFile.java ProducerFromRequest.java FileProducer.java stefano 99/12/02 03:52:02 Added: src/org/apache/cocoon/producer ProducerFromFile.java ProducerFromRequest.java Removed: src/org/apache/cocoon/producer FileProducer.java Log: added new producers Revision Changes Path 1.1 xml-cocoon/src/org/apache/cocoon/producer/ProducerFromFile.java Index: ProducerFromFile.java =================================================================== /*-- $Id: ProducerFromFile.java,v 1.1 1999/12/02 11:52:01 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.producer; import java.io.*; import java.net.*; import java.util.*; import javax.servlet.http.*; import org.apache.cocoon.*; import org.apache.cocoon.framework.*; /** * This class implements the producer interface in order to produce a document * based on its tranlated path. This should work on most of the servlet engine * available, even if we should use getResource(). * * @author Stefano Mazzocchi * @version $Revision: 1.1 $ $Date: 1999/12/02 11:52:01 $ */ public class ProducerFromFile extends AbstractProducer implements Status { private Monitor monitor = new Monitor(10); public Reader getStream(HttpServletRequest request) throws IOException { File file = new File(this.getBasename(request)); this.monitor.watch(Utils.encode(request), file); return new InputStreamReader(new FileInputStream(file)); } public String getPath(HttpServletRequest request) { String basename = this.getBasename(request); return basename.substring(0, basename.lastIndexOf('/') + 1); } public boolean hasChanged(Object context) { return this.monitor.hasChanged(Utils.encode((HttpServletRequest) context)); } private String getBasename(HttpServletRequest request) { return ((request.getPathInfo() == null) ? request.getRealPath(request.getRequestURI()) : request.getPathTranslated()).replace('\\','/'); } public String getStatus() { return "Producer from local file"; } } 1.1 xml-cocoon/src/org/apache/cocoon/producer/ProducerFromRequest.java Index: ProducerFromRequest.java =================================================================== /*-- $Id: ProducerFromRequest.java,v 1.1 1999/12/02 11:52:01 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.producer; import java.io.*; import java.net.*; import java.util.*; import javax.servlet.http.*; import org.apache.cocoon.*; import org.apache.cocoon.framework.*; /** * This class implements the producer interface to produce a document * based on stringdata that is stored in the HttpServletRequest. The * getReader() method is used to obtain a reader on the data from the * HttpServletRequest. * * @author Gerrit Hiddink * @version $Revision: 1.1 $ $Date: 1999/12/02 11:52:01 $ */ public class ProducerFromRequest extends AbstractProducer implements Status { /** * Return a reader to the data of the HttpRequest. */ public Reader getStream(HttpServletRequest request) throws IOException { return request.getReader(); } /* * Return the path associated to the requested document. */ public String getPath(HttpServletRequest request) { return request.getPathTranslated(); } public String getStatus() { return "Producer from Servlet Request"; } } From stefano@locus.apache.org Thu Dec 2 11:52:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 40998 invoked from network); 2 Dec 1999 11:52:55 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 11:52:55 -0000 Received: (qmail 24830 invoked by uid 2016); 2 Dec 1999 11:52:55 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 24821 invoked from network); 2 Dec 1999 11:52:55 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 11:52:55 -0000 Received: (qmail 40995 invoked by uid 1010); 2 Dec 1999 11:52:54 -0000 Date: 2 Dec 1999 11:52:54 -0000 Message-ID: <19991202115254.40994.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs WD-xsp.xml stefano 99/12/02 03:52:54 Modified: docs WD-xsp.xml Log: finished xml-ize XSP WD Revision Changes Path 1.2 +283 -12 xml-cocoon/docs/WD-xsp.xml Index: WD-xsp.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/WD-xsp.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WD-xsp.xml 1999/11/30 16:29:51 1.1 +++ WD-xsp.xml 1999/12/02 11:52:54 1.2 @@ -188,8 +188,10 @@

The XSP specification defines some external entities that may be used to reduce the verbosity of XSP document, allowing the inclusion the default DTD via entity mapping. The standard way to include the XSP DTD into XSP documents is:

- - + + + ]]> @@ -204,15 +206,63 @@ designed to include as content mark-up elements that belong to other namespaces. The XSchema effort will allow multi-namespace validation.

- + + + + + + + + + + + + + + + + + + + + + + + + + ]]> +

Consider the following XML source document:

+ + - + + A Simple XSP Page +

Hi, I've been hit times.

+
+ ]]>

This simple example shows the power of content/logic/style separation. While the <title> tag has a very special meaning in the page document type, indicating the page @@ -225,13 +275,137 @@ of this specification to define a way to associate transformation sheets to pages. The associated logicsheet that uses the Java language as logic definition may look like:

- - + + + + + + + + java.lang.* + + + + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + + + + + + + + + + + currentCount() + + + + + + + + + ]]>

After applying the above logic sheet, the resulting document would be equivalent to the following:

- + + + + java.lang.* + + + + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + + + + A Sample XSP Page +

Hi, I've been hit currentCount() times.

+
+
+ + ]]> + +

At this point it's worth to note that from an XSP point of view, there is + no difference in how the XSP page was created, either directly written or + created with n levels of transformation. So, independently of whether an + XSL stylesheet or a special algorithm was used to generate the final + source code, it may look like this [Note: many key issues regarding + servlets were omitted for simplicity and this example must not be + considered mandating as a way to format XSP into servlet source code]

+ +

Note that in this example the XML document is being generated as a stream but a DOM tree is used to create it. The DOM tree can't be passed directly to @@ -242,8 +416,52 @@

To solve this problem and speed up the execution on server side XML processing, the XSP can be compiled into something like this:

+ + + private static final char[] chars_0 = {'A',' ','S','i','m','p','l','e',' ','X','S','P',' ','P','a','g','e'}; + private static final char[] chars_1 = {'H','i',' ','I','\'','v','e',' ','b','e','e','n',' ','h','i','t',' '}; + private static final char[] chars_3 = {' ','t','i','m','e','s'}; + + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + public void toSAX(Request request, DocumentHandler handler) throws SAXException { + handler.startDocument(); + handler.startElement("page", null); + handler.startElement("title", null); + handler.characters(chars_0, 0, 17); + handler.endElement("title"); + handler.startElement("p", null); + handler.characters(chars_1, 0, 17); + String string_0 = new StringBuffer.append(currentCount())).toString(); + int string_0_length = string_0.length(); + char[] chars_2 = char[string_0_length]; + string_0.getChars(0, string_0_length, chars_2, 0); + handler.characters(chars_3, 0, 6); + handler.endElement("p"); + handler.endElement("page"); + handler.endDocument(); + } + } + ]]>

The above shows one of the best features of XSP: output independence. Since the output objects are not accessible directly from the internal page @@ -310,11 +528,64 @@ programming code by scriptlet tags. The following is an example to show the different results based on the same logic and code.

- + + e = request.getParameterNames(); + if ((e != null) && (e.hasMoreElements())) { + + + Servlet Parameters + + while (e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = request.getParameter(k); + String vals[] = request.getParameterValues(k); + + + k + + + for(int i = 0; i < vals.length; i++) { + + vals[i] + + } + + + } + + + + } + + ]]>

This is the JSP equivalent:

- + + e = request.getParameterNames(); + if ((e != null) && (e.hasMoreElements())) { + + Servlet Parameters + + while (e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = request.getParameter(k); + String vals[] = request.getParameterValues(k); + out.println("<element name=\"name\">"); + k + + out.println("</element>"); + for(int i = 0; i < vals.length; i++) { + + vals[i] + + } + } + + } + ]]>

It must be noted the use of the out object in the JSP example while XSP provide specific tags to avoid that.

@@ -378,14 +649,14 @@

The following people have greatly contributed to the creation and design of this draft:

    -
  • Ricardo Rocha <rrocha@plenix.org>

  • +
  • Ricardo Rocha <ricardo@apache.org>

- +

Copyright (c) 1999 Apache XML Project. All Rights Reserved.

From stefano@locus.apache.org Thu Dec 2 11:55:06 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 41322 invoked from network); 2 Dec 1999 11:55:06 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 11:55:06 -0000 Received: (qmail 25476 invoked by uid 2016); 2 Dec 1999 11:55:05 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 25447 invoked from network); 2 Dec 1999 11:55:04 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 11:55:04 -0000 Received: (qmail 41319 invoked by uid 1010); 2 Dec 1999 11:55:04 -0000 Date: 2 Dec 1999 11:55:04 -0000 Message-ID: <19991202115504.41318.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/samples/xsp page.xsl sample.xsl stefano 99/12/02 03:55:04 Modified: samples/dcp sample-page-html.xsl samples/fo darkness-novel.xml novel-fo.xsl samples/hello hello-page-html.xsl samples/sites/java.apache.org fancy-page-html.xsl text-page-html.xsl samples/vml hello-page-vml.xsl hello-page.xml samples/wap example-portfolio.xml portfolio-html.xsl portfolio-wml.xsl samples/xsp page.xsl sample.xsl Log: fixed XSL stylesheet linking problems after the big renaming Revision Changes Path 1.2 +1 -1 xml-cocoon/samples/dcp/sample-page-html.xsl Index: sample-page-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/dcp/sample-page-html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sample-page-html.xsl 1999/11/30 16:29:58 1.1 +++ sample-page-html.xsl 1999/12/02 11:55:01 1.2 @@ -1,6 +1,6 @@ - + type="text/html" 1.2 +1 -13 xml-cocoon/samples/fo/darkness-novel.xml Index: darkness-novel.xml =================================================================== RCS file: /home/cvs/xml-cocoon/samples/fo/darkness-novel.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- darkness-novel.xml 1999/11/30 16:29:59 1.1 +++ darkness-novel.xml 1999/12/02 11:55:01 1.2 @@ -1,5 +1,5 @@ - + - - - - - - - - - - - - ]> 1.2 +3 -3 xml-cocoon/samples/fo/novel-fo.xsl Index: novel-fo.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/fo/novel-fo.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- novel-fo.xsl 1999/11/30 16:29:59 1.1 +++ novel-fo.xsl 1999/12/02 11:55:02 1.2 @@ -1,9 +1,9 @@ + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format"> - type="text/xslfo" + type="text/xslfo" - + + + - type="text/html" + type="text/html" 1.2 +3 -3 xml-cocoon/samples/sites/java.apache.org/fancy-page-html.xsl Index: fancy-page-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/sites/java.apache.org/fancy-page-html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fancy-page-html.xsl 1999/11/30 16:30:01 1.1 +++ fancy-page-html.xsl 1999/12/02 11:55:02 1.2 @@ -1,16 +1,16 @@ <?xml version="1.0"?> <!-- Author: Stefano Mazzocchi "stefano@apache.org" --> -<!-- Version: $Id: fancy-page-html.xsl,v 1.1 1999/11/30 16:30:01 stefano Exp $ --> +<!-- Version: $Id: fancy-page-html.xsl,v 1.2 1999/12/02 11:55:02 stefano Exp $ --> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output> </xsl:output> <xsl:template match="page"> - <xsl:pi name="cocoon-format">type="text/html"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> 1.2 +3 -3 xml-cocoon/samples/sites/java.apache.org/text-page-html.xsl Index: text-page-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/sites/java.apache.org/text-page-html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- text-page-html.xsl 1999/11/30 16:30:01 1.1 +++ text-page-html.xsl 1999/12/02 11:55:02 1.2 @@ -1,14 +1,14 @@ <?xml version="1.0"?> <!-- Author: Stefano Mazzocchi "stefano@apache.org" --> -<!-- Version: $Id: text-page-html.xsl,v 1.1 1999/11/30 16:30:01 stefano Exp $ --> +<!-- Version: $Id: text-page-html.xsl,v 1.2 1999/12/02 11:55:02 stefano Exp $ --> <!-- This stylesheet is for text browsers --> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> - <xsl:pi name="cocoon-format">type="text/html"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> 1.2 +2 -2 xml-cocoon/samples/vml/hello-page-vml.xsl Index: hello-page-vml.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/vml/hello-page-vml.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hello-page-vml.xsl 1999/11/30 16:30:02 1.1 +++ hello-page-vml.xsl 1999/12/02 11:55:03 1.2 @@ -16,10 +16,10 @@ session. --> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> - <xsl:pi name="cocoon-format">type="text/xml"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/xml"</xsl:processing-instruction> <DIALOG> <STEP NAME="init"> <PROMPT><xsl:apply-templates/></PROMPT> 1.2 +1 -1 xml-cocoon/samples/vml/hello-page.xml Index: hello-page.xml =================================================================== RCS file: /home/cvs/xml-cocoon/samples/vml/hello-page.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hello-page.xml 1999/11/30 16:30:02 1.1 +++ hello-page.xml 1999/12/02 11:55:03 1.2 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<?xml-stylesheet href="hello.page.vml.xsl" type="text/xsl"?> +<?xml-stylesheet href="hello-page-vml.xsl" type="text/xsl"?> <?cocoon-process type="xslt"?> <!-- Written by Theodore B. Achacoso <ted@groupserve.com> --> 1.2 +2 -2 xml-cocoon/samples/wap/example-portfolio.xml Index: example-portfolio.xml =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/example-portfolio.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- example-portfolio.xml 1999/11/30 16:30:02 1.1 +++ example-portfolio.xml 1999/12/02 11:55:03 1.2 @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<?xml-stylesheet href="portfolio.html.xsl" type="text/xsl"?> -<?xml-stylesheet href="portfolio.wml.xsl" type="text/xsl" media="wap"?> +<?xml-stylesheet href="portfolio-html.xsl" type="text/xsl"?> +<?xml-stylesheet href="portfolio-wml.xsl" type="text/xsl" media="wap"?> <?cocoon-process type="xslt"?> <!-- Written by Stefano Mazzocchi "stefano@apache.org" --> 1.2 +2 -2 xml-cocoon/samples/wap/portfolio-html.xsl Index: portfolio-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/portfolio-html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- portfolio-html.xsl 1999/11/30 16:30:02 1.1 +++ portfolio-html.xsl 1999/12/02 11:55:03 1.2 @@ -2,10 +2,10 @@ <!-- Written by Stefano Mazzocchi "stefano@apache.org" --> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="portfolio"> - <xsl:pi name="cocoon-format">type="text/html"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction> <html> <head> 1.2 +2 -2 xml-cocoon/samples/wap/portfolio-wml.xsl Index: portfolio-wml.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/portfolio-wml.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- portfolio-wml.xsl 1999/11/30 16:30:02 1.1 +++ portfolio-wml.xsl 1999/12/02 11:55:03 1.2 @@ -3,12 +3,12 @@ <!-- Written by Stefano Mazzocchi "stefano@apache.org" --> <xsl:stylesheet - xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.wapforum.org/DTD/wml_1.1.xml" result-ns="http://www.wapforum.org/DTD/wml_1.1.xml"> <xsl:template match="portfolio"> - <xsl:pi name="cocoon-format">type="text/wml"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/wml"</xsl:processing-instruction> <wml> <card id="index" title="Your Portfolio"> 1.2 +3 -3 xml-cocoon/samples/xsp/page.xsl Index: page.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/xsp/page.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- page.xsl 1999/11/09 01:51:35 1.1 +++ page.xsl 1999/12/02 11:55:04 1.2 @@ -1,10 +1,10 @@ <?xml version="1.0"?> <!-- Author: Stefano Mazzocchi "stefano@apache.org" --> -<!-- Version: $Id: page.xsl,v 1.1 1999/11/09 01:51:35 stefano Exp $ --> +<!-- Version: $Id: page.xsl,v 1.2 1999/12/02 11:55:04 stefano Exp $ --> <xsl:stylesheet - xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsp="http://www.apache.org/DTD/XSP/Layer1"> <!-- This template process the root element --> @@ -13,7 +13,7 @@ xmlns:xsp="http://www.apache.org/DTD/XSP/Layer1" language="java"> - <xsl:pi name="cocoon-format">type="text/xsp"</xsl:pi> + <xsl:processing-instruction name="cocoon-format">type="text/xsp"</xsl:processing-instruction> <xsp:logic xml:space="preserve"><![CDATA[ static private int counter = 0; 1.2 +1 -1 xml-cocoon/samples/xsp/sample.xsl Index: sample.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/xsp/sample.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sample.xsl 1999/11/20 01:18:40 1.1 +++ sample.xsl 1999/12/02 11:55:04 1.2 @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates/> From gerard.van.enk@eo.nl Thu Dec 2 13:27:02 1999 Return-Path: <gerard.van.enk@eo.nl> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 43497 invoked from network); 2 Dec 1999 13:27:02 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 2 Dec 1999 13:27:02 -0000 Received: from eo.nl (145.58.229.111) by aims.eo.nl with ESMTP (Apple Internet Mail Server 1.1.1); Thu, 2 Dec 1999 14:27:13 +0100 Sender: gerard@aims.eo.nl Message-ID: <3846900D.4FCBFC3C@eo.nl> Date: Thu, 02 Dec 1999 16:28:13 +0100 From: Gerard van Enk <gerard.van.enk@eo.nl> Organization: Evangelische Omroep X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: problem with StyleBook Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I'm trying to get stylebook module running, but I still have one problem. When I try it with the examples in de doc-directory, I get an error-message. This is how I try to run it: java -cp bin/stylebook-1.0-b1.jar:/home/gerard/xml/xml-xerces/java/bin/xerces.jar:/home/gerard/xml/xml-xerces/java/src/:/home/gerard/xml/xml-xalan/xalan.jar org.apache.stylebook.StyleBook "targetDirectory=docs/targets/" docs/book.xml /home/gerard/xml/xml-stylebook/styles/apachexml/ And this is the output: [StyleBook] Overriding targetDirectory="docs/targets/" (Old=".") [StyleBook] Project URL: "sbk:/sources/book.xml" [BasicEngine] Initializing [Loader] Parsing Project file [XalanProcessor] Applying XSL sheet "sbk:/style/stylesheets/book2project.xsl" org.apache.stylebook.CreationException: sbk:/style/resources/ (/home/gerard/xml/xml-stylebook/home/gerard/xml/xml-stylebook/styles/apachexml/resources) is not a Directory at org.apache.stylebook.producers.DirectoryProducer.produce(DirectoryProducer.java, Compiled Code) at org.apache.stylebook.Project.processEntry(Project.java, Compiled Code) at org.apache.stylebook.Project.processNodeList(Project.java, Compiled Code) at org.apache.stylebook.Project.<init>(Project.java, Compiled Code) at org.apache.stylebook.Loader.load(Loader.java, Compiled Code) at org.apache.stylebook.StyleBook.getProject(StyleBook.java, Compiled Code) at org.apache.stylebook.StyleBook.main(StyleBook.java, Compiled Code) [StyleBook] Caught org.apache.stylebook.LoadingException org.apache.stylebook.LoadingException: Processing Entry (sbk:/style/resources/ (/home/gerard/xml/xml-stylebook/home/gerard/xml/xml-stylebook/styles/apachexml/resources) is not a Directory) at org.apache.stylebook.Project.processEntry(Project.java, Compiled Code) at org.apache.stylebook.Project.processNodeList(Project.java, Compiled Code) at org.apache.stylebook.Project.<init>(Project.java, Compiled Code) at org.apache.stylebook.Loader.load(Loader.java, Compiled Code) at org.apache.stylebook.StyleBook.getProject(StyleBook.java, Compiled Code) at org.apache.stylebook.StyleBook.main(StyleBook.java, Compiled Code) [StyleBook] Error creating project I know that '/home/gerard/xml/xml-stylebook/home/gerard/xml/xml-stylebook/styles/apachexml/resources' isn't a directory, it uses twice the '/home/gerard/xml/xml-style-book/'-part. But I don't know where it gets this part of the directory-name and why it displays it twice...... I use the Blackdown jdk1.2.2 RC2 for this. Gerard From kkovach@goodyear.com Thu Dec 2 14:28:18 1999 Return-Path: <kkovach@goodyear.com> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 44761 invoked from network); 2 Dec 1999 14:28:18 -0000 Received: from internet.goodyear.com (HELO goodyear.goodyear.com) (209.57.161.2) by 63.211.145.10 with SMTP; 2 Dec 1999 14:28:18 -0000 Received: from imailhub.goodyear.com by goodyear.goodyear.com via smtpd (for [63.211.145.10]) with SMTP; 2 Dec 1999 14:28:11 UT Received: from rdsrv7.goodyear.com (rdsrv7.goodyear.com [163.243.17.7]) by goodyear.com (8.8.8/8.8.8) with ESMTP id JAA03077 for <cocoon-dev@xml.apache.org>; Thu, 2 Dec 1999 09:27:43 -0500 (EST) Received: from rds2463.goodyear.com (rds2463 [163.243.27.63]) by rdsrv7.goodyear.com with ESMTP (8.7.6/8.7.1) id JAA08012 for <cocoon-dev@xml.apache.org>; Thu, 2 Dec 1999 09:27:50 -0500 (EST) Received: from goodyear.com (localhost [127.0.0.1]) by rds2463.goodyear.com (8.8.8+Sun/8.8.8) with ESMTP id JAA12253 for <cocoon-dev@xml.apache.org>; Thu, 2 Dec 1999 09:27:50 -0500 (EST) Sender: kkovach@goodyear.com Message-ID: <384681E5.440C09AA@goodyear.com> Date: Thu, 02 Dec 1999 09:27:49 -0500 From: Kevin Kovach <kkovach@goodyear.com> X-Mailer: Mozilla 4.04 [en] (X11; U; SunOS 5.6 sun4m) MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Where can I find DocBook /StyleBook@Ibm? References: <001701bf3b17$9192b220$a50a249e@nader.STO.NO> <004901bf3b30$cb354c40$0201a8c0@betaversion.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Pierpaolo Fumagalli wrote: > > From: Nader Aeinehchi <nader@makeit.no> > > > > [empty] > > Check out the xml-stylebook module... If all tests are valid, this will be > the 1.0, later on, Cocoon :) > > Pier I'm sorry, but I've not been able to find xml-stylebook ? Could I get a little more detailed directions ? Thanks. - Kevin From balld@locus.apache.org Thu Dec 2 09:07:54 1999 Return-Path: <balld@locus.apache.org> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Delivered-To: moderator for cocoon-dev@xml.apache.org Received: (qmail 36161 invoked from network); 2 Dec 1999 09:07:54 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 09:07:54 -0000 Received: (qmail 7358 invoked by uid 2016); 2 Dec 1999 09:07:53 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 7352 invoked from network); 2 Dec 1999 09:07:53 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 09:07:53 -0000 Received: (qmail 36158 invoked by uid 1037); 2 Dec 1999 09:07:46 -0000 Date: 2 Dec 1999 09:07:46 -0000 Message-ID: <19991202090746.36157.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/processor/sql ConnectionCreator.java ConnectionDefs.java SQLProcessor.java SQLQueryCreator.java Utils.java balld 99/12/02 01:07:46 Modified: src/org/apache/cocoon/processor/sql ConnectionCreator.java ConnectionDefs.java SQLProcessor.java SQLQueryCreator.java Utils.java Log: Merged changes from transition between java.apache.org and xml.apache.org, mostly bug fixes, will summarize new features in an email to xml-cocoon list. Revision Changes Path 1.4 +4 -5 xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionCreator.java Index: ConnectionCreator.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionCreator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ConnectionCreator.java 1999/11/09 02:30:47 1.3 +++ ConnectionCreator.java 1999/12/02 09:07:45 1.4 @@ -1,5 +1,4 @@ -/*-- $Id: ConnectionCreator.java,v 1.3 1999/11/09 02:30:47 dirkx Exp $ -- - +/* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ @@ -46,8 +45,8 @@ on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - - */ +*/ + package org.apache.cocoon.processor.sql; import java.sql.*; @@ -57,7 +56,7 @@ * Utility methods for this processor. * * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:30:47 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:45 $ */ public class ConnectionCreator { 1.4 +11 -8 xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java Index: ConnectionDefs.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ConnectionDefs.java 1999/11/09 02:30:47 1.3 +++ ConnectionDefs.java 1999/12/02 09:07:46 1.4 @@ -1,5 +1,4 @@ -/*-- $Id: ConnectionDefs.java,v 1.3 1999/11/09 02:30:47 dirkx Exp $ -- - +/* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ @@ -46,8 +45,8 @@ on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - */ + package org.apache.cocoon.processor.sql; import org.w3c.dom.*; @@ -58,7 +57,7 @@ * Default connection values. * * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:30:47 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ */ public class ConnectionDefs { @@ -93,6 +92,7 @@ master_default_query_props.put("query-attribute",""); master_default_query_props.put("skip-rows-attribute",""); master_default_query_props.put("max-rows-attribute",""); + master_default_query_props.put("update-rows-attribute",""); master_default_query_props.put("variable-left-delimiter","{@"); master_default_query_props.put("variable-right-delimiter","}"); master_default_query_props.put("session-variable-left-delimiter","{@session."); @@ -178,13 +178,16 @@ ConnectionCreator creator = (ConnectionCreator)creators.get(name); return creator.getConnection(); } - - public Properties getQueryProperties() { return default_query_props; } + public Properties getQueryProperties() { + return (Properties)default_query_props.clone(); + } public Properties getQueryProperties(String name) { - if (name == null) return default_query_props; - return (Properties)query_props_table.get(name); + if (name == null || name.equals("")) return getQueryProperties(); + Properties props = (Properties)query_props_table.get(name); + if (props != null) return getQueryProperties(); + return (Properties)props.clone(); } } 1.4 +79 -59 xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java Index: SQLProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SQLProcessor.java 1999/11/09 02:30:47 1.3 +++ SQLProcessor.java 1999/12/02 09:07:46 1.4 @@ -1,5 +1,4 @@ -/*-- $Id: SQLProcessor.java,v 1.3 1999/11/09 02:30:47 dirkx Exp $ -- - +/* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ @@ -46,12 +45,13 @@ on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - */ + package org.apache.cocoon.processor.sql; import java.net.URLEncoder; import java.sql.*; +import java.text.*; import java.util.*; import javax.servlet.http.HttpServletRequest; import org.w3c.dom.*; @@ -62,7 +62,7 @@ * A processor that performs SQL database queries. * * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:30:47 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ */ public class SQLProcessor extends AbstractActor implements Processor, Status { @@ -169,9 +169,15 @@ String query_attribute = query_props.getProperty("query-attribute"); String skip_rows_attribute = query_props.getProperty("skip-rows-attribute"); String max_rows_attribute = query_props.getProperty("max-rows-attribute"); + String update_rows_attribute = query_props.getProperty("update-rows-attribute"); String query = query_props.getProperty("query"); + String namespace = query_props.getProperty("namespace"); + DateFormat timestamp_format = null; + String timestamp_format_string = query_props.getProperty("timestamp_format"); + if (timestamp_format_string != null) + timestamp_format = new SimpleDateFormat(timestamp_format_string); try { - if (query.equals("")) { + if (query == null || query.equals("")) { SQLQueryCreator query_creator; if (query_creator_name != null) { if (query_creators.containsKey(query_creator_name)) { @@ -193,14 +199,14 @@ } query = query_creator.getQuery(conn,query_buffer.toString(),query_element,query_props,parameters); } - System.err.println("QUERY IS "+query); Statement st = conn.createStatement(); ResultSet rs; Node results_node; + Element results_element = null; if (doc_element_name.equals("")) { results_node = document.createDocumentFragment(); } else { - Element results_element = document.createElement(doc_element_name); + results_element = Utils.createElement(document,namespace,doc_element_name); results_node = results_element; if (!count_attribute.equals("")) { String count_query = getCountQuery(query); @@ -218,71 +224,85 @@ if (!max_rows_attribute.equals("")) results_element.setAttribute(max_rows_attribute,""+max_rows); } - rs = st.executeQuery(query); - ResultSetMetaData md = rs.getMetaData(); - Column columns[] = getColumns(md,tag_case); - int id_attribute_column_index = -1; - if (create_id_attribute) { - for (int i=0; i<columns.length; i++) { - if (columns[i].name.equals(id_attribute_column)) { - id_attribute_column_index = i; + if (!update_rows_attribute.equals("")) { + int update_rows = st.executeUpdate(query); + if (results_element != null) + results_element.setAttribute(update_rows_attribute,""+update_rows); + } else { + rs = st.executeQuery(query); + ResultSetMetaData md = rs.getMetaData(); + Column columns[] = getColumns(md,tag_case); + int id_attribute_column_index = -1; + if (create_id_attribute) { + for (int i=0; i<columns.length; i++) { + if (columns[i].name.equals(id_attribute_column)) { + id_attribute_column_index = i; + } } } - } - - int null_mode = OMIT_NULLS; - if (null_indicator.equals("y")) { - null_mode = ATTRIBUTE_NULLS; - } else if (null_indicator.equals("yes")) { - null_mode = ATTRIBUTE_NULLS; - } - - Element column_element; - Node row_node = results_node; - Element row_element = null; - String value; - int count = 0; - if (skip_rows > 0) { - while (rs.next()) { - count++; - if (count == skip_rows) break; + int null_mode = OMIT_NULLS; + if (null_indicator.equals("y")) { + null_mode = ATTRIBUTE_NULLS; + } else if (null_indicator.equals("yes")) { + null_mode = ATTRIBUTE_NULLS; } - } - while (rs.next()) { - if (create_row_elements) { - row_element = document.createElement(row_element_name); - row_node = row_element; - if (create_id_attribute && id_attribute_column_index == -1) { - row_element.setAttribute(id_attribute,"" + count); + Element column_element; + Node row_node = results_node; + Element row_element = null; + String value; + int count = 0; + if (skip_rows > 0) { + while (rs.next()) { + count++; + if (count == skip_rows) break; } } - for (int i=0; i<columns.length; i++) { - value = rs.getString(i+1); - if (create_row_elements && create_id_attribute && id_attribute_column_index == i) { - row_element.setAttribute(id_attribute,value); - continue; + while (rs.next()) { + if (create_row_elements) { + row_element = Utils.createElement(document,namespace,row_element_name); + row_node = row_element; + if (create_id_attribute && id_attribute_column_index == -1) { + row_element.setAttribute(id_attribute,"" + count); + } } - if (value == null && null_mode == OMIT_NULLS) continue; - column_element = document.createElement(columns[i].name); - if (value == null && null_mode == ATTRIBUTE_NULLS) { - column_element.setAttribute("NULL","YES"); - column_element.appendChild(document.createTextNode("")); - } else { - column_element.appendChild(document.createTextNode(value)); + + for (int i=0; i<columns.length; i++) { + switch(columns[i].type) { + case Types.TIMESTAMP: + if (timestamp_format != null) + value = timestamp_format.format(rs.getDate(i+1)); + else + value = rs.getString(i+1); + break; + default: + value = rs.getString(i+1); + } + if (create_row_elements && create_id_attribute && id_attribute_column_index == i) { + row_element.setAttribute(id_attribute,value); + continue; + } + if (value == null && null_mode == OMIT_NULLS) continue; + column_element = Utils.createElement(document,namespace,columns[i].name); + if (value == null && null_mode == ATTRIBUTE_NULLS) { + column_element.setAttribute("NULL","YES"); + column_element.appendChild(document.createTextNode("")); + } else { + column_element.appendChild(document.createTextNode(value)); + } + row_node.appendChild(column_element); } - row_node.appendChild(column_element); + if (create_row_elements) results_node.appendChild(row_node); + if (count-skip_rows == max_rows-1) break; + count++; } - if (create_row_elements) results_node.appendChild(row_node); - if (count-skip_rows == max_rows-1) break; - count++; + rs.close(); } - - rs.close(); st.close(); conn.commit(); + st.close(); conn.commit(); query_element.getParentNode().replaceChild(results_node,query_element); } catch (SQLException e) { - Element error_element = Utils.createErrorElement(document,query_props,e); + Element error_element = Utils.createErrorElement(document,namespace,query_props,e); query_element.getParentNode().replaceChild(error_element,query_element); conn.rollback(); } finally { 1.4 +3 -4 xml-cocoon/src/org/apache/cocoon/processor/sql/SQLQueryCreator.java Index: SQLQueryCreator.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLQueryCreator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SQLQueryCreator.java 1999/11/09 02:30:48 1.3 +++ SQLQueryCreator.java 1999/12/02 09:07:46 1.4 @@ -1,5 +1,4 @@ -/*-- $Id: SQLQueryCreator.java,v 1.3 1999/11/09 02:30:48 dirkx Exp $ -- - +/* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ @@ -46,8 +45,8 @@ on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - */ + package org.apache.cocoon.processor.sql; import java.sql.*; @@ -63,7 +62,7 @@ * object keyed from "request". * * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:30:48 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ */ public class SQLQueryCreator { 1.4 +72 -9 xml-cocoon/src/org/apache/cocoon/processor/sql/Utils.java Index: Utils.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/Utils.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Utils.java 1999/11/09 02:30:48 1.3 +++ Utils.java 1999/12/02 09:07:46 1.4 @@ -1,5 +1,4 @@ -/*-- $Id: Utils.java,v 1.3 1999/11/09 02:30:48 dirkx Exp $ -- - +/* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ @@ -46,21 +45,21 @@ on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - */ + package org.apache.cocoon.processor.sql; -import java.io.PrintWriter; -import java.io.StringWriter; +import java.io.*; import java.text.StringCharacterIterator; -import java.util.Properties; +import java.util.*; import org.w3c.dom.*; +import javax.servlet.http.*; /** * Utility methods for this processor. * * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a> - * @version $Revision: 1.3 $ $Date: 1999/11/09 02:30:48 $ + * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ */ public class Utils { @@ -72,7 +71,7 @@ public static final String ERROR_STACKTRACE_ELEMENT = "error-stacktrace-element"; public static final String ERROR_MESSAGE_TEXT = "error-message-text"; - public static Element createErrorElement(Document document, Properties props, Exception e) { + public static Element createErrorElement(Document document, String namespace, Properties props, Exception e) { Element element = document.createElement(props.getProperty(ERROR_ELEMENT)); String message_attribute = props.getProperty(ERROR_MESSAGE_ATTRIBUTE); String message_element = props.getProperty(ERROR_MESSAGE_ELEMENT); @@ -88,7 +87,7 @@ String stacktrace_attribute = props.getProperty(ERROR_STACKTRACE_ATTRIBUTE); String stacktrace_element = props.getProperty(ERROR_STACKTRACE_ELEMENT); String stacktrace = null; - if (!stacktrace_attribute.equals("") && !stacktrace_element.equals("")) { + if (!stacktrace_attribute.equals("") || !stacktrace_element.equals("")) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); @@ -111,5 +110,69 @@ if (c == target) sb.append(replacement); else sb.append(c); return sb.toString(); } + + public static Element createElement(Document document, String namespace, String name) { + if (namespace == null) + return document.createElement(name); + return document.createElement(namespace+':'+name); + } + + public static Hashtable getValues(HttpServletRequest req) { + Hashtable table = new Hashtable(); + Enumeration e = req.getParameterNames(); + while (e.hasMoreElements()) { + String name = (String)e.nextElement(); + String values[] = req.getParameterValues(name); + if (values.length == 1) table.put(name,values[0]); + else table.put(name,values); + } + return table; + } + + public static Properties getAttributes(Element element, HttpServletRequest req, Properties master) { + Properties props; + if (master == null) props = new Properties(); + else props = new Properties(master); + NamedNodeMap attributes = element.getAttributes(); + for (int i=0; i<attributes.getLength(); i++) { + Node attribute = attributes.item(i); + props.put(attribute.getNodeName(),attribute.getNodeValue()); + } + if (req != null) { + Enumeration e = req.getParameterNames(); + while (e.hasMoreElements()) { + String name = (String)e.nextElement(); + props.put(name,req.getParameter(name)); + } + } + return props; + } + + public static Vector split(String source, char seperator) { + Vector results = new Vector(); + if (source == null) return results; + StringBuffer sb = new StringBuffer(); + StringCharacterIterator iter = new StringCharacterIterator(source); + char c; + for (c = iter.first(); c != iter.DONE; c = iter.next()) + if (c == seperator) { + results.addElement(sb.toString()); + sb = new StringBuffer(); + } else sb.append(c); + if (c != seperator) results.addElement(sb.toString()); + return results; + } + + public static String join(Vector vector, char joiner) { + Enumeration e = vector.elements(); + StringBuffer sb = new StringBuffer(); + if (e.hasMoreElements()) sb.append(e.nextElement()); + while (e.hasMoreElements()) { + sb.append(joiner); + sb.append(e.nextElement()); + } + return sb.toString(); + } + } From tng@wineasy.se Thu Dec 2 20:24:50 1999 Return-Path: <tng@wineasy.se> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 53818 invoked from network); 2 Dec 1999 20:24:50 -0000 Received: from mail.wineasy.se (root@195.42.198.21) by 63.211.145.10 with SMTP; 2 Dec 1999 20:24:50 -0000 Received: from ap (pm2-149.wineasy.se [195.42.193.149]) by mail.wineasy.se with SMTPœ id dB2KOPo30293 for <cocoon-dev@xml.apache.org>; Thu, 2 Dec 1999 21:24:31 +0100 Received: by ap with Microsoft Mail id <01BF3D0B.3CC8F240@ap>; Thu, 2 Dec 1999 21:21:46 +0100 Message-ID: <01BF3D0B.3CC8F240@ap> From: Niklas Agevik <tng@wineasy.se> To: "'cocoon-dev@xml.apache.org'" <cocoon-dev@xml.apache.org> Subject: Cocoon gives "Internal Error 500" with Apache 1.3.6 Date: Thu, 2 Dec 1999 21:21:31 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="---- =_NextPart_000_01BF3D0B.3CEA8400" ------ =_NextPart_000_01BF3D0B.3CEA8400 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Im not sure if this is a bug but i have consulted all available = information on cocoon. After installing Cocoon according to the = instructions Apache gives me the following error when trying to open an = XML-document: [02/12/1999 21:22:35:105] (ERROR) ajp11: Servlet Error: java.lang.NoSuchMethodError: java.io.File: method toURL()Ljava/net/URL; not found: java.io.File: method toURL()Ljava/net/URL; not found [02/12/1999 21:22:35:105] (ERROR) an error returned handling request via protocol "ajpv11" HTTP/1.1 500 Internal Server Error Date: Thu, 02 Dec 1999 20:22:35 GMT Server: Apache/1.3.6 (Unix) ApacheJServ/1.0 Connection: close Content-Type: text/html=20 I am using Apache1.3.6, JDK 1.2.2, JSDK 2.0. ------ =_NextPart_000_01BF3D0B.3CEA8400 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+Ii4UAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEkAYA0AEAAAEAAAAQAAAAAwAAMAIAAAAL AA8OAAAAAAIB/w8BAAAAUQAAAAAAAACBKx+kvqMQGZ1uAN0BD1QCAAAAAGNvY29vbi1kZXZAeG1s LmFwYWNoZS5vcmcAU01UUABjb2Nvb24tZGV2QHhtbC5hcGFjaGUub3JnAAAAAB4AAjABAAAABQAA AFNNVFAAAAAAHgADMAEAAAAaAAAAY29jb29uLWRldkB4bWwuYXBhY2hlLm9yZwAAAAMAFQwBAAAA AwD+DwYAAAAeAAEwAQAAABwAAAAnY29jb29uLWRldkB4bWwuYXBhY2hlLm9yZycAAgELMAEAAAAf AAAAU01UUDpDT0NPT04tREVWQFhNTC5BUEFDSEUuT1JHAAADAAA5AAAAAAsAQDoBAAAAHgD2XwEA AAAaAAAAY29jb29uLWRldkB4bWwuYXBhY2hlLm9yZwAAAAIB918BAAAAUQAAAAAAAACBKx+kvqMQ GZ1uAN0BD1QCAAAAAGNvY29vbi1kZXZAeG1sLmFwYWNoZS5vcmcAU01UUABjb2Nvb24tZGV2QHht bC5hcGFjaGUub3JnAAAAAAMA/V8BAAAAAwD/XwAAAAACAfYPAQAAAAQAAAAAAAACCWYBBIABADQA AABDb2Nvb24gZ2l2ZXMgIkludGVybmFsIEVycm9yIDUwMCIgd2l0aCBBcGFjaGUgMS4zLjYAcxAB BYADAA4AAADPBwwAAgAVABUAHwAEADEBASCAAwAOAAAAzwcMAAIAFQAPACUABAAxAQEJgAEAIQAA AEY2RkEzQTIzRjhBOEQzMTE4ODM3MDA0MEM3N0FGOTQ2ACUHAQOQBgDIBQAAIQAAAAsAAgABAAAA CwAjAAAAAAADACYAAAAAAAsAKQAAAAAAAwAuAAAAAAADADYAAAAAAEAAOQDgzHDSAj2/AR4AcAAB AAAANAAAAENvY29vbiBnaXZlcyAiSW50ZXJuYWwgRXJyb3IgNTAwIiB3aXRoIEFwYWNoZSAxLjMu NgACAXEAAQAAABYAAAABvz0C0lgjOvr3qPgR04g3AEDHevlGAAAeAB4MAQAAAAUAAABTTVRQAAAA AB4AHwwBAAAADwAAAHRuZ0B3aW5lYXN5LnNlAAADAAYQE8PvRQMABxBQAgAAHgAIEAEAAABlAAAA SEVMTE8sSU1OT1RTVVJFSUZUSElTSVNBQlVHQlVUSUhBVkVDT05TVUxURURBTExBVkFJTEFCTEVJ TkZPUk1BVElPTk9OQ09DT09OQUZURVJJTlNUQUxMSU5HQ09DT09OQUNDTwAAAAACAQkQAQAAAJwC AACYAgAAmAMAAExaRnVMqY1hAwAKAHJjcGcxMjUWMgD4C2BuDhAwNTOdAfcgAqQD4wIAY2gKwGBz ZXQwIAcTAoB9OQqBdWMAUAsDDwQzM0cLpwqxCoBIZWwJACyDE8QTxEltIG5vBUAScwhwZSAGkCB0 aAcEABXwBCBhIGJ1Z9MWwQVAaSARAHYV4AWg8QCAdWx0CYAWoBRAFqBedgtwC2ACYBXhbgIQcukA wHRpAiAgGdEFoAWgvQIgLhFwAYAEkBkxcwGQvxRAC4AW8AhQGlIWoGMFoXJkG4J0bxYhGSIbMHJ3 EjAZsgQgQQqwEPAV4Gf+aReQBCAHgBzzAhAUQQPw7xuRBJADYAXAdx0QA6AdcDJ5HJVvcCBxA5FY TWhMLWQaQHUHgAIwOmEUilswMi8OICOAOQEj0CAyMToyMjoIMzU6D0FdIChFIFJST1IpFqBqcLYx JCAGUnYZEAVARSACVSKFICcgahihLg8CLkhOb1MSMGhNEUBoTwRwJmQnRBnALkYDEGUfJcAHgChy Jscc0FVSTEgoKUwnUi9uEUAvjSsROxVjAhB1bmQpD/cqHysvLDkgI18kbwBwJsf7H/QJcHQIcC+g GEARACzAmxtzCXBxClAbMCB2BzCcIHADYBzQCOEgIiVxAnYloCIgSFRUUMExAC4xIDUwE7UnIX5J AjAEkQdAJdMa4SZjIAZEGaAtsVRodSwgVzDgOaAFkCAxRDAxtCB4R01UONUmuB4UN0Ez1C42JOBV AwB4JVAeFN5KJeI3QRFgCFBuL6Ado30lwGMJABEwPyIYIAIwLVxUeSFQJrgYIHgr4Gi8dG0DIRSa FqAVUHUAkI8bkR4UPWM6QEpESzrAbC4yROBEcVNEoUTwMBYuE8QR8QBGcAMAEBAAAAAAAwAREAEA AAADAIAQ/////0AABzBguPz+AT2/AUAACDBguPz+AT2/AQsAAIAIIAYAAAAAAMAAAAAAAABGAAAA AAOFAAAAAAAAAwACgAggBgAAAAAAwAAAAAAAAEYAAAAAEIUAAAAAAAADAAWACCAGAAAAAADAAAAA AAAARgAAAABShQAAtw0AAB4AJYAIIAYAAAAAAMAAAAAAAABGAAAAAFSFAAABAAAABAAAADguMAAD ACaACCAGAAAAAADAAAAAAAAARgAAAAABhQAAAAAAAAsAL4AIIAYAAAAAAMAAAAAAAABGAAAAAA6F AAAAAAAAAwAwgAggBgAAAAAAwAAAAAAAAEYAAAAAEYUAAAAAAAADADKACCAGAAAAAADAAAAAAAAA RgAAAAAYhQAAAAAAAB4AQYAIIAYAAAAAAMAAAAAAAABGAAAAADaFAAABAAAAAQAAAAAAAAAeAEKA CCAGAAAAAADAAAAAAAAARgAAAAA3hQAAAQAAAAEAAAAAAAAAHgBDgAggBgAAAAAAwAAAAAAAAEYA AAAAOIUAAAEAAAABAAAAAAAAAB4APQABAAAAAQAAAAAAAAADAA00/TcAAPs5 ------ =_NextPart_000_01BF3D0B.3CEA8400-- From balld@phoenix.webslingerZ.com Thu Dec 2 20:31:09 1999 Return-Path: <balld@phoenix.webslingerZ.com> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 54352 invoked from network); 2 Dec 1999 20:31:09 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 2 Dec 1999 20:31:09 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id PAA17826 for <cocoon-dev@xml.apache.org>; Thu, 2 Dec 1999 15:30:40 -0500 Date: Thu, 2 Dec 1999 15:30:40 -0500 (EST) From: Donald Ball <balld@webslingerZ.com> To: "'cocoon-dev@xml.apache.org'" <cocoon-dev@xml.apache.org> Subject: Re: Cocoon gives "Internal Error 500" with Apache 1.3.6 In-Reply-To: <01BF3D0B.3CC8F240@ap> Message-ID: <Pine.LNX.4.10.9912021528300.17255-100000@phoenix.webslingerZ.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII A) It's likely that this post should go to the cocoon-users mailing list since we have such a beast now. Unless someone steps in to correct me, please direct any followups to that list. B) What happens when you try to hit the URL: http://www.example.com/Cocoon.xml and is there anything interesting in your server error logs? - donald On Thu, 2 Dec 1999, Niklas Agevik wrote: > > Hello, > > Im not sure if this is a bug but i have consulted all available > information on cocoon. After installing Cocoon according to the > instructions Apache gives me the following error when trying to open > an XML-document: > > [02/12/1999 21:22:35:105] (ERROR) ajp11: Servlet Error: > java.lang.NoSuchMethodError: java.io.File: method > toURL()Ljava/net/URL; not found: java.io.File: method > toURL()Ljava/net/URL; not found [02/12/1999 21:22:35:105] (ERROR) an > error returned handling request via protocol "ajpv11" HTTP/1.1 500 > Internal Server Error Date: Thu, 02 Dec 1999 20:22:35 GMT Server: > Apache/1.3.6 (Unix) ApacheJServ/1.0 Connection: close Content-Type: > text/html > > I am using Apache1.3.6, JDK 1.2.2, JSDK 2.0. From stefano@locus.apache.org Fri Dec 3 00:09:04 1999 Return-Path: <stefano@locus.apache.org> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58028 invoked from network); 3 Dec 1999 00:09:04 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 00:09:04 -0000 Received: (qmail 9347 invoked by uid 2016); 3 Dec 1999 00:09:03 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 9322 invoked from network); 3 Dec 1999 00:09:02 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 00:09:02 -0000 Received: (qmail 57956 invoked by uid 1010); 3 Dec 1999 00:07:17 -0000 Date: 3 Dec 1999 00:07:17 -0000 Message-ID: <19991203000717.57955.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon build.xml changes.xml todo.xml stefano 99/12/02 16:07:17 Modified: . build.xml changes.xml todo.xml Log: we are now able to build the xml.apache.org/cocoon web site Revision Changes Path 1.2 +28 -5 xml-cocoon/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 1999/11/30 16:29:50 1.1 +++ build.xml 1999/12/03 00:07:16 1.2 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> <!-- =================================================================== @@ -34,7 +34,7 @@ Copyright: Copyright (c) 1999 The Apache Software Foundation. - $Id: build.xml,v 1.1 1999/11/30 16:29:50 stefano Exp $ + $Id: build.xml,v 1.2 1999/12/03 00:07:16 stefano Exp $ ==================================================================== --> @@ -48,7 +48,9 @@ <property name="debug" value="off"/> <property name="src.dir" value="./src"/> - <property name="stylesheets" value="./docs/stylesheets"/> + <property name="docs.dir" value="./docs"/> + <property name="sheets.dir" value="./stylesheets"/> + <property name="images.dir" value="./resources"/> <property name="version.file" value="org/apache/cocoon/Defaults.java"/> <!-- this sucks! we should have a way to tell something like "org.apache.cocoon.*" @@ -64,6 +66,8 @@ <property name="dist.dir" value="./dist"/> + <property name="site.dir" value="../xml-site/sources/cocoon"/> + <target name="prepare"> <!-- create temporary build dirs --> <mkdir dir="${build.dir}"/> @@ -93,8 +97,8 @@ version="true" use="true" windowtitle="${name} API" - doctitle="<h2>${name}</h2>" - bottom="<font size="-1">Copyright © ${YEAR} Apache XML Project. All Rights Reserved.</font>" + doctitle="${name}" + bottom="Copyright © ${YEAR} Apache XML Project. All Rights Reserved." /> </target> @@ -114,6 +118,25 @@ </target> + <target name="site"> + <copyfile src="${docs.dir}/book.xml" dest="${site.dir}/../cocoon.xml"/> + <xslt src="${docs.dir}/index.xml" dest="${site.dir}/index-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/installing.xml" dest="${site.dir}/installing-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/cocoon2.xml" dest="${site.dir}/cocoon2-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/dcpprocessor.xml" dest="${site.dir}/dcpprocessor-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/sqlprocessor.xml" dest="${site.dir}/sqlprocessor-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/license.xml" dest="${site.dir}/license-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/javadoc.xml" dest="${site.dir}/javadoc-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/guide.xml" dest="${site.dir}/guide-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/technologies.xml" dest="${site.dir}/technologies-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/dynamic.xml" dest="${site.dir}/dynamic-sbk.xml" sheet="${sheets.dir}/document-stylebook.xsl"/> + <xslt src="${docs.dir}/faq.xml" dest="${site.dir}/faq-sbk.xml" sheet="${sheets.dir}/faq-stylebook.xsl"/> + <xslt src="${docs.dir}/WD-xsp.xml" dest="${site.dir}/WD-xsp-sbk.xml" sheet="${sheets.dir}/spec-stylebook.xsl"/> + <xslt src="changes.xml" dest="${site.dir}/changes-sbk.xml" sheet="${sheets.dir}/changes-stylebook.xsl"/> + <xslt src="todo.xml" dest="${site.dir}/todo-sbk.xml" sheet="${sheets.dir}/todo-stylebook.xsl"/> + <copydir src="${images.dir}" dest="${site.dir}/images"/> + </target> + <target name="clean"> <deltree dir="${build.dir}"/> <deltree dir="${dist.dir}"/> 1.4 +5 -6 xml-cocoon/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon/changes.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- changes.xml 1999/12/01 11:27:47 1.3 +++ changes.xml 1999/12/03 00:07:16 1.4 @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE changes SYSTEM "./dtd/changes-v10.dtd"> +<!-- <!DOCTYPE changes SYSTEM "./dtd/changes-v10.dtd"> --> <!-- History of Cocoon changes - $Id: changes.xml,v 1.3 1999/12/01 11:27:47 stefano Exp $ + $Id: changes.xml,v 1.4 1999/12/03 00:07:16 stefano Exp $ --> <changes title="Cocoon History of Changes"> @@ -12,10 +12,9 @@ <person name="Stefano Mazzocchi" email="stefano@apache.org" id="SM"/> <person name="Donald Ball" email="balld@webslingerZ.com" id="DB"/> <person name="Ricardo Rocha" email="rrocha@plenix.org" id="RR"/> - <person name="Kenneth Murphy" email="murphyk@umsystem.edu" id="KM"/> </devs> - <release version="1.6-dev" date=""> + <release version="1.6-dev" date="not yet released"> <action dev="SM" type="add" due-to="Gerrit Hiddink" due-to-email="grit@wwcn.org"> Add new producer for POST document processing, also useful for use of Cocoon as a module (see EngineWrapper). @@ -118,7 +117,7 @@ <action dev="SM" type="update"> Updated documentation. </action> - <action dev="KM" type="add"> + <action dev="SM" type="add" due-to="Kenneth Murphy" due-to-email="murphyk@umsystem.edu"> Added the plan for JavaDOC XML generator and the JavaDOC DTD working draft. </action> <action dev="SM" type="update"> 1.3 +22 -26 xml-cocoon/todo.xml Index: todo.xml =================================================================== RCS file: /home/cvs/xml-cocoon/todo.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- todo.xml 1999/11/30 16:29:50 1.2 +++ todo.xml 1999/12/03 00:07:16 1.3 @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE todo SYSTEM "./dtd/todo-v10.dtd"> +<!-- <!DOCTYPE todo SYSTEM "./dtd/todo-v10.dtd"> --> <!-- History of Cocoon changes - $Id: todo.xml,v 1.2 1999/11/30 16:29:50 stefano Exp $ + $Id: todo.xml,v 1.3 1999/12/03 00:07:16 stefano Exp $ --> <todo title="Cocoon Things To Do"> @@ -12,59 +12,55 @@ <person name="Stefano Mazzocchi" email="stefano@apache.org" id="SM"/> <person name="Donald Ball" email="balld@webslingerZ.com" id="DB"/> <person name="Ricardo Rocha" email="rrocha@plenix.org" id="RR"/> - <person name="Kenneth Murphy" email="murphyk@umsystem.edu" id="KM"/> <person name="Pierpaolo Fumagalli" email="pier@apache.org" id="PF"/> </devs> <action priority="showstopper" assigned-to="SM" context="docs"> - Finish XML-ize the docs (xsp-spec). + Finish XML-ize the docs (install, DCP, SQL). </action> <action priority="showstopper" assigned-to="SM" context="docs"> - Write the stylesheets for the docs and traslations to stylebook DTD. + Write the HTML/FO stylesheets. </action> - <action priority="showstopper" assigned-to="SM" context="docs"> - Integrate docs with xml.apache.org. - </action> - - <action priority="showstopper" context="code"> - pass request/session parameters to the XSLT processors for dynamic - stylesheet operation. - </action> - <action priority="showstopper" assigned-to="SM" context="build"> - Finish Ant makefile to build instead of makefile. + Finish Ant build file and clean it up. </action> <action priority="showstopper" assigned-to="SM" context="admin"> - Make sure you removed all the java.apache.org instances around. + Make sure all the java.apache.org stuff is removed. </action> + <action priority="high" context="code"> + Pass request/session parameters to the XSLT processors for dynamic + stylesheet operation. + </action> + <action priority="high" context="code"> + Work on external entities inclusion (follows sitemap stuff). + </action> - <action priority="medium" assigned-to="SM" context="design"> - Write SiteMap document. + <action priority="high" assigned-to="RR" context="code"> + Integrate Ricardo's XSP compiler. </action> - <action priority="medium" assigned-to="SM" context="code"> - Play around with Tomcat. + <action priority="high" assigned-to="SM" context="code"> + Check tomcat installation. </action> <action priority="medium" assigned-to="SM" context="admin"> - Add the Cocoon2 branch with the Kali sources. + Add the Cocoon2 branch with the new interface. </action> + - <action priority="medium" assigned-to="RR" context="code"> - Add the XSP compiler. + <action priority="medium" assigned-to="SM" context="design"> + Write SiteMap document. </action> <action priority="medium" assigned-to="PF" context="design"> Merge stylebook technology with Cocoon </action> - - From stefano@locus.apache.org Fri Dec 3 00:10:32 1999 Return-Path: <stefano@locus.apache.org> Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58300 invoked from network); 3 Dec 1999 00:10:32 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 00:10:32 -0000 Received: (qmail 11358 invoked by uid 2016); 3 Dec 1999 00:10:32 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 11351 invoked from network); 3 Dec 1999 00:10:31 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 00:10:31 -0000 Received: (qmail 58022 invoked by uid 1010); 3 Dec 1999 00:08:42 -0000 Date: 3 Dec 1999 00:08:42 -0000 Message-ID: <19991203000842.58021.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs book.xml cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml guide.xml index.xml installing.xml javadoc.xml license.xml sqlprocessor.xml technologies.xml WD-xsp.xml stefano 99/12/02 16:08:42 Modified: docs cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml guide.xml index.xml installing.xml javadoc.xml license.xml sqlprocessor.xml technologies.xml WD-xsp.xml Added: docs book.xml Log: we are now able to build the xml.apache.org/cocoon web site also a bunch of fixes to the documents to make them appear nice on the web site Revision Changes Path 1.3 +24 -19 xml-cocoon/docs/cocoon2.xml Index: cocoon2.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/cocoon2.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cocoon2.xml 1999/11/30 16:29:51 1.2 +++ cocoon2.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> --> <document> <header> @@ -61,9 +61,10 @@ formatted in the response stream. This has significant impacts on performance and memory needs:</p> - <ul> - <li> - <strong>incremental operation</strong>: the response is created + <dl> + <dt>incremental operation</dt> + <dd> + the response is created during document production. Client's perceived performance is dramatically improved since clients can start receiving data as soon as it is created, not after all processing stages have been performed. In those cases where @@ -71,29 +72,33 @@ internal buffers store the events until the operation can be performed. However, even in these cases performance can be increased with the use of tuned memory structures. - </li> - <li> - <strong>lowered memory consumption</strong>: since most of the + </dd> + <dt>lowered memory consumption</dt> + <dd> + since most of the server processing required in Cocoon is incremental, an incremental model allows XML production events to be transformed directly into output events and character written on streams, thus avoiding the need to store them in memory. - </li> - <li> - <strong>easier scalability</strong>: reduce memory needs allow more + </dd> + <dt>easier scalability</dt> + <dd> + reduce memory needs allow more concurrent operation to be possible, thus allowing the publishing system to scale as the load increases. - </li> - <li> - <strong>more optimizable code model</strong>: modern virtual + </dd> + <dt>more optimizable code model</dt> + <dd> + modern virtual machines are based on the idea of <em>hot spots</em>, code fragments that are used often and, if optimized, increase the process execution by far. This new event model allows easier detection of hot spots since it's a method driven operation, rather than a memory driven one. Hot methods can be identified earlier and their optimization performed better. - </li> - <li> - <strong>reduced garbage collection</strong>: even the most advanced + </dd> + <dt>reduced garbage collection</dt> + <dd> + even the most advanced and lightweight DOM implementation require at least three to five times (and sometimes much more than this) more memory than original document size. This does not only reduce the scalability of the operation, but also @@ -101,8 +106,8 @@ must be collected after the response in sent to the client. Even if modern virtual machines reduced the overhead of garbage collection, less garbage will always have performance and scalability impacts. - </li> - </ul> + </dd> + </dl> <p>The above points, alone, would be enough for the Cocoon2 paradigm shift, even if this event based model impacts not only the general 1.3 +2 -2 xml-cocoon/docs/dcpprocessor.xml Index: dcpprocessor.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/dcpprocessor.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dcpprocessor.xml 1999/11/30 16:29:51 1.2 +++ dcpprocessor.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> --> <document> <header> 1.3 +56 -42 xml-cocoon/docs/dynamic.xml Index: dynamic.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/dynamic.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dynamic.xml 1999/11/30 16:29:51 1.2 +++ dynamic.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> --> <document> <header> @@ -88,11 +88,14 @@ <p>The Cocoon processing model is based on the separation of</p> - <ul> - <li><strong>Production</strong>where XML content is generated based on Request parameters (servlet equivalent)</li> - <li><strong>Processing</strong>where the produced XML content is transformed/evaluated</li> - <li><strong>Formatting</strong>where the XML content is finally formatted into the wanted output format for client use.</li> - </ul> + <dl> + <dt>Production</dt> + <dd>where XML content is generated based on Request parameters (servlet equivalent)</dd> + <dt>Processing</dt> + <dd>where the produced XML content is transformed/evaluated</dd> + <dt>Formatting</dt> + <dd>where the XML content is finally formatted into the wanted output format for client use.</dd> + </dl> <p>This separation of working contexts allows Cocoon users to implement their own internal modules to add the functionality they require to @@ -112,30 +115,35 @@ <p>Here follows the code for an example producer distributed with Cocoon:</p> -<source> -public class DummyProducer extends AbstractProducer implements Status { +<source><![CDATA[ +public class DummyProducer + extends AbstractProducer + implements Status +{ - String dummy = "<?xml version=\"1.0\"?>" - + "<?cocoon:format type=\"text/html\"?>" - + "<html><body>" - + "<h1 align=\"center\">" + String dummy = "<?xml version=\"1.0\"?>" + + "<?cocoon:format type=\"text/html\"?>" + + "<html><body>" + + "<h1 align=\"center\">" + "Hello from a dummy page" - + "</h1>" - + "</body></html>"; + + "</h1>" + + "</body></html>"; - public Reader getStream(HttpServletRequest request) throws IOException { - return new StringReader(dummy); + public Reader getStream(HttpServletRequest request) + throws IOException + { + return new StringReader(dummy); } public String getPath(HttpServletRequest request) { - return ""; + return ""; } public String getStatus() { - return "Dummy Producer"; + return "Dummy Producer"; } } -</source> +]]></source> <p>The key method is <code>getStream()</code> which is responsible to create process the given servlet request and provide an output stream for reading the @@ -162,22 +170,22 @@ it may have been produced from a file, from other sources or dynamically, see the above paragraph):</p> -<source> -<?xml version="1.0"?> -<page> - <p>Current time is <time/></p> -</page> -</source> +<source><![CDATA[ +<?xml version="1.0"?> +<page> + <p>Current time is <time/></p> +</page> +]]></source> <p>Our simple example processor will look for the %lg;time/%gt; tags and will expand them to the current local time, creating this result document:</p> -<source> -<?xml version="1.0"?> -<page> - <p>Current time is 6:48PM</p> -</page> -</source> +<source><![CDATA[ +<?xml version="1.0"?> +<page> + <p>Current time is 6:48PM</p> +</page> +]]></source> <p>Please, look at the shipped processors source code for example code and look at the <connect href="guide.xml">user guide</connect> on how to install and @@ -190,24 +198,30 @@ includes a number of processors that implement common needs and situations. These are:</p> - <ul> - <li><strong>The XSLT processor</strong> + <dl> + <dt>The XSLT processor</dt> + <dd> the <em>XSLT</em> processor that applies XSLT transformations to the input document. XSLT allows you to solve your transformation needs as well as simple tag evaluation/processing due to - its extensible and programmable nature.</li> - <li><strong>The DCP processor</strong> + its extensible and programmable nature. + </dd> + <dt>The DCP processor</dt> + <dd> the <em>DCP</em> processor that evaluates XML processing instructions with multi-language (Java and EcmaScript) logic. This processor allows you to do programmatic substitution and inclusion eliminating the need for complex processing logic. See the <connect href="dcpprocessor.xml">DCP - user guide</connect> for more information.</li> - <li><strong>The SQL processor</strong> + user guide</connect> for more information. + </dd> + <dt>The SQL processor</dt> + <dd> the <em>SQL</em> processor that evaluates simple tags describing SQL queries to JDBC drivers and formats their result-set in XML - depending on given parameters. See the <connect href="sqlprocessor.html">SQL - processor user guide</connect> for more information.</li> - </ul> + depending on given parameters. See the <connect href="sqlprocessor.xml">SQL + processor user guide</connect> for more information. + </dd> + </dl> </s1> <s1 title="Future plans"> @@ -218,7 +232,7 @@ separation between content and logic in dynamically generated XML pages is not achieved with current Cocoon features.</p> - <p>To fill this whole, the <connect href="xsp/WD-xsp.xml">XSP + <p>To fill this whole, the <connect href="WD-xsp.xml">XSP (eXtensible Server Pages) technology</connect> was proposed. While in the <em>working draft</em> stage, we strongly believe that some of the issues expressed in that specification will be keys to the future of dynamic XML.</p> 1.3 +3 -3 xml-cocoon/docs/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/faq.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- faq.xml 1999/11/30 16:29:51 1.2 +++ faq.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE faqs SYSTEM "../dtd/faq-v10.dtd"> +<!-- <!DOCTYPE faqs SYSTEM "../dtd/faq-v10.dtd"> --> <faqs title="Cocoon Frequently Asked Questions"> @@ -26,7 +26,7 @@ </faq> <faq> - <question>"Where do I get more information on XSL and XML?"</question> + <question>Where do I get more information on XSL and XML?</question> <answer> <p> The web community is very exited about XML and XSL and many sources of 1.3 +157 -121 xml-cocoon/docs/guide.xml Index: guide.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/guide.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- guide.xml 1999/11/30 16:29:51 1.2 +++ guide.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0"?> -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> --> <document> <header> @@ -36,10 +36,12 @@ <p>This comment posted on the Cocoon mail list shows you what we mean:</p> <source> -I've got a site up and running that uses Cocoon. It rocks, the management -loves me (they now treat me like I walk on water), and a couple of summer -interns that I had helping me on the project are suddenly getting massively -head-hunted by companies like AT&T now that they can put XML and XSL on +I've got a site up and running that uses Cocoon. +It rocks, the management loves me (they now treat +me like I walk on water), and a couple of summer +interns that I had helping me on the project are +suddenly getting massively head-hunted by companies +like AT&T now that they can put XML and XSL on their resumes. In a word: Cocoon simply rocks! </source> </s1> @@ -49,15 +51,15 @@ write good documentation (even if its hard like hell!), we start from there too. Here is a well-formed XML file that uses a custom and simple DTD</p> -<source> -<?xml version="1.0"?> -<page> - <title>Hello World!</title> - <content> - <paragraph>This is my first Cocoon page!</paragraph> - </content> -</page> -</source> +<source><![CDATA[ +<?xml version="1.0"?> +<page> + <title>Hello World! + + This is my first Cocoon page! + + +]]>

Even if this page mimics HTML (in a sense, HTML was born as a simple DTD for homepages), it is helpful to note that there is no style information @@ -86,11 +88,11 @@ and define its own namespace accordingly to the W3C directions. So the skeleton of your stylesheet is:

- -<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> -</xsl:stylesheet> - + + + +]]>

Once the skeleton is done, you must include your template elements, which are the basic unit of operation for the XSLT language. Each template is @@ -103,18 +105,18 @@ root element. This must be transformed in all those tags that identify a good HTML page. Your template becomes:

- -<xsl:template match="page"> - <html> - <head> - <title><xsl:value-of select="title"/></title> - </head> - <body bgcolor="#ffffff"> - <xsl:apply-templates/> - </body> - </html> -</xsl:template> - + + + + <xsl:value-of select="title"/> + + + + + +
+]]>

were some elements belong to the standard namespace (which we associate to HTML) and some others to the xsl: namespace. Here we find two of those @@ -127,35 +129,35 @@

Other possible templates are:

- -<xsl:template match="title"> - <h1 align="center"> - <xsl:apply-templates/> - </h1> -</xsl:template> - -<xsl:template match="paragraph"> - <p align="center"> - <i><xsl:apply-templates/></i> - </p> -</xsl:template> - + +

+ +

+
+ + +

+ +

+
+]]>

After the XSLT processing, the original document is transformed to

- -<html> - <head> - <title>Hello</title> - </head> - <body bgcolor="#ffffff"> - <h1 align="center">Hello</h1> - <p align="center"> - <i>This is my first Cocoon page!</i> - </p> - </body> -</html> - + + + Hello + + +

Hello

+

+ This is my first Cocoon page! +

+ + +]]>
@@ -172,14 +174,14 @@ be applied. This is done by indicating in the stylesheet linking PI the media type, for example, continuing with the HelloWorld.xml document, these PIs

- -<?xml version="1.0"?> -<?xml-stylesheet href="hello.xsl" type="text/xsl"?> -<?xml-stylesheet href="hello.text.xsl" type="text/xsl" media="lynx"?> + + + ... - +]]>

would tell Cocoon to apply the hello.text.xsl stylesheet if the Lynx browser is requesting the page. This powerful feature allows you to design your content @@ -190,16 +192,26 @@ based on their User-Agent http header information. Cocoon is preconfigured to handle these browsers:

-
    -
  • explorer any Microsoft Internet Explorer, searches for MSIE (before - searching for Mozilla, since they include it too)
  • -
  • opera the Opera browser (before searching for Mozilla, since - they include it too)
  • -
  • lynx the text-only Lynx browser
  • -
  • java any Java code using standard URL classes
  • -
  • wap the Nokia WAP Toolkit browser
  • -
  • netscape any Netscape Navigator, searches for Mozilla
  • -
+
+
explorer
+
+ any Microsoft Internet Explorer, searches for MSIE (before + searching for Mozilla, since they include it too) +
+
opera
+
+ the Opera browser (before searching for Mozilla, since + they include it too) +
+
lynx
+
the text-only Lynx browser
+
java
+
any Java code using standard URL classes
+
wap
+
the Nokia WAP Toolkit browser
+
netscape
+
any Netscape Navigator, searches for Mozilla
+

but you can add your own by personalizing the cocoon.properties file modify the browser properties. For example

@@ -209,7 +221,7 @@ browser.1=opera=Opera browser.2=lynx=Lynx browser.3=java=Java -browser.4=wap=Wapsody +browser.4=wap=Nokia-WAP-Toolkit browser.5=netscape=Mozilla @@ -228,32 +240,49 @@

Let's describe the components that appear on the schema:

-
    -
  • Request wraps around the client's request and +
    +
    Request
    +
    + wraps around the client's request and contains all the information needed by the processing engine. The request must indicate what client generated the request, what URI is being - requested and what producer should handle the request.
  • -
  • Producer handles the requested URI and produces an + requested and what producer should handle the request. + +
    Producer
    +
    + handles the requested URI and produces an XML document. Since producers are pluggable, they work like subservlets for this framework, allowing users to define and implement their own producers. A producer is responsible of creating the XML document which is fed into the processing reactor. It's up to the producer implementation to - define the function that produces the document from the request object.
  • -
  • Reactor is responsible of evaluating what + define the function that produces the document from the request object. + +
    Reactor
    +
    + is responsible of evaluating what processor should work on the document by reacting on XML processing instructions. The reactor pattern is different from a processing pipeline since it allows the processing path to the dynamically configurable and it increases performance since only those required processors are called to handle the document. The reactor is also responsible to forward the - document to the appropriate formatter.
  • -
  • Formatter transforms the memory representation of + document to the appropriate formatter. + +
    Formatter
    +
    + transforms the memory representation of the XML document into a stream that may be interpreted by the requesting client. Depending on other processing instructions, the document leaves the reactor and gets formatted for its consumer. The output MIME type of - the generated document depends on the formatter implementation.
  • -
  • Responseencapsulates the formatted document along - with its properties (such as length, MIME type, etc..)
  • -
  • Loader is responsible of loading the formatted + the generated document depends on the formatter implementation. + +
    Response
    +
    + encapsulates the formatted document along + with its properties (such as length, MIME type, etc..) +
    +
    Loader
    +
    + is responsible of loading the formatted document when this is executable code. This part is used for compiled server pages where the separation of content and logic is merged and compiled into a Producer. When the formatter output is executable code, it @@ -261,9 +290,10 @@ as a document producer. This guarantees both performance improvement (since the producer are cached) as well as easier producer development, following the common compiled server pages model. [this part is not yet - implemented]
  • -
- + implemented] + + +

The Cocoon reactor uses XML processing instructions to forward the document @@ -283,46 +313,52 @@ document should be processed by the XSLT processor. To do this, the HelloWorld.xml document should be modified like this:

- -<?xml version="1.0"?> -<?cocoon-process type="xslt"?> -<?xml-stylesheet href="hello.xsl" type="text/xsl"?> -<page> - <title>Hello World!</title> - <content> - <paragraph>This is my first Cocoon page!</paragraph> - </content> -</page> - + + + + + Hello World! + + This is my first Cocoon page! + + +]]>

The other processing instruction is used to indicate what formatter should be used to transform the document tree into a suitable form for the requesting client. For example, in the document below that uses the XSL formatting object DTD, the Cocoon PI indicates that this document should be formatted using the formatter associated to the text/xslfo document type.

- - -<?xml version="1.0"?> -<?cocoon-format type="text/xslfo"?> -<fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0"> - <fo:layout-master-set> - <fo:simple-page-master page-master-name="one" margin-left="100pt" margin-right="100pt"> - <fo:region-body margin-top="50pt" margin-bottom="50pt"/> - </fo:simple-page-master> - </fo:layout-master-set> + + + + + + + + + - <fo:page-sequence> - <fo:sequence-specification> - <fo:sequence-specifier-repeating page-master-first="one" page-master-repeating="one"/> - </fo:sequence-specification> - - <fo:flow font-size="14pt" line-height="14pt"> - <fo:block>Welcome to Cocoon</fo:block> - </fo:flow> - </fo:page-sequence> -</fo:root> - + + + + + + + Welcome to Cocoon + + + +]]>
1.3 +9 -8 xml-cocoon/docs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/index.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.xml 1999/11/30 16:29:51 1.2 +++ index.xml 1999/12/03 00:08:41 1.3 @@ -1,9 +1,7 @@ - + - + - -
Cocoon @@ -14,7 +12,10 @@
- + + + +

Cocoon is a 100% pure Java publishing framework that relies on new W3C technologies (such as DOM, XML, and XSL) to provide web content. @@ -30,8 +31,8 @@

- Read the Introduction on Cocoon - technologies white paper to find out more on the subject. + Read the Introduction on Cocoon + technologies white paper to find out more on the subject.

@@ -150,7 +151,7 @@

For direct participation, we suggest you to subscribe to the - Cocoon mail list + Cocoon mail lists (follow the link for information on how to subscribe and to access the mail list archives), to checkout the latest and greatest code (which you found in the xml-cocoon module in 1.3 +4 -3 xml-cocoon/docs/installing.xml Index: installing.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/installing.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- installing.xml 1999/11/30 16:29:51 1.2 +++ installing.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ - + - +

@@ -58,7 +58,8 @@

For this reason, in order to work out of the box and have complete operation, you need to download all three packages (Xerces-J, Xalan-J and FOP) from the - xml.apache.org. Once you have + xml.apache.org distribution + area. Once you have all three jar packages required and all other packages that may be required by these projects, go ahead and follow the instructions for your servlet engine. 1.2 +22 -29 xml-cocoon/docs/javadoc.xml Index: javadoc.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/javadoc.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- javadoc.xml 1999/11/30 16:29:51 1.1 +++ javadoc.xml 1999/12/03 00:08:41 1.2 @@ -1,12 +1,13 @@ - + - +

Javadoc Documentation in XML +
@@ -48,13 +49,13 @@
  • javadoc.dtd ---> javadoc_html.dtd ---> HTML (this would create a javadoc that looks like the current HTML javadoc standard).
  • -
  • javadoc.dtd ---> docBook.dtd  (this would facilitate printed +
  • javadoc.dtd ---> docBook.dtd (this would facilitate printed books based having heavy content about java API's. For example "The JDBC API Tutorial and Reference: 2nd Edition" could make heavy use of this.
  • javadoc.dtd ---> ebook.dtd (this would facilitate the electronic version of documentation)
  • -
  • javadoc.dtd ---> ??? ---> pdf 
  • +
  • javadoc.dtd ---> ??? ---> pdf
  • Using this method we will then enhance the existing Cocoon documentation to provide rich documentation using some subset of the above formats.
  • @@ -64,33 +65,25 @@ -

    Current Status: Phase 2

    -

    Items currently under development:

    -
      -
    • Phase 1
    • -
        -
      • javadoc.dtd
      • -
          -
        • Note: I still need to update the sample to reflect the use of - namespaces and the addition of the interfaceref element
        • -
        -
      -
    • Phase 2
    • -
        -
      • Working on XML javadoc doclet
      • -
      -
    +

    + The first phase has been complete and a complete javadoc DTD was + created. We feel confortable with the solidity of that DTD and we plan + to move over to the actual XML doclet implementation. +

    +

    + The problem is that the original Javadoc XML proposal author quit the + project for lack of time, so we are currently looking for people + to move the task forward since we are almost stuck at this point. +

    - + -

    Currently, I am needing lots of feedback on the javadoc.dtd. We can't proceed - to phase 2 until we feel we are on the right track with the DTD. It doesn't need - to be perfect, but it should be close. When I get the next round of feedback, I - am planning on adding "import" as an element of class. I am also - planning on moving the position of the element "doc" to the start of - each place it is appropriate. They will more closely reflect the source code and - it just makes since to put the documentation before not after what you are - talking about.

    +

    + Being the first phase complete (the DTD is still in working-draft phase, + but it's complete and usable), we need to write the doclet, but the + task is stalled for lack of active contributors. Any help is + always welcome. +

    1.3 +2 -2 xml-cocoon/docs/license.xml Index: license.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/license.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- license.xml 1999/11/30 16:29:51 1.2 +++ license.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ - + - +
    1.3 +2 -2 xml-cocoon/docs/sqlprocessor.xml Index: sqlprocessor.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/sqlprocessor.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sqlprocessor.xml 1999/11/30 16:29:51 1.2 +++ sqlprocessor.xml 1999/12/03 00:08:41 1.3 @@ -1,6 +1,6 @@ - + - +
    1.3 +71 -60 xml-cocoon/docs/technologies.xml Index: technologies.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/technologies.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- technologies.xml 1999/11/30 16:29:51 1.2 +++ technologies.xml 1999/12/03 00:08:41 1.3 @@ -1,10 +1,10 @@ - + - +
    - Introduction on Cocoon Technologies + Technologies Used @@ -24,7 +24,8 @@ -

    XML (eXtended Markup Language) is an SGML subset. SGML is the father of all +

    XML (eXtended Markup Language) + is an SGML subset. SGML is the father of all markup languages and its a 15-years old ISO standard for creating languages. XML is a lighter version of SGML.

    @@ -52,8 +53,8 @@

    So, any valid XML document is well-formed and an XML document valid for one particular DTD may not necessary be valid for another DTD. -For example, HTML is not an XML language because the <br>> tag -is not XML compliant. XHTML (where <br>> is replaced by <br/>>) +For example, HTML is not an XML language because the <br> tag +is not XML compliant. XHTML (where <br> is replaced by <br/>) is XML compliant. While HTML pages are not always XML documents (some pages might be), XHTML pages are always well-formed and valid if matched against the XHTML DTD.

    @@ -85,8 +86,8 @@ An HTML page is not designed for this. It was designed for how to present the data.

    When I look at a web page I might see that an author choose to make every - paragraph heading bold with <font size+1>>. Yet if I look at - another page I might notice that every paragraph heading was marked up with <H1>>. + paragraph heading bold with <font size+1>. Yet if I look at + another page I might notice that every paragraph heading was marked up with <H1>. Yet another page may use tables and table headers to format the data. Find me every document that has the word potato in the paragraph heading of the first paragraph.

    @@ -116,31 +117,32 @@ weather information. And another link that says XML stream for weather information available. Yikes, would you look at that:

    - - <weather-information> - <location> - <city>Boston</city> - <state>MA</state> - </location> - <summary> + + + Boston + MA + + Beautiful and Sunny, lows 50, highs 65, with the chance of a blizzard and gail force winds. - </summary> - </weather-information> - + + + ]]>

    So you download Cocoon, simply write an XSL stylesheet that looks the the following:

    - - <xsl:stylesheet> - <xsl:template match="/"> + + ... presentation info here ... - </xsl:template> - <xsl:tempate match="weather-information[location/city = 'Boston']"> - <xsl:apply-templates select="summary"/> - </xsl:template> - </xsl:stylesheet> - + + + + + + ]]>

    And your boss gives you your job back! ;-)

    @@ -157,33 +159,37 @@

    In some HTML like this

    - - <html> - <head> - <title>This is my article</title> - </head> - <body> - <h1 align="center">This is my article</h1> - <h3 align="center>by <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a></h3> + + + This is my article + + +

    This is my article

    +

    + Stefano Mazzocchi + +

    ... - </body> - </html> - + + +]]>

    you don't have a guaranteed way to extract the mail address, while in the following XML document

    - - <?xml version="1.0"?> - <page> - <title>This is my article</title> - <author> - <name>Stefano Mazzocchi</name> - <mail>stefano@apache.org</mail> - </author> + + + This is my article + + Stefano Mazzocchi + stefano@apache.org + ... - </page> - + +]]>

    it's trivial and algorithmically certain.

    @@ -231,7 +237,7 @@ reason may be used in chain: transformA goes from DTD1 to DTD2 and transformB from DTD2 to DTD3 or graphically

    -DTD1 ---(transformA)-->> DTD2 ---(transformB)--->> DTD3 +DTD1 ---(transformA)--> DTD2 ---(transformB)---> DTD3

    We'll call DTD1 the original DTD (because its the origin), DTD2 some intermediate DTD, DTD3 the final DTD. It can be shown that a transformation can @@ -251,16 +257,21 @@

    The example above would lead:

    - - <?xml version="1.0"?> - <fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0"> + + ... - <fo:flow font-size="14pt" line-height="14pt"> - <fo:block text-align="centered" font-size="24pt" line-height="28pt">This is my article</fo:block> - <fo:block space-before.optimum="12pt" text-align="centered">by Stefano Mazzocchi</fo:block> - </fo:flow> - </fo:root> - + + This is my article + by Stefano Mazzocchi + + +]]>

    which tells the formatting object formatter (the rendering engine), how to draw and place the text on the screen or on paper. Formatting @@ -280,8 +291,8 @@ document tags from the programming logic that drive their server side behavior.

    -

    The XSP language (eXtensible Server Pages) languages defines an XML DTD for - separating content and logic for compiled server pages. +

    The XSP language (eXtensible Server Pages) + languages defines an XML DTD for separating content and logic for compiled server pages. XSP (eXtensible Server Pages) is, like XSLFO, supposed to be a final DTD in the sense that is the result of one or more transformation steps and must be rendered by some formatter into pure source code that can then be 1.3 +297 -265 xml-cocoon/docs/WD-xsp.xml Index: WD-xsp.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/WD-xsp.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- WD-xsp.xml 1999/12/02 11:52:54 1.2 +++ WD-xsp.xml 1999/12/03 00:08:41 1.3 @@ -1,10 +1,11 @@ - + - +

    - eXtensible Server Pages (XSP) Layer 1 + XSP Layer 1 + eXtensible Server Pages 11091999 Working Draft @@ -131,12 +132,15 @@

    Three standards have been especially influential:

    -
      -
    • JSP defines a way to embed programmatic logic into web documents.
    • -
    • XSLT defines a way to transform XML documents.
    • -
    • XML defines a flexible still highly structured paradigm for web - content generation and distribution.
    • -
    +
    +
    JSP
    +
    defines a way to embed programmatic logic into web documents.
    +
    XSLT
    +
    defines a way to transform XML documents.
    +
    XML
    +
    defines a flexible still highly structured paradigm for web + content generation and distribution.
    +

    Many server side dynamic web content generators have been evaluated and confronted, especially WebMacro and GSP.

    @@ -189,9 +193,12 @@ verbosity of XSP document, allowing the inclusion the default DTD via entity mapping. The standard way to include the XSP DTD into XSP documents is:

    - - ]]> + +]]> @@ -206,48 +213,51 @@ designed to include as content mark-up elements that belong to other namespaces. The XSchema effort will allow multi-namespace validation.

    - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> + + + + + + + + + + + + + + + + + + + + + + + + + +]]> @@ -275,77 +285,82 @@ of this specification to define a way to associate transformation sheets to pages. The associated logicsheet that uses the Java language as logic definition may look like:

    - - - - - + + + + + - - java.lang.* - - - - private static int counter = 0; - - private synchronized int currentCount() { - return ++counter; - } - - - - - - - - - + + java.lang.* + + + + private static int counter = 0; - - currentCount() - - - - - - - - - ]]> + private synchronized int currentCount() { + return ++counter; + } + + + + + + + + + + + + currentCount() + + + + + + + + + +]]>

    After applying the above logic sheet, the resulting document would be equivalent to the following:

    - - - - java.lang.* - + + + + java.lang.* + - - private static int counter = 0; - - private synchronized int currentCount() { - return ++counter; - } - - - - - A Sample XSP Page -

    Hi, I've been hit currentCount() times.

    -
    -
    - - ]]> + + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + + + + A Sample XSP Page +

    + Hi, I've been hit + currentCount() + times. +

    +
    +
    + +]]>

    At this point it's worth to note that from an XSP point of view, there is no difference in how the XSP page was created, either directly written or @@ -355,57 +370,63 @@ servlets were omitted for simplicity and this example must not be considered mandating as a way to format XSP into servlet source code]

    - + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + public void service(HttpServletRequest request, + HttpServletResponse response) throws IOException + { + Document document = parser.createEmptyDocument(); + Element root = document.createElement("page"); + document.appendChild(root); + + Element element_1 = document.createElement("title"); + root.appendChild(element_1); + Text textNode_1 = document.createTextNode("A Sample XSP Page"); + element_1.appendChild(textNode_1); + + Element element_2 = document.createElement("p"); + root.appendChild(element_2); + Text textNode_2 = document.createTextNode("Hi, I've been hit "); + element_2.appendChild(textNode_2); + StringBuffer buffer_1 = new StringBuffer.append(currentCount()); + Text textNode_3 = document.createTextNode(string_1.toString()); + element_2.appendChild(textNode_3); + Text textNode_4 = document.createTextNode("times."); + element_2.appendChild(textNode_4); + + // Produce generated DOM tree on output as an XML stream + ((Child) document).toXMLString(response.getWriter()); + } +} +]]>

    Note that in this example the XML document is being generated as a stream but a DOM tree is used to create it. The DOM tree can't be passed directly to @@ -417,51 +438,59 @@

    To solve this problem and speed up the execution on server side XML processing, the XSP can be compiled into something like this:

    - + private static int counter = 0; + + private synchronized int currentCount() { + return ++counter; + } + + public void toSAX(Request request, DocumentHandler handler) + throws SAXException + { + handler.startDocument(); + handler.startElement("page", null); + handler.startElement("title", null); + handler.characters(chars_0, 0, 17); + handler.endElement("title"); + handler.startElement("p", null); + handler.characters(chars_1, 0, 17); + String string_0 = (new StringBuffer.append( + currentCount() + )).toString(); + int string_0_length = string_0.length(); + char[] chars_2 = char[string_0_length]; + string_0.getChars(0, string_0_length, chars_2, 0); + handler.characters(chars_3, 0, 6); + handler.endElement("p"); + handler.endElement("page"); + handler.endDocument(); + } +} +]]>

    The above shows one of the best features of XSP: output independence. Since the output objects are not accessible directly from the internal page @@ -528,64 +557,67 @@ programming code by scriptlet tags. The following is an example to show the different results based on the same logic and code.

    - + e = request.getParameterNames(); + if ((e != null) && (e.hasMoreElements())) { + + + Servlet Parameters - e = request.getParameterNames(); - if ((e != null) && (e.hasMoreElements())) { - - - Servlet Parameters - - while (e.hasMoreElements()) { - String k = (String) e.nextElement(); - String val = request.getParameter(k); - String vals[] = request.getParameterValues(k); - - - k - - - for(int i = 0; i < vals.length; i++) { - - vals[i] - - } - - - } - - - - } - - ]]> + while (e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = request.getParameter(k); + String vals[] = request.getParameterValues(k); + + + k + + + for(int i = 0; i < vals.length; i++) { + + vals[i] + + } + + + } + + + + } + +]]>

    This is the JSP equivalent:

    - + e = request.getParameterNames(); + if ((e != null) && (e.hasMoreElements())) { + + + Servlet Parameters - e = request.getParameterNames(); - if ((e != null) && (e.hasMoreElements())) { - - Servlet Parameters - - while (e.hasMoreElements()) { - String k = (String) e.nextElement(); - String val = request.getParameter(k); - String vals[] = request.getParameterValues(k); - out.println("<element name=\"name\">"); - k - - out.println("</element>"); - for(int i = 0; i < vals.length; i++) { - - vals[i] - - } - } - - } - ]]> + while (e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = request.getParameter(k); + String vals[] = request.getParameterValues(k); + out.println("<element name=\"name\">"); + + k + + out.println("</element>"); + for(int i = 0; i < vals.length; i++) { + + + vals[i] + + } + } + +} +]]>

    It must be noted the use of the out object in the JSP example while XSP provide specific tags to avoid that.

    1.1 xml-cocoon/docs/book.xml Index: book.xml =================================================================== From stefano@locus.apache.org Fri Dec 3 00:11:37 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58632 invoked from network); 3 Dec 1999 00:11:37 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 00:11:37 -0000 Received: (qmail 11957 invoked by uid 2016); 3 Dec 1999 00:11:37 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 11954 invoked from network); 3 Dec 1999 00:11:37 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 00:11:37 -0000 Received: (qmail 58291 invoked by uid 1010); 3 Dec 1999 00:09:44 -0000 Date: 3 Dec 1999 00:09:44 -0000 Message-ID: <19991203000944.58290.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/resources add.jpg fix.jpg remove.jpg update.jpg stefano 99/12/02 16:09:44 Added: resources add.jpg fix.jpg remove.jpg update.jpg Log: added nice stupid icons on the changes page, I'm mister picky, ya know :) Revision Changes Path 1.1 xml-cocoon/resources/add.jpg <> 1.1 xml-cocoon/resources/fix.jpg <> 1.1 xml-cocoon/resources/remove.jpg <> 1.1 xml-cocoon/resources/update.jpg <> From stefano@locus.apache.org Fri Dec 3 00:14:29 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58974 invoked from network); 3 Dec 1999 00:14:29 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 00:14:29 -0000 Received: (qmail 13157 invoked by uid 2016); 3 Dec 1999 00:13:45 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 12827 invoked from network); 3 Dec 1999 00:12:58 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 00:12:58 -0000 Received: (qmail 58573 invoked by uid 1010); 3 Dec 1999 00:11:16 -0000 Date: 3 Dec 1999 00:11:16 -0000 Message-ID: <19991203001116.58572.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/stylesheets changes-stylebook.xsl document-stylebook.xsl faq-stylebook.xsl spec-stylebook.xsl todo-stylebook.xsl stefano 99/12/02 16:11:16 Added: stylesheets changes-stylebook.xsl document-stylebook.xsl faq-stylebook.xsl spec-stylebook.xsl todo-stylebook.xsl Log: Added the xxx->stylebook stylesheets. I know it seems weird, but it's much easier to go from our DTDs to Pier's one that write a new Stylebook style from scratch. At one point, I hope to make Pier use more sofisticated DTD, but for now it works. Revision Changes Path 1.1 xml-cocoon/stylesheets/changes-stylebook.xsl Index: changes-stylebook.xsl ===================================================================
  • {@type} ( ) Thanks to .
  • 1.1 xml-cocoon/stylesheets/document-stylebook.xsl Index: document-stylebook.xsl ===================================================================
  • -
  • {@alt}

    {@alt}
    1.1 xml-cocoon/stylesheets/faq-stylebook.xsl Index: faq-stylebook.xsl =================================================================== 1.1 xml-cocoon/stylesheets/spec-stylebook.xsl Index: spec-stylebook.xsl ===================================================================
  • [ ] " ", ,
  • 1.1 xml-cocoon/stylesheets/todo-stylebook.xsl Index: todo-stylebook.xsl =================================================================== showstopper high medium low wish dream
  • -
  • From balld@phoenix.webslingerZ.com Fri Dec 3 05:32:33 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 66654 invoked from network); 3 Dec 1999 05:32:33 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 3 Dec 1999 05:32:33 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id AAA21841 for ; Fri, 3 Dec 1999 00:31:59 -0500 Date: Fri, 3 Dec 1999 00:31:58 -0500 (EST) From: Donald Ball To: Cocoon Subject: How to do formatting of dates and times with SQLProcessor Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi guys. I'm trying to figure out how to configure SQLProcessor to format dates and times nicely. The naive approach would be something like this: but suppose you have more than one date column and you want to specify different formats for the different columns? One of my local users suggested this: yyyy-MM-dd MMM d, yyyy which might work, but it's a break from the tradition of putting all resultset configuration options in the query element. It does, however, greatly simplify setting column-specific options. Does anyone have either an argument to make for one of these options or an alternate suggestion? - donald From balld@locus.apache.org Fri Dec 3 08:42:40 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 69730 invoked from network); 3 Dec 1999 08:42:40 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 08:42:40 -0000 Received: (qmail 6428 invoked by uid 2016); 3 Dec 1999 08:42:31 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 6412 invoked from network); 3 Dec 1999 08:42:30 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 08:42:30 -0000 Received: (qmail 69727 invoked by uid 1037); 3 Dec 1999 08:42:29 -0000 Date: 3 Dec 1999 08:42:29 -0000 Message-ID: <19991203084229.69726.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/processor/sql DefaultQueryCreator.java QueryCreator.java ConnectionCreator.java ConnectionDefs.java SQLProcessor.java Utils.java balld 99/12/03 00:42:29 Modified: src/org/apache/cocoon/processor/sql ConnectionCreator.java ConnectionDefs.java SQLProcessor.java Utils.java Added: src/org/apache/cocoon/processor/sql DefaultQueryCreator.java QueryCreator.java Log: Moved SQLQueryCreator class to QueryCreator interface and DefaultQueryCreator class, added session variable expansion code based on Sidney Chong's submission Revision Changes Path 1.5 +0 -0 xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionCreator.java Index: ConnectionCreator.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionCreator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ConnectionCreator.java 1999/12/02 09:07:45 1.4 +++ ConnectionCreator.java 1999/12/03 08:42:28 1.5 @@ -56,7 +56,7 @@ * Utility methods for this processor. * * @author Donald Ball - * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:45 $ + * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:28 $ */ public class ConnectionCreator { 1.5 +0 -0 xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java Index: ConnectionDefs.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ConnectionDefs.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ConnectionDefs.java 1999/12/02 09:07:46 1.4 +++ ConnectionDefs.java 1999/12/03 08:42:28 1.5 @@ -57,7 +57,7 @@ * Default connection values. * * @author Donald Ball - * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ + * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:28 $ */ public class ConnectionDefs { 1.5 +5 -5 xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java Index: SQLProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SQLProcessor.java 1999/12/02 09:07:46 1.4 +++ SQLProcessor.java 1999/12/03 08:42:28 1.5 @@ -62,7 +62,7 @@ * A processor that performs SQL database queries. * * @author Donald Ball - * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ + * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:28 $ */ public class SQLProcessor extends AbstractActor implements Processor, Status { @@ -81,7 +81,7 @@ /** * The default query creator, does {@...} substitution */ - protected static SQLQueryCreator default_query_creator = new SQLQueryCreator(); + protected static QueryCreator default_query_creator = new DefaultQueryCreator(); /** * Omit null columns @@ -178,12 +178,12 @@ timestamp_format = new SimpleDateFormat(timestamp_format_string); try { if (query == null || query.equals("")) { - SQLQueryCreator query_creator; + QueryCreator query_creator; if (query_creator_name != null) { if (query_creators.containsKey(query_creator_name)) { - query_creator = (SQLQueryCreator)query_creators.get(query_creator_name); + query_creator = (QueryCreator)query_creators.get(query_creator_name); } else { - query_creator = (SQLQueryCreator)Class.forName(query_creator_name).newInstance(); + query_creator = (QueryCreator)Class.forName(query_creator_name).newInstance(); query_creators.put(query_creator_name,query_creator); } } else { @@ -301,7 +301,7 @@ } st.close(); conn.commit(); query_element.getParentNode().replaceChild(results_node,query_element); - } catch (SQLException e) { + } catch (Exception e) { Element error_element = Utils.createErrorElement(document,namespace,query_props,e); query_element.getParentNode().replaceChild(error_element,query_element); conn.rollback(); 1.5 +0 -0 xml-cocoon/src/org/apache/cocoon/processor/sql/Utils.java Index: Utils.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/Utils.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Utils.java 1999/12/02 09:07:46 1.4 +++ Utils.java 1999/12/03 08:42:29 1.5 @@ -59,7 +59,7 @@ * Utility methods for this processor. * * @author Donald Ball - * @version $Revision: 1.4 $ $Date: 1999/12/02 09:07:46 $ + * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:29 $ */ public class Utils { 1.1 xml-cocoon/src/org/apache/cocoon/processor/sql/DefaultQueryCreator.java Index: DefaultQueryCreator.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.processor.sql; import java.sql.*; import java.text.*; import java.util.*; import javax.servlet.http.*; import org.w3c.dom.*; /** * A class that can create a SQL query. It's given a query to start with, * plus a query_props table that contains parameters from the XML file, and the * parameters table from cocoon that notably may contain a HttpServletRequest * object keyed from "request". * * @author Donald Ball * @author Sidney Chong * @version $Revision: 1.1 $ $Date: 1999/12/03 08:42:28 $ */ public class DefaultQueryCreator implements QueryCreator { public static final int SESSION = 1; public static final int REQUEST = 2; public String getQuery(Connection conn, String query, Element query_element, Properties query_props, Dictionary parameters) throws Exception { HttpServletRequest req = (HttpServletRequest)parameters.get("request"); query = substitute(query,req, query_props.getProperty("session-variable-left-delimiter"), query_props.getProperty("session-variable-right-delimiter"), SESSION); query = substitute(query,req, query_props.getProperty("variable-left-delimiter"), query_props.getProperty("variable-right-delimiter"), REQUEST); return query; } protected static String substitute(String query, HttpServletRequest req, String ldelim, String rdelim, int type) { int llength = ldelim.length(); int rlength = rdelim.length(); int offset = 0; while (true) { int lindex = query.indexOf(ldelim,offset); if (lindex < 0) break; int rindex = query.indexOf(rdelim,offset+llength); if (rindex < 0 || rindex < lindex) break; String name = query.substring(lindex+llength,rindex); String value = getValue(req, name, type); if (value == null) break; query = query.substring(0,lindex)+value+query.substring(rindex+rlength); offset = lindex+value.length(); } return query; } protected static String getValue(HttpServletRequest req, String name, int type) { String val = null; switch ( type ) { case SESSION : val = (String) (req.getSession(true).getValue(name)); break; case REQUEST : val = req.getParameter(name); break; default : val = ""; } return val; } } 1.1 xml-cocoon/src/org/apache/cocoon/processor/sql/QueryCreator.java Index: QueryCreator.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.processor.sql; import java.sql.*; import java.text.*; import java.util.*; import javax.servlet.http.*; import org.w3c.dom.*; /** * An interface that describes a class that can create a SQL query. * * @author Donald Ball * @version $Revision: 1.1 $ $Date: 1999/12/03 08:42:28 $ */ public interface QueryCreator { public String getQuery(Connection conn, String query, Element query_element, Properties query_props, Dictionary parameters) throws Exception; } From alex.muc@utoronto.ca Fri Dec 3 09:10:11 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 71628 invoked from network); 3 Dec 1999 09:10:11 -0000 Received: from bureau6.utcc.utoronto.ca (128.100.132.16) by 63.211.145.10 with SMTP; 3 Dec 1999 09:10:11 -0000 Received: from whq-s07-79-229.who.int ([158.232.79.229] EHLO utoronto.ca ident: NO-IDENT-SERVICE [port 2920]) by bureau6.utcc.utoronto.ca with ESMTP id <464141-16909>; Fri, 3 Dec 1999 04:10:04 -0500 Message-ID: <384788E9.87527F90@utoronto.ca> Date: Fri, 03 Dec 1999 10:10:01 +0100 From: Alex Muc X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: A bug and a fix in FileProducer.java References: <3844F69C.908E57B2@utoronto.ca> <38465A0C.50F2BF77@apache.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit That's pretty much what I figured was the problem. We can let this one rest until the move to support Servlet 2.2 is being done. You'll at least have the fix already. Alex. Stefano Mazzocchi wrote: > Alex Muc wrote: > > > > Hi, > > > > I've been playing around with cocoon over the last few days using > > JSWDK-1.0 on my windows 95 machine with JDK1.2.2. > > [...] > > You touched a nerve: the only major Servlet API incompatibility is > servlet mapping. We all know this, but we can't fix it until all servlet > engines support the latest spec (which is clearly not the case). > > The patch you propose breaks both JServ and JRun behavior to allow > Tomcat behavior. (yes, JSWDK has codename tomcat that we borrowed in > Jakarta). > > Adding support for Tomcat and Servlet 2.2 mapping is in my todo list, > but I have many other stuff to do before that. Anyway, you're welcome to > come up with a solution, but make sure you don't break existing behavior > or tons of users will kill you :) > > -- > Stefano Mazzocchi One must still have chaos in oneself to be > able to give birth to a dancing star. > Friedrich Nietzsche From pier@apache.org Fri Dec 3 09:16:41 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 71931 invoked from network); 3 Dec 1999 09:16:41 -0000 Received: from dnai-216-15-97-206.cust.dnai.com (HELO kali.betaversion.org) (216.15.97.206) by 63.211.145.10 with SMTP; 3 Dec 1999 09:16:41 -0000 Received: from apache.org(sun.betaversion.org[192.168.1.2]) (1866 bytes) by kali.betaversion.org via smail with P:esmtp/R:internet/T:smtp (sender: ) id for ; Fri, 3 Dec 1999 01:20:33 -0800 (PST) (Smail-3.2.0.106 1999-Mar-31 #3 built 1999-Sep-21) Message-ID: <38478B4B.918D9360@apache.org> Date: Fri, 03 Dec 1999 01:20:11 -0800 From: Pierpaolo Fumagalli Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: problem with StyleBook References: <3846900D.4FCBFC3C@eo.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gerard van Enk wrote: > > I know that > '/home/gerard/xml/xml-stylebook/home/gerard/xml/xml-stylebook/styles/apachexml/resources' > isn't a directory, it uses twice the > '/home/gerard/xml/xml-style-book/'-part. > But I don't know where it gets this part of the directory-name and why > it displays it twice...... > > I use the Blackdown jdk1.2.2 RC2 for this. Guuu.... That's the first bug I got on SBK... I don't know, but it seems to me that the Blackdown jdk1.2.2 has some bugs in the URL parsing mechanism... I just reviewed the code and there's nothing I think is wrong there... Try calling it in this way: java -cp [classpath] org.apache.stylebook.StyleBook \ "targetDirectory=docs/targets/" docs/book.xml \ /home/gerard/xml/xml-stylebook/styles/apachexml (note that the trailing "/" character in the last argument is missing or just with a relative directory java -cp [classpath] org.apache.stylebook.StyleBook \ "targetDirectory=docs/targets/" docs/book.xml \ styles/apachexml -- -------------------------------------------------------------------- - P I E R - stable structure erected over water to allow the docking of seacraft From pier@apache.org Fri Dec 3 09:17:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 72353 invoked from network); 3 Dec 1999 09:17:55 -0000 Received: from dnai-216-15-97-206.cust.dnai.com (HELO kali.betaversion.org) (216.15.97.206) by 63.211.145.10 with SMTP; 3 Dec 1999 09:17:55 -0000 Received: from apache.org(sun.betaversion.org[192.168.1.2]) (992 bytes) by kali.betaversion.org via smail with P:esmtp/R:internet/T:smtp (sender: ) id for ; Fri, 3 Dec 1999 01:21:47 -0800 (PST) (Smail-3.2.0.106 1999-Mar-31 #3 built 1999-Sep-21) Message-ID: <38478B96.93F2BBA9@apache.org> Date: Fri, 03 Dec 1999 01:21:26 -0800 From: Pierpaolo Fumagalli Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: cvs commit: xml-cocoon/docs References: <19991202115254.40994.qmail@locus.apache.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Kid, I wanted just to publically congratulate w/ you for the marvelous Cocoon documentation... Good job, really good :) -- -------------------------------------------------------------------- - P I E R - stable structure erected over water to allow the docking of seacraft From ed@waterfall.freeserve.co.uk Fri Dec 3 12:55:37 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 4521 invoked from network); 3 Dec 1999 12:55:37 -0000 Received: from unknown (HELO keane.uk.com) (212.133.20.133) by 63.211.145.10 with SMTP; 3 Dec 1999 12:55:37 -0000 Received: by pluto.keane.uk.com id <19715>; Fri, 3 Dec 1999 13:43:02 +0000 From: ed@waterfall.freeserve.co.uk (Ed Ward) To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor Date: Fri, 3 Dec 1999 12:53:11 +0000 Message-Id: <99Dec3.134302gmt.19715@pluto.keane.uk.com> References: In-Reply-To: X-Mailer: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On Fri, 3 Dec 1999 00:31:58 -0500 (EST), you wrote: >Hi guys. I'm trying to figure out how to configure SQLProcessor to = format >dates and times nicely. The naive approach would be something like this: > >timestamp-format=3D"yyyy-MM-dd hh:mm:ss"> > >but suppose you have more than one date column and you want to specify >different formats for the different columns? One of my local users >suggested this: > > > yyyy-MM-dd > MMM d, yyyy > > >which might work, but it's a break from the tradition of putting all >resultset configuration options in the query element. It does, however, >greatly simplify setting column-specific options. Does anyone have = either >an argument to make for one of these options or an alternate suggestion? > >- donald > How about : It still doesn't solve your problem of breaking from the tradition of = keeping all the configuration options in the query element, but its not so tied = to the problem of formatting dates. ed. From CHRISTOPH.OEHLER@SBB.CH Fri Dec 3 12:59:54 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 6260 invoked from network); 3 Dec 1999 12:59:54 -0000 Received: from unknown (HELO memogw1.sbb.ch) (147.78.29.212) by 63.211.145.10 with SMTP; 3 Dec 1999 12:59:54 -0000 Received: from sbb.ch (I26741.sbb.ch [147.78.29.212]) by memogw1.sbb.ch (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id NAA03468 for ; Fri, 03 Dec 1999 13:59:27 +0100 From: CHRISTOPH.OEHLER@SBB.CH MIME-Version: 1.0 Date: Fri, 3 Dec 1999 13:58 +0100 Message-id: <199912031258.iZoM@sbb.ch> To: cocoon-dev@xml.apache.org Subject: Error Handling Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable --- Erhalten von I0.U150033 0512 20 5221 03.12.99 13.58 The dynamic generated Error page by Cocoon is really helpfull for developping/debuging. But how about if you are using Cocoon productively? I dont think the visitor on our site is interested in the stacktrace nor does he propabely understand what it means. What do you guys think of displaying a xml-document which one can specify in cocoon.properties. If cocoon fails to display this page it could then show the error page. For debugin purpose it would be great to specify in the propertyfile wheter to display cocoon's error page or the page selected by the administrator. What's your opinion on this?? ---- 03.12.99 13.58 ---- Gesendet an --------------------------- -> cocoon-dev@xml.apache.org From alex.muc@utoronto.ca Fri Dec 3 13:08:33 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8622 invoked from network); 3 Dec 1999 13:08:33 -0000 Received: from bureau6.utcc.utoronto.ca (128.100.132.16) by 63.211.145.10 with SMTP; 3 Dec 1999 13:08:33 -0000 Received: from whq-s07-79-229.who.int ([158.232.79.229] EHLO utoronto.ca ident: NO-IDENT-SERVICE [port 4595]) by bureau6.utcc.utoronto.ca with ESMTP id <464141-20311>; Fri, 3 Dec 1999 08:08:24 -0500 Message-ID: <3847C0B3.64A4A91A@utoronto.ca> Date: Fri, 03 Dec 1999 14:08:03 +0100 From: Alex Muc X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Error Handling References: <199912031258.iZoM@sbb.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I think you would have to have the ability to display different error files depending on the error that was produced as there are many different sources for potential failure during processing. Some mechanism to do that should be considered. Probably the easiest way to do it would be to just "catch" the error and then wrap it in some more user-friendly error response which actually gets delivered to the user. My $.02 worth. Alex. CHRISTOPH.OEHLER@SBB.CH wrote: > --- Erhalten von I0.U150033 0512 20 5221 03.12.99 13.58 > > The dynamic generated Error page by Cocoon is really helpfull for > developping/debuging. But how about if you are using Cocoon > productively? I dont think the visitor on our site is interested > in the stacktrace nor does he propabely understand what it means. > What do you guys think of displaying a xml-document which one can > specify in cocoon.properties. If cocoon fails to display this page > it could then show the error page. > > For debugin purpose it would be great to specify in the > propertyfile wheter to display cocoon's error page or the page > selected by the administrator. > > What's your opinion on this?? > > ---- 03.12.99 13.58 ---- Gesendet an --------------------------- > -> cocoon-dev@xml.apache.org From jh@netland.inka.de Fri Dec 3 14:11:47 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 23151 invoked from network); 3 Dec 1999 14:11:47 -0000 Received: from quechua.inka.de (HELO mail.inka.de) (mail@212.227.14.2) by 63.211.145.10 with SMTP; 3 Dec 1999 14:11:47 -0000 Received: from stiller.netland.inka.de by mail.inka.de with uucp (rmailwrap 0.4) id 11ttR2-0006Af-00; Fri, 3 Dec 1999 15:11:44 +0100 Received: from owlglass (owlglass.netland.inka.de [10.1.1.5]) by stiller.netland.inka.de (8.9.3/8.9.3) with SMTP id NAA78843 for ; Fri, 3 Dec 1999 13:49:39 +0100 (CET) (envelope-from jh@netland.inka.de) Message-Id: <199912031249.NAA78843@stiller.netland.inka.de> From: "Juergen Hermann" To: "cocoon-dev@xml.apache.org" Date: Fri, 03 Dec 1999 13:50:19 +0100 Reply-To: "Juergen Hermann" Priority: Normal X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: How to do formatting of dates and times with SQLProcessor On Fri, 3 Dec 1999 00:31:58 -0500 (EST), Donald Ball wrote: > > yyyy-MM-dd > MMM d, yyyy > ... ... US$ ####0.00 select... Another option would be ....select... And, especially if you later work with XSL on the stuff: {.} {.} ... With {.} being the column value (XSLT syntax). Ciao, Juergen From dperez@divisait.com Fri Dec 3 17:32:01 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 37636 invoked from network); 3 Dec 1999 17:32:01 -0000 Received: from gw.divisait.com (HELO seintegra.gw.divisait.com) (195.61.3.159) by 63.211.145.10 with SMTP; 3 Dec 1999 17:32:01 -0000 Received: from divisamail.dvnet.es (divisamail.gw.divisait.com [192.168.2.130]) by seintegra.gw.divisait.com (8.9.3/8.9.1) with ESMTP id SAA01516 for ; Fri, 3 Dec 1999 18:31:17 +0100 Received: by DIVISAMAIL with Internet Mail Service (5.5.2448.0) id ; Fri, 3 Dec 1999 18:34:04 +0100 Message-ID: <43F0DDC933C0D11186C5006097686512152F43@DIVISAMAIL> From: =?ISO-8859-1?Q?David_P=E9rez_Serrada?= To: "Cocoon Developers (E-mail)" Subject: Proxima semana Date: Fri, 3 Dec 1999 18:34:03 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hola Edu: Argghhhh... por fin se acaba la semana... estaba hasta los suevos, vandalos y alanos.... Eteee.... la proxima semana estoy de vacaciones asi que intentar=E9 hacerte una visita (si tienes alg=FAn problema avisame a dperezs@nexo.es). Me gustar=EDa ver lo que estas haciendo (y los objetos que definiste con el PovRay).=20 Estoy intentando localizar a Miguel o a Ismael para lo del video del viaje a Paris, a ver si podemos ver las famosas historias de paris...) Ta otra.... David +--------------- David P=E9rez Serrada =20 - -----------------+ | Hay que ser l=FAcido para ser fuerte, fuerte para ser =FAtil = =20 | |=20 | y =FAtil para ser feliz. - Spinoza =20 | |=20 +----- Visit http://dirac.dec.cie.uva.es/~serrada/ also for PGP key - -----+ -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOEfxQNIAZs3wvoSNEQI5cgCg2oGXuao+yEjPjgQ18EQfnquEThwAni5V jbgHafxAj2AenJB0rjE9bi6i =3DubnX -----END PGP SIGNATURE----- From dperez@divisait.com Fri Dec 3 17:35:49 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 37916 invoked from network); 3 Dec 1999 17:35:49 -0000 Received: from gw.divisait.com (HELO seintegra.gw.divisait.com) (195.61.3.159) by 63.211.145.10 with SMTP; 3 Dec 1999 17:35:49 -0000 Received: from divisamail.dvnet.es (divisamail.gw.divisait.com [192.168.2.130]) by seintegra.gw.divisait.com (8.9.3/8.9.1) with ESMTP id SAA01547 for ; Fri, 3 Dec 1999 18:35:18 +0100 Received: by DIVISAMAIL with Internet Mail Service (5.5.2448.0) id ; Fri, 3 Dec 1999 18:38:05 +0100 Message-ID: <43F0DDC933C0D11186C5006097686512152F44@DIVISAMAIL> From: =?ISO-8859-1?Q?David_P=E9rez_Serrada?= To: "'cocoon-dev@xml.apache.org'" Subject: Sorry for the last message Date: Fri, 3 Dec 1999 18:37:55 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="ISO-8859-1" -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello everyone: Sorry for the last message, a click in a wrong button :( -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOEfyKNIAZs3wvoSNEQIDXQCeI6OQGaW5otl1DEwzhw62SSC220wAoMtA CkmfhJGhFKVmDm65R4eemY1j =fk5q -----END PGP SIGNATURE----- From smuench@us.oracle.com Fri Dec 3 17:43:38 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 38225 invoked from network); 3 Dec 1999 17:43:38 -0000 Received: from inet16.us.oracle.com (209.246.15.50) by 63.211.145.10 with SMTP; 3 Dec 1999 17:43:38 -0000 Received: from usmail04 (usmail04.us.oracle.com [144.25.88.96]) by inet16.us.oracle.com (8.9.2/8.8.5) with SMTP id JAA01723 for ; Fri, 3 Dec 1999 09:43:37 -0800 (PST) Received: from smuenchlap by usmail04 with SMTP (SMI-8.6/37.9) id JAA08601; Fri, 3 Dec 1999 09:43:37 -0800 Message-ID: <016001bf3da5$02114e50$5a672382@us.oracle.com> From: "Steve Muench" To: References: <99Dec3.134302gmt.19715@pluto.keane.uk.com> Subject: Re: How to do formatting of dates and times with SQLProcessor Date: Fri, 3 Dec 1999 09:42:29 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Donald, Can't you just rely on the database to format the date in the format you want and keep the tags simpler? SELECT TO_CHAR(hiredate,'Month DD, YYYY) as hiredate FROM EMP : Databases have pretty evolved number/date formatting routines that handle all the NLS/locale issues already. Seems like a problem that you could push down a layer and keep the model simpler in the "page"... Just a thought. _________________________________________________________ Steve Muench, Consulting Product Manager & XML Evangelist Business Components for Java Development Team http://technet.oracle.com/tech/java http://technet.oracle.com/tech/xml ----- Original Message ----- From: Ed Ward To: Sent: Friday, December 03, 1999 6:53 AM Subject: Re: How to do formatting of dates and times with SQLProcessor On Fri, 3 Dec 1999 00:31:58 -0500 (EST), you wrote: >Hi guys. I'm trying to figure out how to configure SQLProcessor to format >dates and times nicely. The naive approach would be something like this: > >timestamp-format="yyyy-MM-dd hh:mm:ss"> > >but suppose you have more than one date column and you want to specify >different formats for the different columns? One of my local users >suggested this: > > > yyyy-MM-dd > MMM d, yyyy > > >which might work, but it's a break from the tradition of putting all >resultset configuration options in the query element. It does, however, >greatly simplify setting column-specific options. Does anyone have either >an argument to make for one of these options or an alternate suggestion? > >- donald > How about : It still doesn't solve your problem of breaking from the tradition of keeping all the configuration options in the query element, but its not so tied to the problem of formatting dates. ed. From gerard.van.enk@eo.nl Fri Dec 3 23:02:16 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 43251 invoked from network); 3 Dec 1999 23:02:16 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 3 Dec 1999 23:02:16 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Sat, 4 Dec 1999 00:02:31 +0100 From: "Gerard van Enk" To: Subject: RE: problem with StyleBook Date: Fri, 3 Dec 1999 23:58:17 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <38478B4B.918D9360@apache.org> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal > Gerard van Enk wrote: > > > > I know that > > > '/home/gerard/xml/xml-stylebook/home/gerard/xml/xml-stylebook/styl es/apachexml/resources' > > isn't a directory, it uses twice the > > '/home/gerard/xml/xml-style-book/'-part. > > But I don't know where it gets this part of the directory-name and why > > it displays it twice...... > > > > I use the Blackdown jdk1.2.2 RC2 for this. > > Guuu.... That's the first bug I got on SBK... I don't know, but it seems > to me that the Blackdown jdk1.2.2 has some bugs in the URL parsing > mechanism... I just reviewed the code and there's nothing I think is > wrong there... > Maybe I'm doing something wrong, I'm a stylebook-newbie ;-) I'll look into the bugreports from the blackdown jdk1.2.2. > Try calling it in this way: > > java -cp [classpath] org.apache.stylebook.StyleBook \ > "targetDirectory=docs/targets/" docs/book.xml \ > /home/gerard/xml/xml-stylebook/styles/apachexml > > (note that the trailing "/" character in the last argument is missing > > or just with a relative directory > > java -cp [classpath] org.apache.stylebook.StyleBook \ > "targetDirectory=docs/targets/" docs/book.xml \ > styles/apachexml I tried it both, but it didn't change anything...still got the same problem. I also tried it with the jdk1.2 from blackdown (I think this was the beta 2 release). Do I need jdk1.2 (or higher) for stylebook, or does it also run with jdk1.1.8??? Can it be somekind of problem with Xalan? Because the error occurs after the message: "[XalanProcessor] Applying XSL sheet". I really like to try StyleBook, so every help is welcome.....thanks! Gerard From stefano@locus.apache.org Fri Dec 3 23:46:35 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 43702 invoked from network); 3 Dec 1999 23:46:35 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:46:35 -0000 Received: (qmail 17914 invoked by uid 2016); 3 Dec 1999 23:46:18 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 17863 invoked from network); 3 Dec 1999 23:46:17 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:46:17 -0000 Received: (qmail 43699 invoked by uid 1010); 3 Dec 1999 23:46:16 -0000 Date: 3 Dec 1999 23:46:16 -0000 Message-ID: <19991203234616.43698.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon build.xml changes.xml todo.xml stefano 99/12/03 15:46:16 Modified: . build.xml changes.xml todo.xml Log: some updates Revision Changes Path 1.3 +3 -3 xml-cocoon/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 1999/12/03 00:07:16 1.2 +++ build.xml 1999/12/03 23:46:16 1.3 @@ -34,7 +34,7 @@ Copyright: Copyright (c) 1999 The Apache Software Foundation. - $Id: build.xml,v 1.2 1999/12/03 00:07:16 stefano Exp $ + $Id: build.xml,v 1.3 1999/12/03 23:46:16 stefano Exp $ ==================================================================== --> @@ -89,7 +89,7 @@ - + - + 1.5 +2 -2 xml-cocoon/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon/changes.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- changes.xml 1999/12/03 00:07:16 1.4 +++ changes.xml 1999/12/03 23:46:16 1.5 @@ -1,10 +1,10 @@ - + 1.4 +12 -3 xml-cocoon/todo.xml Index: todo.xml =================================================================== RCS file: /home/cvs/xml-cocoon/todo.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- todo.xml 1999/12/03 00:07:16 1.3 +++ todo.xml 1999/12/03 23:46:16 1.4 @@ -4,14 +4,14 @@ - - + + @@ -23,6 +23,10 @@ Write the HTML/FO stylesheets. + + Write the user selectable error page. + + Finish Ant build file and clean it up. @@ -31,6 +35,11 @@ Make sure all the java.apache.org stuff is removed. + + + Implement "xsl:output" instead of "cocoon-format" PI and redesign + formatting subsystem. + Pass request/session parameters to the XSLT processors for dynamic From stefano@locus.apache.org Fri Dec 3 23:46:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 43997 invoked from network); 3 Dec 1999 23:46:55 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:46:55 -0000 Received: (qmail 18501 invoked by uid 2016); 3 Dec 1999 23:46:55 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 18498 invoked from network); 3 Dec 1999 23:46:54 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:46:54 -0000 Received: (qmail 43994 invoked by uid 1010); 3 Dec 1999 23:46:53 -0000 Date: 3 Dec 1999 23:46:53 -0000 Message-ID: <19991203234653.43993.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml guide.xml index.xml installing.xml javadoc.xml license.xml sqlprocessor.xml technologies.xml WD-xsp.xml stefano 99/12/03 15:46:53 Modified: docs cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml guide.xml index.xml installing.xml javadoc.xml license.xml sqlprocessor.xml technologies.xml WD-xsp.xml Log: turned on validation now that I found the problem Revision Changes Path 1.4 +1 -1 xml-cocoon/docs/cocoon2.xml Index: cocoon2.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/cocoon2.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cocoon2.xml 1999/12/03 00:08:41 1.3 +++ cocoon2.xml 1999/12/03 23:46:51 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/dcpprocessor.xml Index: dcpprocessor.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/dcpprocessor.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dcpprocessor.xml 1999/12/03 00:08:41 1.3 +++ dcpprocessor.xml 1999/12/03 23:46:51 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/dynamic.xml Index: dynamic.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/dynamic.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dynamic.xml 1999/12/03 00:08:41 1.3 +++ dynamic.xml 1999/12/03 23:46:51 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/faq.xml Index: faq.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/faq.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- faq.xml 1999/12/03 00:08:41 1.3 +++ faq.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - + 1.4 +1 -1 xml-cocoon/docs/guide.xml Index: guide.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/guide.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- guide.xml 1999/12/03 00:08:41 1.3 +++ guide.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.xml 1999/12/03 00:08:41 1.3 +++ index.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/installing.xml Index: installing.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/installing.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- installing.xml 1999/12/03 00:08:41 1.3 +++ installing.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.3 +1 -1 xml-cocoon/docs/javadoc.xml Index: javadoc.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/javadoc.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- javadoc.xml 1999/12/03 00:08:41 1.2 +++ javadoc.xml 1999/12/03 23:46:52 1.3 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/license.xml Index: license.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/license.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- license.xml 1999/12/03 00:08:41 1.3 +++ license.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/sqlprocessor.xml Index: sqlprocessor.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/sqlprocessor.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sqlprocessor.xml 1999/12/03 00:08:41 1.3 +++ sqlprocessor.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/technologies.xml Index: technologies.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/technologies.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- technologies.xml 1999/12/03 00:08:41 1.3 +++ technologies.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    1.4 +1 -1 xml-cocoon/docs/WD-xsp.xml Index: WD-xsp.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/WD-xsp.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- WD-xsp.xml 1999/12/03 00:08:41 1.3 +++ WD-xsp.xml 1999/12/03 23:46:52 1.4 @@ -1,6 +1,6 @@ - +
    From stefano@locus.apache.org Fri Dec 3 23:47:52 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 44266 invoked from network); 3 Dec 1999 23:47:52 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:47:52 -0000 Received: (qmail 19921 invoked by uid 2016); 3 Dec 1999 23:47:52 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 19911 invoked from network); 3 Dec 1999 23:47:51 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:47:51 -0000 Received: (qmail 44263 invoked by uid 1010); 3 Dec 1999 23:47:50 -0000 Date: 3 Dec 1999 23:47:50 -0000 Message-ID: <19991203234750.44262.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/dtd document-v10.dtd specification-v10.dtd stefano 99/12/03 15:47:50 Modified: dtd document-v10.dtd specification-v10.dtd Log: the problem was that Xerces is messing up with EMPTY being an Entity so I removed it and works fine. Sounds like a Xerces bug, but it doesn't happen all the time. Weird. Revision Changes Path 1.2 +77 -79 xml-cocoon/dtd/document-v10.dtd Index: document-v10.dtd =================================================================== RCS file: /home/cvs/xml-cocoon/dtd/document-v10.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- document-v10.dtd 1999/11/30 16:29:57 1.1 +++ document-v10.dtd 1999/12/03 23:47:50 1.2 @@ -1,11 +1,11 @@ @@ -76,22 +76,20 @@ - - - - + - @@ -182,11 +180,11 @@ ==================================================================== --> + - @@ -194,7 +192,7 @@ @@ -202,7 +200,7 @@ @@ -216,7 +214,7 @@ - + @@ -251,7 +249,7 @@ - + @@ -264,9 +262,9 @@ - @@ -283,19 +281,19 @@ - - - @@ -305,7 +303,7 @@ - @@ -315,26 +313,26 @@ - + - - + + %common.att;> + - @@ -354,7 +352,7 @@ - + @@ -385,12 +383,12 @@ |char) #IMPLIED char CDATA #IMPLIED charoff CDATA #IMPLIED'> - + - + - + - + @@ -428,10 +426,10 @@ |all) #IMPLIED cellspacing CDATA #IMPLIED cellpadding CDATA #IMPLIED> - + - + - - + + + %cellvalign.att;> - + - + - + - + - + - + - + @@ -525,26 +523,26 @@ - + - + - - + + %common.att;> @@ -562,29 +560,29 @@ - + - + - + - + - + - + - + @@ -598,16 +596,16 @@ - + - + - + - + @@ -618,10 +616,10 @@ - + - + 1.2 +1 -1 xml-cocoon/dtd/specification-v10.dtd Index: specification-v10.dtd =================================================================== RCS file: /home/cvs/xml-cocoon/dtd/specification-v10.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- specification-v10.dtd 1999/11/30 16:29:57 1.1 +++ specification-v10.dtd 1999/12/03 23:47:50 1.2 @@ -71,7 +71,7 @@ - + Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 44513 invoked from network); 3 Dec 1999 23:48:08 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 3 Dec 1999 23:48:08 -0000 Received: from apache.org (pv24-pri.systemy.it [194.21.255.24]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id AAA20124 for ; Sat, 4 Dec 1999 00:48:02 +0100 Message-ID: <38481967.1D87FF41@apache.org> Date: Fri, 03 Dec 1999 20:26:31 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor References: <99Dec3.134302gmt.19715@pluto.keane.uk.com> <016001bf3da5$02114e50$5a672382@us.oracle.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Steve Muench wrote: > > Donald, > > Can't you just rely on the database to format > the date in the format you want and keep the > tags simpler? > > SELECT TO_CHAR(hiredate,'Month DD, YYYY) as hiredate > FROM EMP > : > > Databases have pretty evolved number/date formatting > routines that handle all the NLS/locale issues already. Excuse the stupid question: are these SQL-portable? > Seems like a problem that you could push down a layer > and keep the model simpler in the "page"... You're totally right if the standard uses them, otherwise, Donald is right to have than handy and provide a new portable layer. Who's right? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Fri Dec 3 23:48:11 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 44759 invoked from network); 3 Dec 1999 23:48:11 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 3 Dec 1999 23:48:11 -0000 Received: from apache.org (pv24-pri.systemy.it [194.21.255.24]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id AAA20142 for ; Sat, 4 Dec 1999 00:48:08 +0100 Message-ID: <384819A2.C7DC715@apache.org> Date: Fri, 03 Dec 1999 20:27:30 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Error Handling References: <199912031258.iZoM@sbb.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CHRISTOPH.OEHLER@SBB.CH wrote: > > --- Erhalten von I0.U150033 0512 20 5221 03.12.99 13.58 > > The dynamic generated Error page by Cocoon is really helpfull for > developping/debuging. But how about if you are using Cocoon > productively? Good point. > I dont think the visitor on our site is interested > in the stacktrace nor does he propabely understand what it means. No, you're totally right. > What do you guys think of displaying a xml-document which one can > specify in cocoon.properties. If cocoon fails to display this page > it could then show the error page. Right. I'll do that right now. > For debugin purpose it would be great to specify in the > propertyfile wheter to display cocoon's error page or the page > selected by the administrator. > > What's your opinion on this?? +1, I'll implement it tonight. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@locus.apache.org Fri Dec 3 23:49:35 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 45464 invoked from network); 3 Dec 1999 23:49:35 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:49:35 -0000 Received: (qmail 21555 invoked by uid 2016); 3 Dec 1999 23:49:17 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 21534 invoked from network); 3 Dec 1999 23:49:17 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:49:17 -0000 Received: (qmail 45461 invoked by uid 1010); 3 Dec 1999 23:49:16 -0000 Date: 3 Dec 1999 23:49:16 -0000 Message-ID: <19991203234916.45460.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/samples/wap example-portfolio.xml portfolio-html.xsl portfolio-wml.xsl stefano 99/12/03 15:49:16 Modified: samples/dcp sample-page-html.xsl samples/sites/java.apache.org fancy-page-html.xsl samples/wap example-portfolio.xml portfolio-html.xsl portfolio-wml.xsl Added: samples index.xml index.xsl Log: added an XML-ized version of the Cocoon live show Revision Changes Path 1.1 xml-cocoon/samples/index.xml Index: index.xml =================================================================== This is a very simple demostration of how to use Cocoon. A simple XML page is transformed into an HTML page. This page shows a much more complex example that shows how powerful is the style separation and how powerful XML+XSL can be even for static web publishing. This pages shows the same thing for the Apache Jakarta web site. This page shows how you can use Cocoon to generate dynamic content using XML processing instructions to trigger Java logic execution. This page shows how you can use Cocoon to generate dynamic content using XML processing instructions to trigger ECMAScript logic execution. This page shows some potentials of the XSL Formatting Object specifications tranformed into PDF (we suggest you to install Adobe Acrobat Reader as your browser plugin for smoother integration) In this example, part of Joseph Conrad's "The Heart of Darkness" novel is taken from its orginal style-free XML format and rendered into PDF using an XML->FO stylesheet. In this example, we show how Cocoon is able to understand which browser is requesting the page and applies a different stylesheet to the same XML page to render on the different clients. This page is formatted in WML (Wireless Markup Language) if the Nokia Wap Toolkit 1.2 browser (which you could get for free from Nokia) requests this page. Look into the example source to change this for your favorite WAP browser/cell-phone/PDA. This page has the same exact source file as the hello world example, but the stylesheet formats it using the VoiceML language. You page has been tested with the Motorola VoiceML SDK which you get for free from Motorola, but should work with any other VoiceML browser. 1.1 xml-cocoon/samples/index.xsl Index: index.xsl =================================================================== type="text/html" Cocoon Live Show


    Cocoon Live Show


    Copyright © 1999 The Apache XML Project.
    All rights reserved.


    -
    1.3 +82 -37 xml-cocoon/samples/dcp/sample-page-html.xsl Index: sample-page-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/dcp/sample-page-html.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sample-page-html.xsl 1999/12/02 11:55:01 1.2 +++ sample-page-html.xsl 1999/12/03 23:49:15 1.3 @@ -3,61 +3,106 @@ - type="text/html" - - - <xsl:value-of select="title"/> - - -

    - - - + type="text/html" + + + <xsl:value-of select="title"/> + + +


    +
    + + + + +
    + + + + + + + +
    + +
    + +
    +
    +
    + +
    - + -

    + -

    +
    - + -

    The following is the list of parameters for this request:

    +

    The following is the list of parameters for this request:

    - - - - - - - -
    Parameters
    NameValue(s)
    +
    + + + + +
    + + + + + + +
    NameValue(s)
    +
    +
    - - - - - -
    - - + + + + + #f0f0f0 + + + #ffffff + + + + + + + + #f0f0f0 + + + #ffffff + + + + +
    + +
    - - - - - + + + + + -
    + + \ No newline at end of file 1.3 +1 -5 xml-cocoon/samples/sites/java.apache.org/fancy-page-html.xsl Index: fancy-page-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/sites/java.apache.org/fancy-page-html.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- fancy-page-html.xsl 1999/12/02 11:55:02 1.2 +++ fancy-page-html.xsl 1999/12/03 23:49:15 1.3 @@ -1,14 +1,10 @@ - + - - - - type="text/html" 1.3 +0 -6 xml-cocoon/samples/wap/example-portfolio.xml Index: example-portfolio.xml =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/example-portfolio.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- example-portfolio.xml 1999/12/02 11:55:03 1.2 +++ example-portfolio.xml 1999/12/03 23:49:15 1.3 @@ -61,10 +61,4 @@ 87.03 - -If loading this page takes a while, you're probably using Netscape -Navigator which is very slow at rendering the multiple nested tables -used in this page. Try Mozilla and feel the power of the new rendering -engine, instead of thinking that Cocoon is slow :) - 1.3 +46 -72 xml-cocoon/samples/wap/portfolio-html.xsl Index: portfolio-html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/portfolio-html.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- portfolio-html.xsl 1999/12/02 11:55:03 1.2 +++ portfolio-html.xsl 1999/12/03 23:49:15 1.3 @@ -8,68 +8,49 @@ type="text/html" - - - - Portfolio - - - - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - - - - - -
    - Portfolio -
    - - - $ ( - - - %) - - - - -
    -
    -
    -
    -
    -
    -
    - - + + Your Portfolio + + + +
    + + + + +
    + + + + +
    + + + + + + + + +
    + Your Portfolio +
    + + + $ ( + + + %) + + + + +
    +
    +
    +
    +
    +
    @@ -81,11 +62,11 @@ - @@ -115,11 +96,4 @@ - - -

    - -

    -
    - 1.3 +2 -5 xml-cocoon/samples/wap/portfolio-wml.xsl Index: portfolio-wml.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/wap/portfolio-wml.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- portfolio-wml.xsl 1999/12/02 11:55:03 1.2 +++ portfolio-wml.xsl 1999/12/03 23:49:16 1.3 @@ -2,10 +2,7 @@ - + type="text/wml" @@ -30,7 +27,7 @@

    - Copyright© 1999
    + Copyright © 1999
    Apache Software Foundation.
    All rights reserved.
    From stefano@locus.apache.org Fri Dec 3 23:49:54 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 45720 invoked from network); 3 Dec 1999 23:49:54 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:49:54 -0000 Received: (qmail 22612 invoked by uid 2016); 3 Dec 1999 23:49:54 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 22610 invoked from network); 3 Dec 1999 23:49:54 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:49:54 -0000 Received: (qmail 45717 invoked by uid 1010); 3 Dec 1999 23:49:53 -0000 Date: 3 Dec 1999 23:49:53 -0000 Message-ID: <19991203234953.45716.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/samples/sites/jakarta.apache.org - New directory stefano 99/12/03 15:49:53 xml-cocoon/samples/sites/jakarta.apache.org - New directory From stefano@locus.apache.org Fri Dec 3 23:50:27 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 45994 invoked from network); 3 Dec 1999 23:50:27 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:50:27 -0000 Received: (qmail 22899 invoked by uid 2016); 3 Dec 1999 23:50:27 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 22897 invoked from network); 3 Dec 1999 23:50:27 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:50:27 -0000 Received: (qmail 45991 invoked by uid 1010); 3 Dec 1999 23:50:26 -0000 Date: 3 Dec 1999 23:50:26 -0000 Message-ID: <19991203235026.45990.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/samples/sites/jakarta.apache.org index-page.xml page-html.xsl style.css stefano 99/12/03 15:50:26 Added: samples/sites/jakarta.apache.org index-page.xml page-html.xsl style.css Log: added a new xml-ized site as an example Revision Changes Path 1.1 xml-cocoon/samples/sites/jakarta.apache.org/index-page.xml Index: index-page.xml =================================================================== Front Page News & Status Mission Guidelines FAQs Binaries Source Code Overview CVS Repositories Mailing Lists Reference Library Tomcat Tomcat Check Who We Are Acknowledgements

    The goal of the Jakarta Project is to provide commercial-quality server solutions based on the Java Platform that are developed in an open and cooperative fashion.

    The Jakarta Project has nothing to do, nor condones, the unfortunate situtation in East Timor. For more information about why the project is named "Jakarta" click here.

    The flagship product, Tomcat, is a world-class implementation of the Java Servlet 2.2 and JavaServer Pages 1.1 Specifications. This implementation will be used in the Apache Web Server as well as in other web servers and development tools.

    The Tomcat Implementation is currently in beta form. We are working diligently on merging the current Apache Jserv Project's source code with the Sun code. We expect to have a final release of Tomcat by the end of 1999. To learn more about the various Tomcat releases, click here.

    The Jakarta Project is composed of members of the current Apache Jserv Project, engineers from major corporations such as Sun and IBM, and serious, committed developers at large. All interested developers are welcome to join and participate. To learn more about getting involved, click here.

    1.1 xml-cocoon/samples/sites/jakarta.apache.org/page-html.xsl Index: page-html.xsl =================================================================== type="text/html" <xsl:value-of select="@title"/>
    + - + - +

    Copyright © 1999 The Apache Software Foundation
    Legal Stuff They Make Us Say
    Contact Information

    :


    1.1 xml-cocoon/samples/sites/jakarta.apache.org/style.css Index: style.css =================================================================== body { font-family: "Times New Roman", Times, serif; font-style: normal; color: #000000; background-color: #FFFFFF; } h1 { font-family: Arial, Helvetica, sans-serif; color: #0033CC } h2 { font-family: Arial, Helvetica, sans-serif; color: #0033CC } h3 { font-family: Arial, Helvetica, sans-serif; color: #0033CC } b { font-weight: bold; } .code { font-family: Courier, mono; } .codeblock { font-family: Courier, mono; } .navheading { font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #0033CC } .navitem { font-family: "Times New Roman", Times, serif; margin-left: 10pt; color: #000000 } .itemdef { font-family: "Times New Roman", Times, serif; font-size: smaller; color: #000000 } .fineprint { font-family: Arial, Helvetica, sans-serif; font-size: smaller; color: #000000 } From stefano@locus.apache.org Fri Dec 3 23:51:36 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 46257 invoked from network); 3 Dec 1999 23:51:36 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 23:51:36 -0000 Received: (qmail 24453 invoked by uid 2016); 3 Dec 1999 23:51:26 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 24371 invoked from network); 3 Dec 1999 23:51:18 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 23:51:18 -0000 Received: (qmail 46253 invoked by uid 1010); 3 Dec 1999 23:51:17 -0000 Date: 3 Dec 1999 23:51:17 -0000 Message-ID: <19991203235117.46252.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/formatter WMLFormatter.java stefano 99/12/03 15:51:17 Modified: src/org/apache/cocoon/formatter WMLFormatter.java Log: fixed some stupid bugs Revision Changes Path 1.2 +3 -4 xml-cocoon/src/org/apache/cocoon/formatter/WMLFormatter.java Index: WMLFormatter.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/formatter/WMLFormatter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WMLFormatter.java 1999/11/30 16:30:04 1.1 +++ WMLFormatter.java 1999/12/03 23:51:17 1.2 @@ -1,4 +1,4 @@ -/*-- $Id: WMLFormatter.java,v 1.1 1999/11/30 16:30:04 stefano Exp $ -- +/*-- $Id: WMLFormatter.java,v 1.2 1999/12/03 23:51:17 stefano Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -59,18 +59,17 @@ /** * @author Stefano Mazzocchi - * @version $Revision: 1.1 $ $Date: 1999/11/30 16:30:04 $ + * @version $Revision: 1.2 $ $Date: 1999/12/03 23:51:17 $ */ public class WMLFormatter extends AbstractFormatter implements Status { public void format(Document document, Writer writer, Dictionary p) throws Exception { OutputFormat format = super.getFormat(p); - format.setMethod(OutputFormat.METHOD_HTML); + format.setMethod(OutputFormat.METHOD_XML); format.setOmitXMLDeclaration(false); format.setPreserveSpace(false); format.setDoctype("-//WAPFORUM//DTD WML 1.1//EN", "http://www.wapforum.org/DTD/wml_1.1.xml"); - format.setVersion("1.1"); Serializer serializer = Serializer.makeSerializer(writer, format); serializer.serialize(document); } From bcm@nazgul.maz.org Fri Dec 3 17:58:49 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Delivered-To: moderator for cocoon-dev@xml.apache.org Received: (qmail 38632 invoked from network); 3 Dec 1999 17:58:49 -0000 Received: from rubel.maz.org (HELO nazgul.maz.org) (209.60.53.26) by 63.211.145.10 with SMTP; 3 Dec 1999 17:58:49 -0000 Received: (qmail 20915 invoked by uid 500); 3 Dec 1999 17:59:14 -0000 Date: Fri, 3 Dec 1999 09:59:14 -0800 (PST) From: brian moseley X-Sender: bcm@rubel.maz.org To: cocoon-dev@xml.apache.org Subject: Re: Error Handling In-Reply-To: <3847C0B3.64A4A91A@utoronto.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII this is where i use the apache custom_response/internal redirect mechanism to great advantage in my mod_perl applications - when im processing an exception i select an error uri and set up an internal redirect to it. i get to stuff the exception message in the request notes table so that it's available to the 2nd request. im not terribly knowledgable about the servlet api, but it looks we could do something similar in cocoon by modifying the request and having the request dispatcher forward it? On Fri, 3 Dec 1999, Alex Muc wrote: > I think you would have to have the ability to display different error > files depending on the error that was produced as there are many > different sources for potential failure during processing. Some > mechanism to do that should be considered. Probably the easiest way to > do it would be to just "catch" the error and then wrap it in some more > user-friendly error response which actually gets delivered to the user. > > My $.02 worth. > Alex. > > CHRISTOPH.OEHLER@SBB.CH wrote: > > > --- Erhalten von I0.U150033 0512 20 5221 03.12.99 13.58 > > > > The dynamic generated Error page by Cocoon is really helpfull for > > developping/debuging. But how about if you are using Cocoon > > productively? I dont think the visitor on our site is interested > > in the stacktrace nor does he propabely understand what it means. > > What do you guys think of displaying a xml-document which one can > > specify in cocoon.properties. If cocoon fails to display this page > > it could then show the error page. > > > > For debugin purpose it would be great to specify in the > > propertyfile wheter to display cocoon's error page or the page > > selected by the administrator. > > > > What's your opinion on this?? > > > > ---- 03.12.99 13.58 ---- Gesendet an --------------------------- > > -> cocoon-dev@xml.apache.org > From pier@apache.org Sat Dec 4 04:06:47 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 49058 invoked from network); 4 Dec 1999 04:06:47 -0000 Received: from dnai-216-15-97-206.cust.dnai.com (HELO kali.betaversion.org) (216.15.97.206) by 63.211.145.10 with SMTP; 4 Dec 1999 04:06:47 -0000 Received: from apache.org(sun.betaversion.org[192.168.1.2]) (2098 bytes) by kali.betaversion.org via smail with P:esmtp/R:internet/T:smtp (sender: ) id for ; Fri, 3 Dec 1999 20:10:47 -0800 (PST) (Smail-3.2.0.106 1999-Mar-31 #3 built 1999-Sep-21) Message-ID: <38489433.B67169ED@apache.org> Date: Fri, 03 Dec 1999 20:10:27 -0800 From: Pierpaolo Fumagalli Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: problem with StyleBook References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gerard van Enk wrote: > > > Guuu.... That's the first bug I got on SBK... I don't know, but it seems > > to me that the Blackdown jdk1.2.2 has some bugs in the URL parsing > > mechanism... I just reviewed the code and there's nothing I think is > > wrong there... > > Maybe I'm doing something wrong, I'm a stylebook-newbie ;-) > I'll look into the bugreports from the blackdown jdk1.2.2. Nahh.. Should be some bug somewhere... > I tried it both, but it didn't change anything...still got the same problem. > I also tried it with the jdk1.2 from blackdown (I think this was the beta 2 > release). so it must be some kind of error I made in my classes... I'll setup the JDK 1.2 on my linux box and try it out... > Do I need jdk1.2 (or higher) for stylebook, or does it also run with > jdk1.1.8??? 1.2... because images generation require the new java platform-2 awt. > Can it be somekind of problem with Xalan? Because the error occurs after the > message: "[XalanProcessor] Applying XSL sheet". Nope... it shouldn't.... > I really like to try StyleBook, so every help is welcome.....thanks! Don't worry... noone is more interested in making that baby work everywhere more than me... We'll fix it.. we'll fix it :) -- -------------------------------------------------------------------- - P I E R - stable structure erected over water to allow the docking of seacraft From balld@phoenix.webslingerZ.com Sat Dec 4 07:34:51 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 51785 invoked from network); 4 Dec 1999 07:34:51 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 4 Dec 1999 07:34:51 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA31195 for ; Sat, 4 Dec 1999 02:34:03 -0500 Date: Sat, 4 Dec 1999 02:34:03 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor In-Reply-To: <38481967.1D87FF41@apache.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 3 Dec 1999, Stefano Mazzocchi wrote: > Steve Muench wrote: > > > Can't you just rely on the database to format > > the date in the format you want and keep the > > tags simpler? > > > > SELECT TO_CHAR(hiredate,'Month DD, YYYY) as hiredate > > FROM EMP > > : > > > > Databases have pretty evolved number/date formatting > > routines that handle all the NLS/locale issues already. > > Excuse the stupid question: are these SQL-portable? Those particular functions aren't SQL-portable, but similar functions do exist for most databases. However, since I at least often use one database for development and another for deployment, and want to be able to switch database servers at the drop of a hat, I'd like to at least offer the option of doing column formatting in a database independent fashion. If you, like Steve, want to do your formatting in the SQL, then go to town, nobody's stopping you. :) I think I like the syntax proposed by Ed Ward best so far: because it also allows to reformatting of other data types (e.g. floats, currencies), it could allow more arbitrary mappings of column names to element names (though I personally wouldn't recommend it), and it would be a great place to be able to flag a text column as containing XML data so that a tree could be created instead of a text node. > > Seems like a problem that you could push down a layer > > and keep the model simpler in the "page"... > > You're totally right if the standard uses them, otherwise, Donald is > right to have than handy and provide a new portable layer. > > Who's right? Let's both be right. People who want simple XML can put the complexity in the SQL, and people who want simple SQL can put the complexity in the XML. :) - donald From balld@phoenix.webslingerZ.com Sat Dec 4 07:39:22 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 52049 invoked from network); 4 Dec 1999 07:39:22 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 4 Dec 1999 07:39:22 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA31211 for ; Sat, 4 Dec 1999 02:38:34 -0500 Date: Sat, 4 Dec 1999 02:38:34 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: SQLQueryCreator feature add In-Reply-To: <003501bf3c7d$4889eb40$1d837ac0@krdl.org.sg> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 2 Dec 1999, Sidney Chong wrote: > Hi, I needed to use some session parameters (in addition to request parms) > in my SQL queries but the stock SQLQueryCreator that came with cocoon-1.5 > can only do request parameters (although the master_default_query_props did > include session variable delimiters) hence I've decided to build it in > myself. The code is attached below. It goes into the SQLQueryCreator class > and replaces the getQuery() mtd. I checked in patches to CVS that address this and another issue. Lots of people had said that SQLQueryCreator should be an interface, not a class. I created a QueryCreator interface (renamed to avoid confusion), created a DefaultQueryCreator class that does request and session variable substitution, and removed the SQLQueryCreator class. Sidney, note that I had to remove the internal StringBuffer from the substitute method - although your reformulation of the algorithm is likely more efficient that mine that rewrites strings, your method relies on a StringBuffer.replace method that doesn't exist in my JDK (I suspect it's a JDK-1.2 addition). Thanks for the code though. If you have more patches to submit, please do, but try to check them for JDK-1.1 compatibility first. Thanks. - donald From stefano@apache.org Mon Dec 6 00:48:36 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 80796 invoked from network); 6 Dec 1999 00:48:36 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 6 Dec 1999 00:48:36 -0000 Received: from apache.org (pv50-pri.systemy.it [194.21.255.50]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA03790 for ; Mon, 6 Dec 1999 01:48:32 +0100 Message-ID: <384AFE38.5C1C174@apache.org> Date: Mon, 06 Dec 1999 01:07:20 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Error Handling References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit brian moseley wrote: > > this is where i use the apache custom_response/internal > redirect mechanism to great advantage in my mod_perl > applications - when im processing an exception i select an > error uri and set up an internal redirect to it. i get to > stuff the exception message in the request notes table so > that it's available to the 2nd request. > > im not terribly knowledgable about the servlet api, but it > looks we could do something similar in cocoon by modifying > the request and having the request dispatcher forward it? Yes, that could be a solution. I'll try different ways out in the next few days. Also, what about having an HTTP error code set when something bad happens? what should we use? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Mon Dec 6 00:48:40 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 81049 invoked from network); 6 Dec 1999 00:48:40 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 6 Dec 1999 00:48:40 -0000 Received: from apache.org (pv50-pri.systemy.it [194.21.255.50]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA03794 for ; Mon, 6 Dec 1999 01:48:34 +0100 Message-ID: <384AFEB9.20E26C63@apache.org> Date: Mon, 06 Dec 1999 01:09:29 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Donald Ball wrote: > > > Seems like a problem that you could push down a layer > > > and keep the model simpler in the "page"... > > > > You're totally right if the standard uses them, otherwise, Donald is > > right to have than handy and provide a new portable layer. > > > > Who's right? > > Let's both be right. People who want simple XML can put the complexity in > the SQL, and people who want simple SQL can put the complexity in the XML. > :) In my experience, simple SQL is much more portable than complex XML :) Go for it. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From bcm@nazgul.maz.org Mon Dec 6 01:54:44 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 82521 invoked from network); 6 Dec 1999 01:54:44 -0000 Received: from rubel.maz.org (HELO nazgul.maz.org) (209.60.53.26) by 63.211.145.10 with SMTP; 6 Dec 1999 01:54:44 -0000 Received: (qmail 29833 invoked by uid 500); 6 Dec 1999 01:55:22 -0000 Date: Sun, 5 Dec 1999 17:55:22 -0800 (PST) From: brian moseley X-Sender: bcm@rubel.maz.org To: cocoon-dev@xml.apache.org Subject: Re: Error Handling In-Reply-To: <384AFE38.5C1C174@apache.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999, Stefano Mazzocchi wrote: > brian moseley wrote: > > > > this is where i use the apache custom_response/internal > > redirect mechanism to great advantage in my mod_perl > > applications - when im processing an exception i select an > > error uri and set up an internal redirect to it. i get to > > stuff the exception message in the request notes table so > > that it's available to the 2nd request. > > > > im not terribly knowledgable about the servlet api, but it > > looks we could do something similar in cocoon by modifying > > the request and having the request dispatcher forward it? > > Yes, that could be a solution. I'll try different ways > out in the next few days. hm but doesnt RD.forward() break if the request body has already been read, or at least not see any request body? is it possible to re-set the request body? > Also, what about having an HTTP error code set when > something bad happens? what should we use? in the application i described above, i always set to 500, cos the ErrorDocument i've configured for 500 knows to look in the notes table for an exception message. it also looks in the err_headers_out for a special header. of course we dont have any way to access these apache-specific constructs through the servlet api, so returning a 500 is less appealing. id rather my application internally recognize an exception and serve a 200 response containing exception-handler-generated content. From fgonzale@badlands.nodak.edu Mon Dec 6 03:51:41 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 83648 invoked from network); 6 Dec 1999 03:51:41 -0000 Received: from badlands.nodak.edu (root@134.129.111.66) by 63.211.145.10 with SMTP; 6 Dec 1999 03:51:41 -0000 Received: from badlands.nodak.edu (mmgraphics.cc.ndsu.NoDak.edu [134.129.106.149]) by badlands.NoDak.edu (8.9.3/8.9.3) with ESMTP id VAA118514 for ; Sun, 5 Dec 1999 21:51:39 -0600 Message-ID: <384B3555.3A35C24C@badlands.nodak.edu> Date: Sun, 05 Dec 1999 22:02:30 -0600 From: Felix Guerrero Reply-To: fgonzale@badlands.nodak.edu Organization: CAIT Mad Lab X-Mailer: Mozilla 4.7 (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 To: cocoon Subject: Type in Documentation.. Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit Hi, The jar file that I got for Cocoon is "Cocoon.jar". However, in the documentation for installation there is a line that says: repositories=...,[path-to-cocoon]/bin/cocoon.jar Is this a typo or did I get a different version? -- Thanks. Felix. President and CEO of MAD... && ITS Visiting Scientist (Experimental Support for IT) _____________________________________________________ F e l i x G u e r r e r o Application Developer ITS (Information Technology Services) IACC Building Room 246 North Dakota State University Fargo, ND 58105 Ph. Office: (701) 231 6284 Fax: (701) 231 8541 ____________________________________________________ From spidaman@salon.com Mon Dec 6 05:00:39 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 84754 invoked from network); 6 Dec 1999 05:00:39 -0000 Received: from viagara.salon.com (207.44.198.122) by 63.211.145.10 with SMTP; 6 Dec 1999 05:00:39 -0000 Received: from localhost (spidaman@localhost) by viagara.salon.com (8.9.3/8.9.3) with ESMTP id VAA98617 for ; Sun, 5 Dec 1999 21:00:39 -0800 (PST) (envelope-from spidaman@salon.com) X-Authentication-Warning: viagara.salon.com: spidaman owned process doing -bs Date: Sun, 5 Dec 1999 21:00:39 -0800 (PST) From: Ian Kallen To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor In-Reply-To: Message-ID: X-fish: cod MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII How about having the formats use the strftime tradition? It's used in lots of other places, so FWIW I'd rather see ...since it's familiar. -Ian Yesterday, Donald Ball frothed and gesticulated...: > I think I like the syntax proposed by Ed Ward best so far: > > > > -- Salon Internet http://www.salon.com/ HTTP mechanic, Perl diver, Mebwaster, Some of the above Ian Kallen / AIM: iankallen / Fax: (415) 354-3326 From balld@phoenix.webslingerZ.com Mon Dec 6 05:33:47 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 85102 invoked from network); 6 Dec 1999 05:33:47 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 6 Dec 1999 05:33:47 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id AAA07244 for ; Mon, 6 Dec 1999 00:32:34 -0500 Date: Mon, 6 Dec 1999 00:32:34 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: How to do formatting of dates and times with SQLProcessor In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 5 Dec 1999, Ian Kallen wrote: > How about having the formats use the strftime tradition? It's used in > lots of other places, so FWIW I'd rather see > > ...since it's familiar. If you can give me a java class that has a method that takes in a string in this format and a date and gives me a formatted date, I might build in support for it, or at least make it easily extensible. However, since the class and syntax I'm using is included with the JDK (see SimpleDateFormat class) and is as rich if not richer than the good ol' strftime syntax, I doubt anyone's bothered to write such a formatter... - donald From gerard.van.enk@eo.nl Mon Dec 6 09:39:06 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 88078 invoked from network); 6 Dec 1999 09:39:06 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 6 Dec 1999 09:39:06 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Mon, 6 Dec 1999 10:39:24 +0100 From: "Gerard van Enk" To: Subject: RE: Type in Documentation.. Date: Mon, 6 Dec 1999 10:34:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <384B3555.3A35C24C@badlands.nodak.edu> > The jar file that I got for Cocoon is "Cocoon.jar". However, in the > documentation for installation there is a line that says: > > repositories=...,[path-to-cocoon]/bin/cocoon.jar > > Is this a typo or did I get a different version? You've gotta 'unjar' the Cocoon.jar to get cocoon.jar. You can do this with the following command in the [path-to-cocoon]-directory: jar -xvf Cocoon.jar After this you have the whole cocoon direcory-structuur + all the files you need (including bin/cocoon.jar). Gerard From gerard.van.enk@eo.nl Mon Dec 6 10:23:45 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 89088 invoked from network); 6 Dec 1999 10:23:45 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 6 Dec 1999 10:23:45 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Mon, 6 Dec 1999 11:24:00 +0100 From: "Gerard van Enk" To: Subject: RE: problem with StyleBook Date: Mon, 6 Dec 1999 11:19:31 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <38489433.B67169ED@apache.org> > so it must be some kind of error I made in my classes... I'll setup the > JDK 1.2 on my linux box and try it out... > > > Do I need jdk1.2 (or higher) for stylebook, or does it also run with > > jdk1.1.8??? > > 1.2... because images generation require the new java platform-2 awt. I tried it on a Win98-box and it worked!!!!!! But I still would love to run stylebook on a linux-box..... > > I really like to try StyleBook, so every help is welcome.....thanks! > > Don't worry... noone is more interested in making that baby work > everywhere more than me... We'll fix it.. we'll fix it :) > -- I'm looking forward to the fix 8-) Maybe I've I have some time left, I'll try to do some debugging.... Gerard From CHRISTOPH.OEHLER@SBB.CH Mon Dec 6 10:59:54 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 89703 invoked from network); 6 Dec 1999 10:59:54 -0000 Received: from unknown (HELO memogw1.sbb.ch) (147.78.29.212) by 63.211.145.10 with SMTP; 6 Dec 1999 10:59:54 -0000 Received: from sbb.ch (I26741.sbb.ch [147.78.29.212]) by memogw1.sbb.ch (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id LAA02362 for ; Mon, 06 Dec 1999 11:59:56 +0100 From: CHRISTOPH.OEHLER@SBB.CH MIME-Version: 1.0 Date: Mon, 6 Dec 1999 11:59 +0100 Message-id: <199912061059.ME4c@sbb.ch> To: cocoon-dev@xml.apache.org Subject: Re: Error Handling Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable --- Erhalten von I0.U150033 0512 20 5221 06.12.99 11.59 What about implementing an Error-handler-interface? It would have only one method: handle (Document doc, Dictionary params, Writer write, Exception e). In the implementation of the errorhandler one would be able to generate an output on the response stream. So the user would be able to select the desired handler with an PI. What do you think? ---------------------------------------------------------------------- From: stefano@apache.org To: cocoon-dev@xml.apache.org Date: Mon, 6 Dec 1999 01:07:20 +0100 Subject: Re: Error Handling brian moseley wrote: > > this is where i use the apache custom_response/internal > redirect mechanism to great advantage in my mod_perl > applications - when im processing an exception i select an > error uri and set up an internal redirect to it. i get to > stuff the exception message in the request notes table so > that it's available to the 2nd request. > > im not terribly knowledgable about the servlet api, but it > looks we could do something similar in cocoon by modifying > the request and having the request dispatcher forward it? Yes, that could be a solution. I'll try different ways out in the next few days. Also, what about having an HTTP error code set when something bad happens? what should we use? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche ---- 06.12.99 11.59 ---- Gesendet an ------------------------------- -> cocoon-dev@xml.apache.org From alexander.leschinsky@wdr.de Mon Dec 6 13:53:34 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 91775 invoked from network); 6 Dec 1999 13:53:34 -0000 Received: from smtp01.wdr.de (149.219.195.61) by 63.211.145.10 with SMTP; 6 Dec 1999 13:53:34 -0000 Received: (qmail 17076 invoked from network); 6 Dec 1999 14:53:01 +0100 Received: from pop3.wdr.de (HELO mail01.wdr.de) (149.219.195.66) by smtp01.wdr.de with SMTP; 6 Dec 1999 14:53:01 +0100 Received: from wdr.de (liux0001.wdr.de [149.219.131.22]) by mail01.wdr.de (Netscape Mail Server v1.1) with ESMTP id AAA26559 for ; Mon, 6 Dec 1999 14:52:59 +0200 Sender: gff Message-ID: <384BCE4E.F369D2E5@wdr.de> Date: Mon, 06 Dec 1999 15:55:10 +0100 From: Alexander Leschinsky Organization: GFF GmbH X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.0.35 i686) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: No output from SQLProcessor Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi everybody, I am new to using cocoon, so perhaps this is a silly question. I managed to cocoon and use it with Apache 1.3.9 on Solaris 2.6, Jserv 1.1b3. I experimented with some xml/xsl-files and all worked fine. My problem is that I don´t get an sql-connection running. When I change the parameters in the example database.xml to our mysql-connection (which is working fine in a bunch of servlets) I don´t get any database-generated output, just the framework the xsl-file produces around the (non-present) data. Any ideas? Many thanks in advance, Alexander Leschinsky Geissendoerfer Film- und Fernsehproduktion GmbH http://www.lindenstrasse.de From kendal@interlog.com Mon Dec 6 15:29:44 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 93764 invoked from network); 6 Dec 1999 15:29:44 -0000 Received: from ha1.rdc1.on.wave.home.com (HELO mail.rdc1.on.home.com) (imail@24.2.9.66) by 63.211.145.10 with SMTP; 6 Dec 1999 15:29:44 -0000 Received: from w1 ([24.112.80.173]) by mail.rdc1.on.home.com (InterMail v4.01.01.07 201-229-111-110) with SMTP id <19991206152943.NQIR10744.mail.rdc1.on.home.com@w1> for ; Mon, 6 Dec 1999 07:29:43 -0800 Message-Id: <3.0.32.19991206102941.01e0e200@pop.psi.ca> X-Sender: kendal@pop.psi.ca X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Mon, 06 Dec 1999 10:29:43 -0500 To: cocoon-dev@xml.apache.org From: Rolande Kendal Subject: XML --> PDF Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" I wish to translate XML to PDF instead of HTML. Is anyone aware of such a module/servlet? Otherwise, any stabs at what would be involve to create it? Would Coccon and XSL be adequate? Lastly, if it does not already exist, would anyone be interested in helping to develop such a module? Rolande Kendal From PNarula@directsourcing.com Mon Dec 6 15:33:20 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 94221 invoked from network); 6 Dec 1999 15:33:20 -0000 Received: from proxyserver1.directsourcing.com (HELO proxyserver1.directsourcing) (12.30.176.37) by 63.211.145.10 with SMTP; 6 Dec 1999 15:33:20 -0000 Received: by PROXYSERVER1 with Internet Mail Service (5.5.2448.0) id ; Mon, 6 Dec 1999 10:24:03 -0500 Message-ID: From: PNarula@directsourcing.com To: cocoon-dev@xml.apache.org Subject: RE: XML --> PDF Date: Mon, 6 Dec 1999 10:24:02 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" The FOP module of Cocoon does exactly that. See http://xml.apache.org/fop Hth Pankaj -----Original Message----- From: Rolande Kendal [mailto:kendal@interlog.com] Sent: Monday, December 06, 1999 10:30 AM To: cocoon-dev@xml.apache.org Subject: XML --> PDF I wish to translate XML to PDF instead of HTML. Is anyone aware of such a module/servlet? Otherwise, any stabs at what would be involve to create it? Would Coccon and XSL be adequate? Lastly, if it does not already exist, would anyone be interested in helping to develop such a module? Rolande Kendal From fgonzale@badlands.nodak.edu Mon Dec 6 16:15:23 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 95018 invoked from network); 6 Dec 1999 16:15:23 -0000 Received: from badlands.nodak.edu (root@134.129.111.66) by 63.211.145.10 with SMTP; 6 Dec 1999 16:15:23 -0000 Received: from badlands.nodak.edu (mmgraphics.cc.ndsu.NoDak.edu [134.129.106.149]) by badlands.NoDak.edu (8.9.3/8.9.3) with ESMTP id KAA50486 for ; Mon, 6 Dec 1999 10:15:20 -0600 Message-ID: <384BE3A2.4C65E4D7@badlands.nodak.edu> Date: Mon, 06 Dec 1999 10:26:30 -0600 From: Felix Guerrero Reply-To: fgonzale@badlands.nodak.edu Organization: CAIT Mad Lab X-Mailer: Mozilla 4.7 (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Typo in Documentation.. References: Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit HI, I 'unjar' the Cocoon file.. and got the bin directory, however, it still shows a Cocoon.jar file rather than cocoon.jar. If I 'unjar' that file then there is not a bin. Cocoon works in my server if I simply point to Cocoon.jar. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Original Message: > The jar file that I got for Cocoon is "Cocoon.jar". However, in the > documentation for installation there is a line that says: > > repositories=...,[path-to-cocoon]/bin/cocoon.jar > > Is this a typo or did I get a different version? You've gotta 'unjar' the Cocoon.jar to get cocoon.jar. You can do this with the following command in the [path-to-cocoon]-directory: jar -xvf Cocoon.jar After this you have the whole cocoon direcory-structuur + all the files you need (including bin/cocoon.jar). <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -- Thanks. Felix. President and CEO of MAD... && ITS Visiting Scientist (Experimental Support for IT) _____________________________________________________ F e l i x G u e r r e r o Application Developer ITS (Information Technology Services) IACC Building Room 246 North Dakota State University Fargo, ND 58105 Ph. Office: (701) 231 6284 Fax: (701) 231 8541 ____________________________________________________ From paul@puredesigns.com Mon Dec 6 16:18:53 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 95289 invoked from network); 6 Dec 1999 16:18:53 -0000 Received: from ms.etn.com (HELO smtpgw.etn.com) (151.110.126.50) by 63.211.145.10 with SMTP; 6 Dec 1999 16:18:53 -0000 Received: from johnspr (johnspr.mke.etn.com [151.110.17.81]) by smtpgw.etn.com (8.8.6 (PHNE_14041)/8.8.6) with ESMTP id LAA20537 for ; Mon, 6 Dec 1999 11:25:54 -0500 (EST) Message-ID: <199912061013260546.008944FF@ms.etn.com> X-Mailer: Calypso Version 3.00.00.11 Date: Mon, 06 Dec 1999 10:13:26 -0600 From: "Paul Johnson" To: cocoon-dev@xml.apache.org Subject: Oracle Parser Content-Type: text/plain; charset="us-ascii" Has anyone gotten the Oracle v2 parser to work with Cocoon? Paul From gerard.van.enk@eo.nl Mon Dec 6 16:37:08 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 95735 invoked from network); 6 Dec 1999 16:37:08 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 6 Dec 1999 16:37:08 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Mon, 6 Dec 1999 17:37:25 +0100 From: "Gerard van Enk" To: , Subject: RE: Typo in Documentation.. Date: Mon, 6 Dec 1999 17:32:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <384BE3A2.4C65E4D7@badlands.nodak.edu> > I 'unjar' the Cocoon file.. and got the bin directory, however, it still > shows a Cocoon.jar file rather than cocoon.jar. If I 'unjar' that file > then there is not a bin. Cocoon works in my server if I simply point to > Cocoon.jar. > You're right.....it's a typo......a litte one, but it's still a typo. Maybe there's someone who can fix it, Stefano? A litte type, but for some people it can be misleading ;-) > > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > Original Message: > > The jar file that I got for Cocoon is "Cocoon.jar". However, in the > > documentation for installation there is a line that says: > > > > repositories=...,[path-to-cocoon]/bin/cocoon.jar > > > > Is this a typo or did I get a different version? > > You've gotta 'unjar' the Cocoon.jar to get cocoon.jar. You can do this > with > the following command in the [path-to-cocoon]-directory: > > jar -xvf Cocoon.jar > > After this you have the whole cocoon direcory-structuur + all the files > you > need (including bin/cocoon.jar). > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > -- > > > Thanks. > > Felix. > President and CEO of MAD... > && > ITS Visiting Scientist (Experimental Support for IT) > > _____________________________________________________ > > F e l i x G u e > r r e r o > > Application Developer > ITS (Information Technology > Services) > IACC Building > Room 246 > North Dakota State > University > > Fargo, ND 58105 > Ph. Office: (701) > 231 6284 > Fax: > (701) 231 8541 > ____________________________________________________ > > From bmclaugh@algx.net Mon Dec 6 17:16:19 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 96418 invoked from network); 6 Dec 1999 17:16:19 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 17:16:19 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 11:16:13 -0600 Message-ID: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: Subject: FESI.jslib.* imports Date: Mon, 6 Dec 1999 11:15:47 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 In building Cocoon, it gripes about this package. Where can I get the dist for this? (FESI.jslib.*) BTW, once I'm done, I'll add this information into the build.xml and send in a diff. That way if you want to update the build file you can. Thanks, Brett From bmclaugh@algx.net Mon Dec 6 19:23:56 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 99305 invoked from network); 6 Dec 1999 19:23:56 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 19:23:56 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 13:23:48 -0600 Message-ID: <019b01bf401f$5c158020$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: Subject: Tomcat/Cocoon Date: Mon, 6 Dec 1999 13:23:22 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 I am trying to get and document the process of getting Cocoon working with Jakarta. Has anyone done this? Also, does Cocoon respond differently to not having an init. args of properties= vs. not _finding_ the file specified? This would help me a lot to know for debugging. Thanks, Brett From balld@locus.apache.org Mon Dec 6 21:18:29 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 1369 invoked from network); 6 Dec 1999 21:18:29 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 6 Dec 1999 21:18:29 -0000 Received: (qmail 6913 invoked by uid 2016); 6 Dec 1999 21:18:24 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 6905 invoked from network); 6 Dec 1999 21:18:22 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 6 Dec 1999 21:18:22 -0000 Received: (qmail 1350 invoked by uid 1037); 6 Dec 1999 21:18:21 -0000 Date: 6 Dec 1999 21:18:21 -0000 Message-ID: <19991206211821.1349.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs index.xml balld 99/12/06 13:18:21 Modified: docs index.xml Log: Fixed link to web CVS. Revision Changes Path 1.5 +1 -1 xml-cocoon/docs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/index.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- index.xml 1999/12/03 23:46:52 1.4 +++ index.xml 1999/12/06 21:18:21 1.5 @@ -153,7 +153,7 @@ For direct participation, we suggest you to subscribe to the Cocoon mail lists (follow the link for information on how to subscribe and to access the mail - list archives), to checkout the + list archives), to checkout the latest and greatest code (which you found in the xml-cocoon module in the xml.apache.org CVS code repository), control the todo list and jump in. Document writers are usually the most wanted people so if From bmclaugh@algx.net Mon Dec 6 21:44:44 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 2212 invoked from network); 6 Dec 1999 21:44:44 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 21:44:44 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 15:44:43 -0600 Message-ID: <023a01bf4033$0affa8a0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: Subject: Producers Date: Mon, 6 Dec 1999 15:44:16 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 I can't say that I have a firm grasp on Producers. I am not new to XML, but am to Cocoon somewhat. I am also spending most of my days on Turbine and other frameworks, so you may have to help me twist my brain around the different response/request model. Could someone give me a _short_ overview of producers, just enough to get me going? I looked at DummyProducer, and the xml.apache.org docs, and they talk about how to write producers, etc., but there is little about the details of how to incorporate one into a real practical situation. That's what I'm looking for more than anything. Thanks, Brett From balld@phoenix.webslingerZ.com Mon Dec 6 21:55:19 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 2616 invoked from network); 6 Dec 1999 21:55:19 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 6 Dec 1999 21:55:19 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id QAA14146 for ; Mon, 6 Dec 1999 16:53:57 -0500 Date: Mon, 6 Dec 1999 16:53:57 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Producers In-Reply-To: <023a01bf4033$0affa8a0$8c0f0a0a@allegiancetelecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999, Brett McLaughlin wrote: > I can't say that I have a firm grasp on Producers. I am not new to XML, but > am to Cocoon somewhat. I am also spending most of my days on Turbine and > other frameworks, so you may have to help me twist my brain around the > different response/request model. Could someone give me a _short_ overview > of producers, just enough to get me going? Sure. A producer creates an XML document, currently in the form of a DOM object, in response to an HTTP request. Note that sometime in the future this will probably switch to generating SAX events instead, but you get the picture. > I looked at DummyProducer, and the xml.apache.org docs, and they talk about > how to write producers, etc., but there is little about the details of how > to incorporate one into a real practical situation. That's what I'm looking > for more than anything. I find Processors much more useful. A processor creates an XML document, currently in the form of a DOM object, in response to an HTTP request _and_ an XML document. That is to say, it takes in an XML document, and returns an XML document (possibly the same one that came in with some modifications). Only _one_ producer can act on a request but multiple processors can act. Also, producers in general must be configured through HTTP parameters, while processors can use the HTTP parameters _and_ the input XML document for configuration purposes. Take a look at the SQLProcessor code. It doesn't suck too badly and it's fairly coherent. I've also got a MapProducer that uses a site map file to determine which XML to read initially instead of using the standard FileProducer mapping if you really want a Producer code example to play with. - donald From balld@phoenix.webslingerZ.com Mon Dec 6 21:59:50 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 3103 invoked from network); 6 Dec 1999 21:59:50 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 6 Dec 1999 21:59:50 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id QAA14196 for ; Mon, 6 Dec 1999 16:58:27 -0500 Date: Mon, 6 Dec 1999 16:58:27 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Tomcat/Cocoon In-Reply-To: <019b01bf401f$5c158020$8c0f0a0a@allegiancetelecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999, Brett McLaughlin wrote: > I am trying to get and document the process of getting Cocoon working with > Jakarta. Has anyone done this? > > Also, does Cocoon respond differently to not having an init. args of > properties= vs. not _finding_ the file specified? This would help me a lot > to know for debugging. Thanks, Yes, it does. The former makes an error page come up that says you didn't supply an initialzation argument. The latter sends a message saying the publishing engine could not be initialized (though there are lots of things that can make that message happen). Btw, how far along is Tomcat? - donald From bmclaugh@algx.net Mon Dec 6 22:00:35 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 3388 invoked from network); 6 Dec 1999 22:00:35 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 22:00:35 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 16:00:33 -0600 Message-ID: <024401bf4035$418e9190$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: References: Subject: Re: Producers Date: Mon, 6 Dec 1999 16:00:06 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > On Mon, 6 Dec 1999, Brett McLaughlin wrote: > > > I can't say that I have a firm grasp on Producers. I am not new to XML, but > > am to Cocoon somewhat. I am also spending most of my days on Turbine and > > other frameworks, so you may have to help me twist my brain around the > > different response/request model. Could someone give me a _short_ overview > > of producers, just enough to get me going? > > Sure. A producer creates an XML document, currently in the form of a DOM > object, in response to an HTTP request. Note that sometime in the future > this will probably switch to generating SAX events instead, but you get > the picture. Yup, it will be nice when it goes all SAX... so much easier for FOP and such big documents... > > > I looked at DummyProducer, and the xml.apache.org docs, and they talk about > > how to write producers, etc., but there is little about the details of how > > to incorporate one into a real practical situation. That's what I'm looking > > for more than anything. > > I find Processors much more useful. A processor creates an XML document, > currently in the form of a DOM object, in response to an HTTP request > _and_ an XML document. That is to say, it takes in an XML document, and > returns an XML document (possibly the same one that came in with some > modifications). Only _one_ producer can act on a request but multiple > processors can act. Also, producers in general must be configured through > HTTP parameters, while processors can use the HTTP parameters _and_ > the input XML document for configuration purposes. So why would you ever use producers instead of processors? > > Take a look at the SQLProcessor code. It doesn't suck too badly and it's > fairly coherent. I've also got a MapProducer that uses a site map file to > determine which XML to read initially instead of using the standard > FileProducer mapping if you really want a Producer code example to play > with. Thanks. I'm sure there will be more questions to come... i'll do work in return, though, i promise ;-) -Brett > > - donald > > From bmclaugh@algx.net Mon Dec 6 22:02:11 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 3676 invoked from network); 6 Dec 1999 22:02:11 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 22:02:11 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 16:02:10 -0600 Message-ID: <024a01bf4035$7b3f65e0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: References: Subject: Re: Tomcat/Cocoon Date: Mon, 6 Dec 1999 16:01:43 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > On Mon, 6 Dec 1999, Brett McLaughlin wrote: > > > I am trying to get and document the process of getting Cocoon working with > > Jakarta. Has anyone done this? > > > > Also, does Cocoon respond differently to not having an init. args of > > properties= vs. not _finding_ the file specified? This would help me a lot > > to know for debugging. Thanks, > > Yes, it does. The former makes an error page come up that says you didn't > supply an initialzation argument. The latter sends a message saying the > publishing engine could not be initialized (though there are lots of > things that can make that message happen). > > Btw, how far along is Tomcat? Just far enough to be frustrating... ;-) I am trying to get Cocoon up on it, but am having some significant problems with the way Tomcat handles init args and so forth... still working on it. There is also (surprise) hardly any documentation yet, so that is not making things any easier... still working on it though, and when I get it up I'll post instructions for the docs. -Brett > > - donald > > From balld@phoenix.webslingerZ.com Mon Dec 6 22:08:13 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 4038 invoked from network); 6 Dec 1999 22:08:13 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 6 Dec 1999 22:08:13 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id RAA14340 for ; Mon, 6 Dec 1999 17:06:49 -0500 Date: Mon, 6 Dec 1999 17:06:49 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Producers In-Reply-To: <024401bf4035$418e9190$8c0f0a0a@allegiancetelecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > > I find Processors much more useful. A processor creates an XML document, > > currently in the form of a DOM object, in response to an HTTP request > > _and_ an XML document. That is to say, it takes in an XML document, and > > returns an XML document (possibly the same one that came in with some > > modifications). Only _one_ producer can act on a request but multiple > > processors can act. Also, producers in general must be configured through > > HTTP parameters, while processors can use the HTTP parameters _and_ > > the input XML document for configuration purposes. > > So why would you ever use producers instead of processors? Because you have to have _some_ method of creating an XML document initially, right? FileProducer works for most instances, but some people want their initial XML file to come from a remote server (URLProducer), some people want their initial XML file to come from a SQL query (DatabaseProducer, though I still think this is better handled by SQLProcessor ;)), some people want to have a more configurable mapping of request->file than is offered by FileProducer (MapProducer), etc. Gee... a more configurable mapping... that reminds me of the SiteMap that we've been discussing. Stefano, are we ever going to get a critique of my naive suggestion? > > Take a look at the SQLProcessor code. It doesn't suck too badly and it's > > fairly coherent. I've also got a MapProducer that uses a site map file to > > determine which XML to read initially instead of using the standard > > FileProducer mapping if you really want a Producer code example to play > > with. > > Thanks. I'm sure there will be more questions to come... i'll do work in > return, though, i promise ;-) Woohoo! Which parts of Turbine have you been working with? I might like to flip my automagic SQL database editor code past you. - donald From bmclaugh@algx.net Mon Dec 6 22:15:22 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 4339 invoked from network); 6 Dec 1999 22:15:22 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 22:15:22 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 16:15:21 -0600 Message-ID: <025c01bf4037$528d3cb0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: References: Subject: Re: Producers Date: Mon, 6 Dec 1999 16:14:54 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > > > So why would you ever use producers instead of processors? > > Because you have to have _some_ method of creating an XML document > initially, right? FileProducer works for most instances, but some people > want their initial XML file to come from a remote server (URLProducer), > some people want their initial XML file to come from a SQL query > (DatabaseProducer, though I still think this is better handled by > SQLProcessor ;)), some people want to have a more configurable mapping of > request->file than is offered by FileProducer (MapProducer), etc. OK, so that makes sense. So I can create a producer, and that would do all my logic, act as my controller for business stuff. Then at the end I have some XML document that I have created, and I want to have it transformed, etc. So I want to return that from getStream(), and then it goes....? here is where I get confused. How can I make that then undergo XSLT? or anything else for that matter? > > Gee... a more configurable mapping... that reminds me of the SiteMap that > we've been discussing. Stefano, are we ever going to get a critique of my > naive suggestion? > > > > Take a look at the SQLProcessor code. It doesn't suck too badly and it's > > > fairly coherent. I've also got a MapProducer that uses a site map file to > > > determine which XML to read initially instead of using the standard > > > FileProducer mapping if you really want a Producer code example to play > > > with. > > > > Thanks. I'm sure there will be more questions to come... i'll do work in > > return, though, i promise ;-) > > Woohoo! Which parts of Turbine have you been working with? I might like to > flip my automagic SQL database editor code past you. Jon and I are the evil ones who pushed it on ApacheLand... ;-) No, I work mostly on the lower level infrastructure. In fact, I am doing some work now on remaking the base Turbine servlet into a Producer (still weeks off, though... busy busy at work), and that would allow Turbine screens to return XML content. That is what I see needs to happen to bring Turbine into the next generation of distributed data-centric apps. Sure, send whatever code you got... I also work a lot on EJBoss, the EJB server, so database stuff is of particular interest to me. We are working on some OR mapping over there... -Brett > > - donald > > From balld@phoenix.webslingerZ.com Mon Dec 6 22:25:52 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 4879 invoked from network); 6 Dec 1999 22:25:52 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 6 Dec 1999 22:25:52 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id RAA14582 for ; Mon, 6 Dec 1999 17:24:25 -0500 Date: Mon, 6 Dec 1999 17:24:24 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Producers In-Reply-To: <025c01bf4037$528d3cb0$8c0f0a0a@allegiancetelecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999, Brett McLaughlin wrote: > > > > > > So why would you ever use producers instead of processors? > > > > Because you have to have _some_ method of creating an XML document > > initially, right? FileProducer works for most instances, but some people > > want their initial XML file to come from a remote server (URLProducer), > > some people want their initial XML file to come from a SQL query > > (DatabaseProducer, though I still think this is better handled by > > SQLProcessor ;)), some people want to have a more configurable mapping of > > request->file than is offered by FileProducer (MapProducer), etc. > > OK, so that makes sense. So I can create a producer, and that would do all > my logic, act as my controller for business stuff. Then at the end I have > some XML document that I have created, and I want to have it transformed, > etc. So I want to return that from getStream(), and then it goes....? here > is where I get confused. How can I make that then undergo XSLT? or > anything else for that matter? After the XML document is created by the Producer, it's passed to cocoon's reactor. The reactor looks through the document for PIs and if it finds one, it invoked the processor indicated by the type attribute. After processing, it repeats the cycle until no more PI's are found. This reactor pattern is likely to change with the advent of the sitemap, but despite one naive suggestion, no work has been forthcoming on this (nudge, nudge). - donald From bmclaugh@algx.net Mon Dec 6 22:26:47 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 5209 invoked from network); 6 Dec 1999 22:26:47 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 6 Dec 1999 22:26:47 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 16:26:46 -0600 Message-ID: <026c01bf4038$eb176b30$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: References: Subject: Re: Producers Date: Mon, 6 Dec 1999 16:26:19 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Aahhhh ... I get it... One more question for now... where is the virtual "/" when referring to an XSL stylesheet from a producer/processor/whatever? I want to reference it, but relative to my root directory it doesn't seem to like. -Brett From ricardo@apache.org Mon Dec 6 22:48:48 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 5976 invoked from network); 6 Dec 1999 22:48:48 -0000 Received: from adsl-63-194-193-146.dsl.snfc21.pacbell.net (HELO ricardo.plenix.com) (root@63.194.193.146) by 63.211.145.10 with SMTP; 6 Dec 1999 22:48:48 -0000 Received: from rrocha (rrocha.plenix.com [63.194.193.148]) by ricardo.plenix.com (8.9.3/8.8.7) with SMTP id PAA16341 for ; Mon, 6 Dec 1999 15:57:08 -0800 From: "Ricardo Rocha" To: Subject: RE: FESI.jslib.* imports Date: Mon, 6 Dec 1999 14:45:16 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > In building Cocoon, it gripes about this package. Where can I > get the dist > for this? (FESI.jslib.*) http://home.worldcom.ch/jmlugrin/fesi/copyright.html From stefano@apache.org Mon Dec 6 23:07:33 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 6539 invoked from network); 6 Dec 1999 23:07:33 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 6 Dec 1999 23:07:33 -0000 Received: from apache.org (pv22-pri.systemy.it [194.21.255.22]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id AAA22768 for ; Tue, 7 Dec 1999 00:02:39 +0100 Message-ID: <384B98F6.784CF062@apache.org> Date: Mon, 06 Dec 1999 12:07:34 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Type in Documentation.. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gerard van Enk wrote: > > > The jar file that I got for Cocoon is "Cocoon.jar". However, in the > > documentation for installation there is a line that says: > > > > repositories=...,[path-to-cocoon]/bin/cocoon.jar > > > > Is this a typo or did I get a different version? > > You've gotta 'unjar' the Cocoon.jar to get cocoon.jar. No. You gotta 'unjar' Cocoon-1.5.jar to get Cocoon.jar. The above is a typo. Thanks for catching it up. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:47 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8267 invoked from network); 7 Dec 1999 00:15:47 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:47 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24923 for ; Tue, 7 Dec 1999 01:15:43 +0100 Message-ID: <384C4972.FC8710E5@apache.org> Date: Tue, 07 Dec 1999 00:40:34 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Typo in Documentation.. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gerard van Enk wrote: > > > I 'unjar' the Cocoon file.. and got the bin directory, however, it still > > shows a Cocoon.jar file rather than cocoon.jar. If I 'unjar' that file > > then there is not a bin. Cocoon works in my server if I simply point to > > Cocoon.jar. > > > > You're right.....it's a typo......a litte one, but it's still a typo. > > Maybe there's someone who can fix it, Stefano? A litte type, but for some > people it can be misleading ;-) Yes. It's fixed. I'll update the web site soon. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:48 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8331 invoked from network); 7 Dec 1999 00:15:48 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:48 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24928 for ; Tue, 7 Dec 1999 01:15:45 +0100 Message-ID: <384C4A69.F6988C2C@apache.org> Date: Tue, 07 Dec 1999 00:44:41 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: FESI.jslib.* imports References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > > In building Cocoon, it gripes about this package. Where can I get the dist > for this? (FESI.jslib.*) http://home.worldcom.ch/jmlugrin/fesi/index.html > BTW, once I'm done, I'll add this information into the build.xml and send in > a diff. That way if you want to update the build file you can. I'm working to make a better build file, but I'm not sure _how_ to allow Cocoon to be built without throwing errors if the required packages are not in the classpath. Well, I do have a solution, but it requires reflection which is not the cleanest/fastest thing to do... What do you think? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:52 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8784 invoked from network); 7 Dec 1999 00:15:52 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:52 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24932 for ; Tue, 7 Dec 1999 01:15:47 +0100 Message-ID: <384C4B12.9C713E8A@apache.org> Date: Tue, 07 Dec 1999 00:47:30 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Tomcat/Cocoon References: <019b01bf401f$5c158020$8c0f0a0a@allegiancetelecom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > > I am trying to get and document the process of getting Cocoon working with > Jakarta. Has anyone done this? No, I was going to do that after 1.6 is done, but, please, go ahead. It would be a great help for me. > Also, does Cocoon respond differently to not having an init. args of > properties= vs. not _finding_ the file specified? Yes, it does. Take a look at Cocoon.java for the error messages if you don't understand what's going on (the messages are turned for users, not developers). > This would help me a lot to know for debugging. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:53 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8799 invoked from network); 7 Dec 1999 00:15:53 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:53 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24940 for ; Tue, 7 Dec 1999 01:15:50 +0100 Message-ID: <384C4DA3.406BF55D@apache.org> Date: Tue, 07 Dec 1999 00:58:27 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Producers References: <025c01bf4037$528d3cb0$8c0f0a0a@allegiancetelecom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > Jon and I are the evil ones who pushed it on ApacheLand... ;-) No, I work > mostly on the lower level infrastructure. In fact, I am doing some work now > on remaking the base Turbine servlet into a Producer (still weeks off, > though... busy busy at work), and that would allow Turbine screens to return > XML content. That is what I see needs to happen to bring Turbine into the > next generation of distributed data-centric apps. > > Sure, send whatever code you got... I also work a lot on EJBoss, the EJB > server, so database stuff is of particular interest to me. We are working > on some OR mapping over there... Close integration between Turbine and EJB stuff is a must once we get the XSP stuff up and running (which will happen, as promised, for Xmas). So, please, keep us informed with any problems you get on an architectural level. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8969 invoked from network); 7 Dec 1999 00:15:55 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:55 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24944 for ; Tue, 7 Dec 1999 01:15:51 +0100 Message-ID: <384C4E10.CBAC9E62@apache.org> Date: Tue, 07 Dec 1999 01:00:16 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Producers References: <026c01bf4038$eb176b30$8c0f0a0a@allegiancetelecom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > > Aahhhh ... I get it... > > One more question for now... where is the virtual "/" when referring to an > XSL stylesheet from a producer/processor/whatever? I want to reference it, > but relative to my root directory it doesn't seem to like. That is a problem I'm not sure how to fix. Every servlet engine does its own stuff and I don't know how to create a portable behavior. Any suggestion? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:15:55 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 8968 invoked from network); 7 Dec 1999 00:15:55 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:15:55 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA24936 for ; Tue, 7 Dec 1999 01:15:48 +0100 Message-ID: <384C4D0B.A9455EFB@apache.org> Date: Tue, 07 Dec 1999 00:55:55 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Producers References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Donald Ball wrote: > > Gee... a more configurable mapping... that reminds me of the SiteMap that > we've been discussing. Stefano, are we ever going to get a critique of my > naive suggestion? We all are. After I'm done with this all this shit. You know, I had to move all one CVS stuff over, XML-ize all the docs, write 5 complete DTDs, validate all the stuff, rewrote significant parts of the reactor, rewrite all the formatters to work with Xalan new serialization classes, rewrite the XSL processor to work with Xalan, rewrite the parser support, make a college exam, calm down my girlfriend (which hates Apache at this point), keep up with 250+ messages a day and... Uff... let me release this damn 1.6 this week, then we can talk about it. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@locus.apache.org Tue Dec 7 00:19:22 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 10214 invoked from network); 7 Dec 1999 00:19:22 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 00:19:22 -0000 Received: (qmail 25705 invoked by uid 2016); 7 Dec 1999 00:17:56 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 25510 invoked from network); 7 Dec 1999 00:17:44 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 00:17:43 -0000 Received: (qmail 10173 invoked by uid 1010); 7 Dec 1999 00:17:42 -0000 Date: 7 Dec 1999 00:17:42 -0000 Message-ID: <19991207001742.10172.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs installing.xml stefano 99/12/06 16:17:42 Modified: docs installing.xml Log: fixed typo Revision Changes Path 1.5 +31 -26 xml-cocoon/docs/installing.xml Index: installing.xml =================================================================== RCS file: /home/cvs/xml-cocoon/docs/installing.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- installing.xml 1999/12/03 23:46:52 1.4 +++ installing.xml 1999/12/07 00:17:42 1.5 @@ -84,9 +84,9 @@

    - First thing to do is to make sure that the components needed by Cocoon (and - explained in the above paragraphs) are visible. This implies adding this to - the servlet engine classpath by adding a line like this in your + First thing to do is to make sure that Cocoon and all the needed components + (as explained in the above paragraphs) are visible. This implies adding + this to the servlet engine classpath by adding a line like this in your jserv.properties file for each jar package you have to install after substituting [path-to-jar] with the path to the jar file and [jar-name] with the package file name. @@ -95,36 +95,25 @@ wrapper.classpath=[path-to-jar]/[jar-name].jar

    - Note: do not add the cocoon.jar package here since - this might corrupt it's normal operation. Here, you should add all the - required packages but Cocoon itself. + Note: from this version of Cocoon the Cocoon.jar + package should be added to the servlet engine classpath as any other + required package (as shown above).

    - At this point, you must tell the servlet engine to locate Cocoon (since - you didn't do this in the step right above!). To do this, you should choose - the servlet zone where you want Cocoon to reside. If you don't know what - a servlet zone is, you probably want to open the zone.properties - file that represents the default servlet zone. Now add the - cocoon.jar package to your servlet zone by making sure - a line like this is present in your zone property file. + At this point, you must set the Cocoon configurations. To do this, you + must choose the servlet zone(s) where you want Cocoon to reside (Note that + Cocoon can safely reside on different servlet zones with different + configuration files). If you don't know what a servlet zone is, you + probably want to open the zone.properties file that represents + the default servlet zone.

    - repositories=...,[path-to-cocoon]/bin/cocoon.jar -

    - where ... stands for any other servlet repository the servlet zone already - contains (or might be empty if no other repository is used by this zone) and - [path-to-cocoon] is substitued by the actual path to the - cocoon.jar file. -

    - -

    - Now the servlet engine knows where to locate the Cocoon servlet - but Cocoon must need to know its configurations to be able to start. To configure Cocoon, you must pass the cocoon.properties file location to the servlet by adding the following to the - zone.properties file: + zone.properties file (or each servlet zone file you want + Cocoon to reside):

    servlet.org.apache.cocoon.Cocoon.initArgs=properties=[path-to-cocoon]/bin/cocoon.properties @@ -151,11 +140,27 @@ and /servlet/ is the mount point of your servlet zone (and the above is the standard name for servlet mapping for Apache JServ).

    - +

    Everything should be configured fine. Restart both Apache and Apache JServ and try accessing the samples contained in the distribution to see Cocoon in action. +

    + +

    + Note: you may want Cocoon to handle two different + extentions with different + configurations. To do this, you must set the two different configurations + in two different servlet zones, then associate the extentions like this: +

    + +ApJServAction .xml1 /zone1/org.apache.cocoon.Cocoon +ApJServAction .xml2 /zone2/org.apache.cocoon.Cocoon + +

    + where .xml1 is handled by the Cocoon residing on zone1 + and .xml2 is handled by the Cocoon residing on zone2 + which have different configurations and thus different behavior.

    From stefano@locus.apache.org Tue Dec 7 00:19:49 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 10481 invoked from network); 7 Dec 1999 00:19:49 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 00:19:49 -0000 Received: (qmail 28281 invoked by uid 2016); 7 Dec 1999 00:19:11 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 28262 invoked from network); 7 Dec 1999 00:19:10 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 00:19:10 -0000 Received: (qmail 10211 invoked by uid 1010); 7 Dec 1999 00:19:07 -0000 Date: 7 Dec 1999 00:19:07 -0000 Message-ID: <19991207001907.10210.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/docs docs.book.xml site-book.xml book.xml stefano 99/12/06 16:19:07 Added: docs docs.book.xml site-book.xml Removed: docs book.xml Log: added two different books, one for the site, one for the distributed documentation Revision Changes Path 1.1 xml-cocoon/docs/docs.book.xml Index: docs.book.xml =================================================================== 1.1 xml-cocoon/docs/site-book.xml Index: site-book.xml =================================================================== From stefano@locus.apache.org Tue Dec 7 00:20:18 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 10761 invoked from network); 7 Dec 1999 00:20:18 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 00:20:18 -0000 Received: (qmail 422 invoked by uid 2016); 7 Dec 1999 00:20:18 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 360 invoked from network); 7 Dec 1999 00:20:16 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 00:20:16 -0000 Received: (qmail 10757 invoked by uid 1010); 7 Dec 1999 00:20:14 -0000 Date: 7 Dec 1999 00:20:14 -0000 Message-ID: <19991207002014.10756.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/producer AbstractXSPProducer.java stefano 99/12/06 16:20:13 Removed: src/org/apache/cocoon/producer AbstractXSPProducer.java Log: removed this, XSP code is coming up after 1.6 is done From bmclaugh@algx.net Tue Dec 7 00:21:53 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 11037 invoked from network); 7 Dec 1999 00:21:53 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 00:21:53 -0000 Received: from enterprise ([216.99.228.72]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 18:21:51 -0600 Message-ID: <027201bf4049$930630f0$0201010a@algx.net> From: "Brett McLaughlin" To: References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> <384C4A69.F6988C2C@apache.org> Subject: Re: FESI.jslib.* imports Date: Mon, 6 Dec 1999 18:25:32 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > Brett McLaughlin wrote: > > > > In building Cocoon, it gripes about this package. Where can I get the dist > > for this? (FESI.jslib.*) > > http://home.worldcom.ch/jmlugrin/fesi/index.html > > > BTW, once I'm done, I'll add this information into the build.xml and send in > > a diff. That way if you want to update the build file you can. > > I'm working to make a better build file, but I'm not sure _how_ to allow > Cocoon to be built without throwing errors if the required packages are > not in the classpath. > > Well, I do have a solution, but it requires reflection which is not the > cleanest/fastest thing to do... <0.02> I think you give users two options. The first is the typical build. Take a look at how we build Turbine/EJBoss (Jon wrote the one for Turbine, me for EJBoss). Both specifically set environment vars to the location of each required jar. This requires you to be a real idiot to miss getting all the required jar files. Then that long env. string is passed in to -cp of java as the classpath. However, that is more developer-centric. Cocoon is an interesting problem because it is not an "all-good-developer" place to work in. Lots of content authors and such are here. So I might add in the reflection classes as a "production" or some such option to give Ant. This is useful for distributing as part of a larger set of components; in those cases people either want everything to work or it all to fail, not to work some, change some files, work some more, etc. You also can look at actually distributing more jar files with Cocoon. In both EJBoss and Turbine, we distribute ant.jar, javac.jar, and projectx_tr2.jar, which everyone seems to really like, despite the initial and infrequent pain to download through CVS. Let me know your thoughts, I think Ant has a lot of promise, but needs work (we seem to be in agreement on that). -Brett From bmclaugh@algx.net Tue Dec 7 00:23:39 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 11320 invoked from network); 7 Dec 1999 00:23:39 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 00:23:39 -0000 Received: from enterprise ([216.99.228.72]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 18:23:37 -0600 Message-ID: <027e01bf4049$d265cb20$0201010a@algx.net> From: "Brett McLaughlin" To: References: <026c01bf4038$eb176b30$8c0f0a0a@allegiancetelecom.com> <384C4E10.CBAC9E62@apache.org> Subject: Re: Producers Date: Mon, 6 Dec 1999 18:27:18 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 ----- Original Message ----- From: Stefano Mazzocchi To: Sent: Monday, December 06, 1999 6:00 PM Subject: Re: Producers > Brett McLaughlin wrote: > > > > Aahhhh ... I get it... > > > > One more question for now... where is the virtual "/" when referring to an > > XSL stylesheet from a producer/processor/whatever? I want to reference it, > > but relative to my root directory it doesn't seem to like. > > That is a problem I'm not sure how to fix. Every servlet engine does its > own stuff and I don't know how to create a portable behavior. You should be able to, at a worst case, build in a mechanism to get the root of the document requested (this is already there for FileProducer) and then paths could be relative to that - or some other sort of getRealPath() type mechanism. I certainly don't want to get an error (or give one to a client) and show them that a file at d:\dev\xsl\sheet.xsl is missing, it gives too much information about my system away. Let's talk more on this, I can help implement it. -Brett From stefano@locus.apache.org Tue Dec 7 00:25:13 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 11597 invoked from network); 7 Dec 1999 00:25:13 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 00:25:13 -0000 Received: (qmail 7874 invoked by uid 2016); 7 Dec 1999 00:25:01 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 7838 invoked from network); 7 Dec 1999 00:25:01 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 00:25:01 -0000 Received: (qmail 11591 invoked by uid 1010); 7 Dec 1999 00:24:58 -0000 Date: 7 Dec 1999 00:24:57 -0000 Message-ID: <19991207002457.11590.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/stylesheets document.css document.html.xsl page.xsl stefano 99/12/06 16:24:57 Removed: stylesheets document.css document.html.xsl page.xsl Log: not needed anymore (for now) From bmclaugh@algx.net Tue Dec 7 00:27:27 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 12191 invoked from network); 7 Dec 1999 00:27:27 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 00:27:27 -0000 Received: from enterprise ([216.99.228.72]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 18:27:25 -0600 Message-ID: <028401bf404a$5a052f30$0201010a@algx.net> From: "Brett McLaughlin" To: References: <025c01bf4037$528d3cb0$8c0f0a0a@allegiancetelecom.com> <384C4DA3.406BF55D@apache.org> Subject: Re: Producers Date: Mon, 6 Dec 1999 18:31:06 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 ----- Original Message ----- From: Stefano Mazzocchi To: Sent: Monday, December 06, 1999 5:58 PM Subject: Re: Producers > Brett McLaughlin wrote: > > > Jon and I are the evil ones who pushed it on ApacheLand... ;-) No, I work > > mostly on the lower level infrastructure. In fact, I am doing some work now > > on remaking the base Turbine servlet into a Producer (still weeks off, > > though... busy busy at work), and that would allow Turbine screens to return > > XML content. That is what I see needs to happen to bring Turbine into the > > next generation of distributed data-centric apps. > > > > Sure, send whatever code you got... I also work a lot on EJBoss, the EJB > > server, so database stuff is of particular interest to me. We are working > > on some OR mapping over there... > > Close integration between Turbine and EJB stuff is a must once we get > the XSP stuff up and running (which will happen, as promised, for Xmas). Looking forward to it... > > So, please, keep us informed with any problems you get on an > architectural level. Well, they are going to be big ones. I am going to have to build TurbineX (as I am calling it) to replace the current Turbine servlet (or at least an another option), which will be a producer. In my mind, we should have the generic screen contract (That is there), but then have an XMLScreen contract that handles some things like letting you easily add/set/remove PIs. This would make the process more uncoupled, instead of having to hardcode in those things everytime a screen is created. But this is all in line with making Turbine more a component model than it currently is; I also have to make Cocoon work within a complete infrastructure for my O'Reilly book, anyway, so this is coming fast and soon... I have an XML book to get done first though so it may hit about the time XSP is ready, and then we can integrate that as well. On the EJB side, I'm already thinking about using portions of DCP and XSP to allow a more data-centric application framework; j2ee is engine-centric, and I don't think that is an appropriate model for today's business systems; I thought I would play with you visionary guys for a while :-) -Brett > > -- > Stefano Mazzocchi One must still have chaos in oneself to be > able to give birth to a dancing star. > Friedrich Nietzsche > > > From stefano@locus.apache.org Tue Dec 7 00:29:30 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 12459 invoked from network); 7 Dec 1999 00:29:30 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 00:29:30 -0000 Received: (qmail 11697 invoked by uid 2016); 7 Dec 1999 00:27:06 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 11604 invoked from network); 7 Dec 1999 00:27:01 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 00:27:01 -0000 Received: (qmail 12179 invoked by uid 1010); 7 Dec 1999 00:26:58 -0000 Date: 7 Dec 1999 00:26:58 -0000 Message-ID: <19991207002658.12178.qmail@locus.apache.org> From: stefano@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon build.xml stefano 99/12/06 16:26:58 Modified: . build.xml Log: writing a better build script (still in progress) Revision Changes Path 1.4 +45 -25 xml-cocoon/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- build.xml 1999/12/03 23:46:16 1.3 +++ build.xml 1999/12/07 00:26:58 1.4 @@ -34,7 +34,7 @@ Copyright: Copyright (c) 1999 The Apache Software Foundation. - $Id: build.xml,v 1.3 1999/12/03 23:46:16 stefano Exp $ + $Id: build.xml,v 1.4 1999/12/07 00:26:58 stefano Exp $ ==================================================================== --> @@ -52,12 +52,9 @@ - - - + + @@ -68,31 +65,42 @@ - - + + + + + + + + + + + - - - + - - - + + - + + + + + + - - + - + + + + + + + + + + + + + + + + - - - - - + @@ -119,7 +138,7 @@ - + @@ -135,6 +154,7 @@ + From stefano@apache.org Tue Dec 7 00:29:53 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 12716 invoked from network); 7 Dec 1999 00:29:53 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:29:53 -0000 Received: from apache.org (pv10-pri.systemy.it [194.21.255.10]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA25235 for ; Tue, 7 Dec 1999 01:29:42 +0100 Message-ID: <384C55CC.D79C1D8@apache.org> Date: Tue, 07 Dec 1999 01:33:16 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Error Handling References: <199912061059.ME4c@sbb.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CHRISTOPH.OEHLER@SBB.CH wrote: > > --- Erhalten von I0.U150033 0512 20 5221 06.12.99 11.59 > > What about implementing an Error-handler-interface? > > It would have only one method: handle (Document doc, Dictionary > params, Writer write, Exception e). > > In the implementation of the errorhandler one would be able to > generate an output on the response stream. > > So the user would be able to select the desired handler with an PI. > > What do you think? I came to the same conclusion about pluggability. I'll try to implement it and see how that goes. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From stefano@apache.org Tue Dec 7 00:58:17 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 13264 invoked from network); 7 Dec 1999 00:58:17 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 00:58:17 -0000 Received: from apache.org (pv41-pri.systemy.it [194.21.255.41]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id BAA25605 for ; Tue, 7 Dec 1999 01:58:12 +0100 Message-ID: <384C5BDC.DFB9DECC@apache.org> Date: Tue, 07 Dec 1999 01:59:08 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: FESI.jslib.* imports References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> <384C4A69.F6988C2C@apache.org> <027201bf4049$930630f0$0201010a@algx.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > > > Brett McLaughlin wrote: > > > > > > In building Cocoon, it gripes about this package. Where can I get the > dist > > > for this? (FESI.jslib.*) > > > > http://home.worldcom.ch/jmlugrin/fesi/index.html > > > > > BTW, once I'm done, I'll add this information into the build.xml and > send in > > > a diff. That way if you want to update the build file you can. > > > > I'm working to make a better build file, but I'm not sure _how_ to allow > > Cocoon to be built without throwing errors if the required packages are > > not in the classpath. > > > > Well, I do have a solution, but it requires reflection which is not the > > cleanest/fastest thing to do... > > <0.02> > I think you give users two options. The first is the typical build. Take a > look at how we build Turbine/EJBoss (Jon wrote the one for Turbine, me for > EJBoss). Both specifically set environment vars to the location of each > required jar. This requires you to be a real idiot to miss getting all the > required jar files. Then that long env. string is passed in to -cp of java > as the classpath. I'll take a look at them. > However, that is more developer-centric. Yep > Cocoon is an interesting problem > because it is not an "all-good-developer" place to work in. Lots of content > authors and such are here. So I might add in the reflection classes as a > "production" or some such option to give Ant. No, you didn't get it: the reflection code must be inside Cocoon, not Ant. Ant already uses reflection to avoid all the components to be present at build time. > This is useful for > distributing as part of a larger set of components; in those cases people > either want everything to work or it all to fail, not to work some, change > some files, work some more, etc. People should be able to modify stuff and recompile. That's the goal. > You also can look at actually distributing > more jar files with Cocoon. No, I'm done with that. People will manage their components by themselves. > In both EJBoss and Turbine, we distribute > ant.jar, javac.jar, and projectx_tr2.jar, which everyone seems to really > like, despite the initial and infrequent pain to download through CVS. I like good docs instead of fat distributions. > Let me know your thoughts, I think Ant has a lot of promise, but needs work > (we seem to be in agreement on that). Ant rocks but it needs some enhancing (many todo items are mine). I would like to be able to have a task that doesn't fail is simple dependency linking is missing, but this unfortunately requires a new compiler, not a simple Ant Task. Or, something like this or which is even better since it uses reflection directly and doesn't care about different jar naming. I think the current design limitation of having just single empty elements is simple too restrictive. What do you think? -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From bmclaugh@algx.net Tue Dec 7 01:06:52 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 13599 invoked from network); 7 Dec 1999 01:06:52 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 01:06:52 -0000 Received: from enterprise ([216.99.228.72]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Mon, 6 Dec 1999 19:06:50 -0600 Message-ID: <02a801bf404f$dbd7f2e0$0201010a@algx.net> From: "Brett McLaughlin" To: References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> <384C4A69.F6988C2C@apache.org> <027201bf4049$930630f0$0201010a@algx.net> <384C5BDC.DFB9DECC@apache.org> Subject: Re: FESI.jslib.* imports Date: Mon, 6 Dec 1999 19:10:31 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > > > <0.02> > > I think you give users two options. The first is the typical build. Take a > > look at how we build Turbine/EJBoss (Jon wrote the one for Turbine, me for > > EJBoss). Both specifically set environment vars to the location of each > > required jar. This requires you to be a real idiot to miss getting all the > > required jar files. Then that long env. string is passed in to -cp of java > > as the classpath. > > I'll take a look at them. > > > However, that is more developer-centric. > > Yep > > > Cocoon is an interesting problem > > because it is not an "all-good-developer" place to work in. Lots of content > > authors and such are here. So I might add in the reflection classes as a > > "production" or some such option to give Ant. > > No, you didn't get it: the reflection code must be inside Cocoon, not > Ant. Ant already uses reflection to avoid all the components to be > present at build time. Ah, I see. This is not so good, because a minority gets a benefit while a majority pays the price. > > > This is useful for > > distributing as part of a larger set of components; in those cases people > > either want everything to work or it all to fail, not to work some, change > > some files, work some more, etc. > > People should be able to modify stuff and recompile. That's the goal. No, I mean if I assemble a complete application, say including Cocoon, Tomcat, EJBoss, some JNDI classes, and my custom classes, but need to distribute on different platforms, I may need to run Ant type tasks as part of an overall install. In this case, Ant breaking in the middle is not acceptable. However, particularly with the reflection having to be in Cocoon, I am not so sure that it isn't safe to assume anyone who would do this would need to be responsible to build an idiot-proof install suite. So strike that comment. ;-) > > > You also can look at actually distributing > > more jar files with Cocoon. > > No, I'm done with that. People will manage their components by > themselves. ;-) We see eye to eye on lots of things. > > > In both EJBoss and Turbine, we distribute > > ant.jar, javac.jar, and projectx_tr2.jar, which everyone seems to really > > like, despite the initial and infrequent pain to download through CVS. > > I like good docs instead of fat distributions. Yes, but sometimes you get out of balance. Requiring someone to get IBM XML4J is reasonable; it is on a website. Requiring someone to log into CVS and get ant.jar and javac.jar... I don't know. That is pushing it in my mind. Also, have you pulled down jakarta-* modules lately? They are freaking huge! > > > Let me know your thoughts, I think Ant has a lot of promise, but needs work > > (we seem to be in agreement on that). > > Ant rocks but it needs some enhancing (many todo items are mine). I > would like to be able to have a task that doesn't fail is simple > dependency linking is missing, but this unfortunately requires a new > compiler, not a simple Ant Task. > > Or, something like this > > > > > > or > > > > > > which is even better since it uses reflection directly and doesn't care > about different jar naming. I think this could actually be done with XML pre-processing. It is not unfeasible to think that an XML aware application could make some decisions about files and then use this knowledge with the XML file to generate a new XML file, and feed that into Ant. Sort of like using a bean to lead a bean, you know? I might be interesting to see how thin a piece you could build to do this pre-processing. It would only have to read a file name, check for the file's existence, and either print the contents of the if in the resulting XML file, or skip it. Hmmm... > > I think the current design limitation of having just single empty > elements is simple too restrictive. Yup, what's the point of XML when it's not _extensible_ ? -Brett From balld@phoenix.webslingerZ.com Tue Dec 7 07:25:03 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 18120 invoked from network); 7 Dec 1999 07:25:03 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 7 Dec 1999 07:25:03 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA02059; Tue, 7 Dec 1999 02:26:54 -0500 Date: Tue, 7 Dec 1999 02:26:54 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org, fgonzale@badlands.nodak.edu Subject: Re: Typo in Documentation.. In-Reply-To: <384BE3A2.4C65E4D7@badlands.nodak.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999, Felix Guerrero wrote: > I 'unjar' the Cocoon file.. and got the bin directory, however, it still > shows a Cocoon.jar file rather than cocoon.jar. If I 'unjar' that file > then there is not a bin. Cocoon works in my server if I simply point to > Cocoon.jar. The first JAR file, the one that you download that should probably be a zip file to avoid confusion, contains the cocoon distribution, including the cocoon classes in JAR format (Cocoon.jar). That (Cocoon.jar) is the one that belongs in your repository or classpath. It is not necessary to extract it. - donald From balld@phoenix.webslingerZ.com Tue Dec 7 07:29:25 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 18528 invoked from network); 7 Dec 1999 07:29:25 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 7 Dec 1999 07:29:25 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA02073 for ; Tue, 7 Dec 1999 02:31:20 -0500 Date: Tue, 7 Dec 1999 02:31:20 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Error Handling In-Reply-To: <199912061059.ME4c@sbb.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 6 Dec 1999 CHRISTOPH.OEHLER@SBB.CH wrote: > --- Erhalten von I0.U150033 0512 20 5221 06.12.99 11.59 > > What about implementing an Error-handler-interface? > > It would have only one method: handle (Document doc, Dictionary > params, Writer write, Exception e). > > In the implementation of the errorhandler one would be able to > generate an output on the response stream. > > So the user would be able to select the desired handler with an PI. > > What do you think? That would certainly mesh well with the existing paradigm for doing this kind of thing. +1 from me. - donald From balld@phoenix.webslingerZ.com Tue Dec 7 07:34:01 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 18826 invoked from network); 7 Dec 1999 07:34:01 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 7 Dec 1999 07:34:01 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA02091 for ; Tue, 7 Dec 1999 02:35:57 -0500 Date: Tue, 7 Dec 1999 02:35:57 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: No output from SQLProcessor In-Reply-To: <384BCE4E.F369D2E5@wdr.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 6 Dec 1999, Alexander Leschinsky wrote: > Hi everybody, >=20 > I am new to using cocoon, so perhaps this is a silly question. > I managed to cocoon and use it with Apache 1.3.9 on Solaris 2.6, Jserv > 1.1b3. I experimented with some xml/xsl-files and all worked fine. >=20 > My problem is that I don=B4t get an sql-connection running. When I change > the parameters in the example database.xml to our mysql-connection > (which is working fine in a bunch of servlets) I don=B4t get any > database-generated output, just the framework the xsl-file produces > around the (non-present) data. Sure, it's quite likely that you're failing to connect to the database for some reason or your configuration data is flawed in some fashion. Suggestions: 1. Make sure the mysql JDBC drivers are available to cocoon 2. Make sure you can connect to the mysql user using the dburl, username, and password listed in the file from the servlet engine's machine 3. Make sure the and attribute values match up. 4. Look in your servlet engine's error logs for any interesting info, e.g. line numbers in the source code that you can line up 5. Mail in your XML file so's I can look at it 6. Check out the latest SQLProcessor from CVS. 1.5 has some known bugs that are patched in CVS. - donald From balld@phoenix.webslingerZ.com Tue Dec 7 07:39:06 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 19198 invoked from network); 7 Dec 1999 07:39:06 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 7 Dec 1999 07:39:06 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA02105 for ; Tue, 7 Dec 1999 02:41:02 -0500 Date: Tue, 7 Dec 1999 02:41:02 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Producers In-Reply-To: <384C4D0B.A9455EFB@apache.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 7 Dec 1999, Stefano Mazzocchi wrote: > Donald Ball wrote: > > > > Gee... a more configurable mapping... that reminds me of the SiteMap that > > we've been discussing. Stefano, are we ever going to get a critique of my > > naive suggestion? > > We all are. After I'm done with this all this shit. You know, I had to > move all one CVS stuff over, XML-ize all the docs, write 5 complete > DTDs, validate all the stuff, rewrote significant parts of the reactor, > rewrite all the formatters to work with Xalan new serialization classes, > rewrite the XSL processor to work with Xalan, rewrite the parser > support, make a college exam, calm down my girlfriend (which hates > Apache at this point), keep up with 250+ messages a day and... That's it? Geez, Stefano, sounds like you have a pretty slack schedule... :) Sorry, I wasn't meaning to ride you, you already put a significant amount of time into this project. - donald From alexander.leschinsky@wdr.de Tue Dec 7 08:23:15 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 22142 invoked from network); 7 Dec 1999 08:23:15 -0000 Received: from smtp01.wdr.de (149.219.195.61) by 63.211.145.10 with SMTP; 7 Dec 1999 08:23:15 -0000 Received: (qmail 17753 invoked from network); 7 Dec 1999 09:22:47 +0100 Received: from pop3.wdr.de (HELO mail01.wdr.de) (149.219.195.66) by smtp01.wdr.de with SMTP; 7 Dec 1999 09:22:47 +0100 Received: from wdr.de (liux0001.wdr.de [149.219.131.22]) by mail01.wdr.de (Netscape Mail Server v1.1) with ESMTP id AAA13436 for ; Tue, 7 Dec 1999 09:22:44 +0200 Sender: gff Message-ID: <384CD25F.92245F63@wdr.de> Date: Tue, 07 Dec 1999 10:24:47 +0100 From: Alexander Leschinsky Organization: GFF GmbH X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.0.35 i686) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: No output from SQLProcessor References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello again, > > My problem is that I don´t get an sql-connection running. When I change > > the parameters in the example database.xml to our mysql-connection > > (which is working fine in a bunch of servlets) I don´t get any > > database-generated output, just the framework the xsl-file produces > > around the (non-present) data. > > 1. Make sure the mysql JDBC drivers are available to cocoon I´ve included a line in my jserv.properties, which works fine for my servlets. Does cocoon need it another way? > 2. Make sure you can connect to the mysql user using the dburl, username, > and password listed in the file from the servlet engine's machine This works fine. The values are ok. > 3. Make sure the and > attribute values match up. They match. > 4. Look in your servlet engine's error logs for any interesting info, e.g. > line numbers in the source code that you can line up Even with the highest logging activity there is not a bit of information. It does not seem to be an error. Even though the sql line makes perfect sense and deliveres data in another servlet. > 5. Mail in your XML file so's I can look at it Here you are: org.gjt.mm.mysql.Driver jdbc:mysql://149.219.195.53:3306/listra> admlinde xxxx select nickname, pwd, email from user order by email > 6. Check out the latest SQLProcessor from CVS. 1.5 has some known bugs > that are patched in CVS. I´ll try to do so... From gerard.van.enk@eo.nl Tue Dec 7 08:25:51 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 22769 invoked from network); 7 Dec 1999 08:25:51 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 7 Dec 1999 08:25:51 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Tue, 7 Dec 1999 09:26:10 +0100 From: "Gerard van Enk" To: Subject: RE: Type in Documentation.. Date: Tue, 7 Dec 1999 09:21:35 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <384B98F6.784CF062@apache.org> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > Gerard van Enk wrote: > > > > > The jar file that I got for Cocoon is "Cocoon.jar". However, in the > > > documentation for installation there is a line that says: > > > > > > repositories=...,[path-to-cocoon]/bin/cocoon.jar > > > > > > Is this a typo or did I get a different version? > > > > You've gotta 'unjar' the Cocoon.jar to get cocoon.jar. > > No. You gotta 'unjar' Cocoon-1.5.jar to get Cocoon.jar. > Ok, that's what I meant, but if we're talking about little typo's, this is a bigger one, 3 characters ;-) Gerard From eschaeffer@posterconseil.com Tue Dec 7 09:18:23 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 26477 invoked from network); 7 Dec 1999 09:18:23 -0000 Received: from unknown (HELO aquarium.politel.com) (195.219.34.1) by 63.211.145.10 with SMTP; 7 Dec 1999 09:18:23 -0000 Message-ID: <421488a35f904573bcccd5b335277665384cd0df@> From: "Eric SCHAEFFER" To: Subject: Relative URLs Date: Tue, 7 Dec 1999 10:18:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hie, I downloaded the last version (CVS 1.6 dev). I just like to know if Cocoon can resolve relative URLs ? I discussed about it a few weeks ago with Stefano, and I found the idea of having a cocoon instruction for doing it very nice : href="cocoon:/style/hello.xsl" + cocoon root defined in cocoon.properties. It's simple, and can work everywhere. But I still can see who will replace this instruction with the right URL, except the XML parser (Cocoon will need a specialized XML parser ?) ... Eric. _______________________________________ Eric SCHAEFFER eschaeffer@posterconseil.com POSTER CONSEIL 118 rue de Tocqueville 75017 PARIS FRANCE Tel. : 33-140541058 Fax : 33-140541059 _______________________________________ From balld@locus.apache.org Tue Dec 7 09:21:00 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 26805 invoked from network); 7 Dec 1999 09:21:00 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 09:21:00 -0000 Received: (qmail 8746 invoked by uid 2016); 7 Dec 1999 09:21:01 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 8735 invoked from network); 7 Dec 1999 09:21:00 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 09:21:00 -0000 Received: (qmail 26802 invoked by uid 1037); 7 Dec 1999 09:20:59 -0000 Date: 7 Dec 1999 09:20:59 -0000 Message-ID: <19991207092059.26801.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/processor/sql Column.java ColumnFormatter.java SQLProcessor.java balld 99/12/07 01:20:59 Modified: src/org/apache/cocoon/processor/sql SQLProcessor.java Added: src/org/apache/cocoon/processor/sql Column.java ColumnFormatter.java Log: Added support for column-specific formatting for dates. Revision Changes Path 1.6 +8 -19 xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java Index: SQLProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SQLProcessor.java 1999/12/03 08:42:28 1.5 +++ SQLProcessor.java 1999/12/07 09:20:59 1.6 @@ -62,7 +62,7 @@ * A processor that performs SQL database queries. * * @author Donald Ball - * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:28 $ + * @version $Revision: 1.6 $ $Date: 1999/12/07 09:20:59 $ */ public class SQLProcessor extends AbstractActor implements Processor, Status { @@ -258,7 +258,7 @@ if (count == skip_rows) break; } } - + ColumnFormatter formatter = new ColumnFormatter(query_element); while (rs.next()) { if (create_row_elements) { row_element = Utils.createElement(document,namespace,row_element_name); @@ -269,6 +269,8 @@ } for (int i=0; i. For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.processor.sql; /** * A class to hold SQL column information */ class Column { protected String name; protected String type; protected Column(String name, String type) { this.name = name; this.type = type; } } 1.1 xml-cocoon/src/org/apache/cocoon/processor/sql/ColumnFormatter.java Index: ColumnFormatter.java =================================================================== package org.apache.cocoon.processor.sql; import org.w3c.dom.*; import java.sql.*; import java.text.*; import java.util.*; class ColumnFormatter { protected Properties formats_by_name = new Properties(); protected Properties formats_by_type = new Properties(); protected ColumnFormatter(Element query_element) { NodeList children = query_element.getElementsByTagName("column"); Element ary[] = new Element[children.getLength()]; for (int i=0; i Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 27165 invoked from network); 7 Dec 1999 09:24:24 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 7 Dec 1999 09:24:24 -0000 Received: (qmail 9855 invoked by uid 2016); 7 Dec 1999 09:24:25 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 9853 invoked from network); 7 Dec 1999 09:24:24 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 7 Dec 1999 09:24:24 -0000 Received: (qmail 27162 invoked by uid 1037); 7 Dec 1999 09:24:23 -0000 Date: 7 Dec 1999 09:24:23 -0000 Message-ID: <19991207092423.27161.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon changes.xml balld 99/12/07 01:24:23 Modified: . changes.xml Log: Documented and attributed changes to SQLProcessor Revision Changes Path 1.6 +5 -2 xml-cocoon/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon/changes.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- changes.xml 1999/12/03 23:46:16 1.5 +++ changes.xml 1999/12/07 09:24:23 1.6 @@ -4,7 +4,7 @@ @@ -15,6 +15,9 @@ + + Added new classes to SQLProcessor to do column-specific date formatting. + Add new producer for POST document processing, also useful for use of Cocoon as a module (see EngineWrapper). @@ -405,4 +408,4 @@ - \ No newline at end of file + From balld@phoenix.webslingerZ.com Tue Dec 7 09:30:56 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 27483 invoked from network); 7 Dec 1999 09:30:56 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 7 Dec 1999 09:30:56 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id EAA02398 for ; Tue, 7 Dec 1999 04:32:51 -0500 Date: Tue, 7 Dec 1999 04:32:51 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: No output from SQLProcessor In-Reply-To: <384CD25F.92245F63@wdr.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE > > 6. Check out the latest SQLProcessor from CVS. 1.5 has some known bugs > > that are patched in CVS. >=20 > I=B4ll try to do so... I'm afraid I'm going to have to suggest this at the moment as your XML file looks just fine. Actually, you can try turning on error reporting as described in the SQLProcessor docs, but it's likely that the problem is occuring during connection creation, and if it's a RuntimeException like NullPointerException, it's "tricking" coocon into think that processing is complete rather than bombing out with a nice error page that actually has information on it. I had proposed a solution and hadn't heard any vote on it, so one more time, which option is better: 1. Make cocoon catch a special exception, e.g. ProcessingCompleteException, that the reactor tosses when processing is normally complete, so RuntimeExceptions will filter up to the normal error trapping area. 2. Tell all processor authors to trap runtimeexceptions and wrap them in another type of exception, and modify the error trapping area to print the stack trace of both the wrapping and the wrapped exceptions. I like (1) better personally but I don't care too much one way or the other, I just want to help people who are trying to debug SQLProcessor installations. If I don't hear something within the next day or so, I'm going to move ahead with (1) for 1.6. - donald From gerard.van.enk@eo.nl Tue Dec 7 11:12:42 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 31164 invoked from network); 7 Dec 1999 11:12:42 -0000 Received: from unknown (HELO aims.eo.nl) (145.58.229.101) by 63.211.145.10 with SMTP; 7 Dec 1999 11:12:42 -0000 Received: from benjamin (145.58.229.73) by aims.eo.nl with SMTP (Apple Internet Mail Server 1.1.1); Tue, 7 Dec 1999 12:12:59 +0100 From: "Gerard van Enk" To: Subject: RE: problem with StyleBook Date: Tue, 7 Dec 1999 12:08:24 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <38489433.B67169ED@apache.org> > > > Guuu.... That's the first bug I got on SBK... I don't know, > but it seems > > > to me that the Blackdown jdk1.2.2 has some bugs in the URL parsing > > > mechanism... I just reviewed the code and there's nothing I think is > > > wrong there... > > > > Maybe I'm doing something wrong, I'm a stylebook-newbie ;-) > > I'll look into the bugreports from the blackdown jdk1.2.2. > > Nahh.. Should be some bug somewhere... I got it working, but I think it's not a nice solution. In the file "styles/apachexml/stylesheets/book2project.xsl" I changed this line: to: and it worked!!!! Maybe this helps you with isolating the problem....... Gerard b.t.w. is there a makefile for stylebook? From mclinden@informed.net Tue Dec 7 15:17:54 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 41714 invoked from network); 7 Dec 1999 15:17:54 -0000 Received: from charcot.informed.net (HELO notes.informed.net) (205.167.80.72) by 63.211.145.10 with SMTP; 7 Dec 1999 15:17:54 -0000 To: cocoon-dev@xml.apache.org Bcc: Subject: build.xml X-Mailer: Lotus Notes Release 5.0a May 4, 1999 Message-ID: From: mclinden@informed.net Date: Tue, 7 Dec 1999 09:55:51 -0500 X-MIMETrack: Serialize by Router on notes.informed.net/informed dot net(Release 5.0.2 |November 4, 1999) at 12/07/99 09:55:52 AM, Serialize complete at 12/07/99 09:55:52 AM MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" The current CVS build of xml-cocoon seems to fail due to an incomplete build.xml file. Around line 157: 156 157 Sean From bmclaugh@algx.net Tue Dec 7 17:18:45 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 49093 invoked from network); 7 Dec 1999 17:18:45 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 17:18:45 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Tue, 7 Dec 1999 11:18:44 -0600 Message-ID: <015601bf40d7$0ae131a0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: Subject: Install Instructions on Tomcat Date: Tue, 7 Dec 1999 11:18:13 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 As promised, here are installation instructions on Tomcat, in installing.xml. Can someone commit these and make sure they generate all right? I wasn't able to test it, but the XML all looks good to me. I did a CVS diff, let me know if this should be in some other format. Thanks, Brett Index: installing.xml =================================================================== RCS file: /home/cvspublic/xml-cocoon/docs/installing.xml,v retrieving revision 1.4 diff -r1.4 installing.xml 163c163,289 <

    Yet to be written! Volunteers welcome!

    --- >

    > Tomcat has two basic methods of locating Java classes for the runtime environment. > The first is the overall classpath that Tomcat uses to run, and this is the > classpath provided to Java classes that use constructs such as > Class.forName().newInstance(). The second classpath is > associated with a specific context, and is somewhat analagous to the > servlet zones used in Apache JServ. >

    > >

    > Because the Cocoon framework utilizes Class.forName() and other > dynamic instance handling techniques, the Cocoon classes need to have its > classpath aware of the FOP, XSLP, and parser classes used within the > framework. To do this, take the 3 jar files supplied with the Cocoon > distribution and put them in your <Tomcat-Root>/lib > directory. This is the standard location for Tomcat core libraries. To > ensure that Tomcat will use these, you need to edit the Tomcat startup file. > On Windows, this is <Tomcat-Root>/tomcat.bat and on > Unix, this is <Tomcat-Root>/tomcat.sh. In this > file you must add the 3 included distribution jars to Tomcat's classpath. > For Windows, using the default packages provided with Cocoon: >

    > > set cocoonClasses=.\lib\xslp.19991017-fix.jar > set cocoonClasses=.\lib\openxml.106-fix.jar;%cocoonClasses% > set cocoonClasses=.\lib\fop.0110.jar;%cocoonClasses% > set CLASSPATH=%appClassPath%;%sysJars%;%cocoonClasses% > >

    > For Unix, using the default packages provided with Cocoon: >

    > > cocoonClasses=${baseDir}/lib/xslp.19991017-fix.jar > cocoonClasses=.${baseDir}/lib/openxml.106-fix.jar:${cocoonClasses} > cocoonClasses=${baseDir}/lib/fop.0110.jar:${cocoonClasses} > CLASSPATH=${appClassPath}:${sysJars}:${cocoonClasses} > >

    > If you wish to use alternate parsers, such as IBM XML4J or Oracle, you > should use these instead of the jar files in the example. >

    > >

    > Note: do not add the Cocoon.jar package here since > this might corrupt it's normal operation. Here, you should add all the > required packages but Cocoon itself. >

    > >

    > Next you need to let the context you wish to use Cocoon in know about Cocoon. > Although it is possible to use Cocoon across contexts, this is highly > discouraged; lots of instability and erratic caching behavior results. > For the context you wish to use Cocoon, in you need to make sure you have a > directory <Path-to-Context>/WEB-INF/lib. This > directory is where jar files should be put for Tomcat to see for that > zone. Place the Cocoon.jar file in this directory. The next time Tomcat > is started it should be able to see the files in the Cocoon distribution. >

    > >

    > If you would like to test the installation to this point, start Tomcat and > reference the org.apache.cocoon.Cocoon class through the context you have > it installed in. For example, for a context called 'xml': >

    > > http://localhost:8080/xml/servlet/org.apache.cocoon.Cocoon > >

    > You should get a Cocoon generated error page, with an error message about the > properties argument not being specified to Cocoon. If you do not get an error > page with a Cocoon header, you need to re-trace your steps. >

    > >

    > Next you need to tell your context to let Cocoon know where to find its > properties file, as well as to map Cocoon to XML document requests. > Make sure you have a web.xml file in your context's > WEB-INF directory. This file specifies servlet mappings > and initial arguments to servlets. If you don't have this file, you can copy > an example from <Tomcat-Root>/examples/WEB-INF > directory. You should have the following entries in that file: >

    > > > > > org.apache.cocoon.Cocoon > > > org.apache.cocoon.Cocoon > > > > properties > > > d:/java/servlet/tomcat/portal/WEB-INF/conf/cocoon.properties > > > > > > org.apache.cocoon.Cocoon > > > *.xml > > > ]]> > > >

    > You will need to replace the path to the Cocoon.properties file with the actual > location of that file on your system. > Note that you should not need to change anything from the template > properties file found in the distribution, but you must edit it for > more complex operation. Please refer directly to the file that contains > brief indications and comments on the different configurations, but you > don't need to care about that at this point. >

    > >

    > Everything should be configured fine. Restart Tomcat > and try accessing the samples contained in the distribution to see > Cocoon in action. >

    From stefano@apache.org Tue Dec 7 17:29:30 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 50643 invoked from network); 7 Dec 1999 17:29:30 -0000 Received: from pop.systemy.it (194.20.140.28) by 63.211.145.10 with SMTP; 7 Dec 1999 17:29:30 -0000 Received: from apache.org (pv18-pri.systemy.it [194.21.255.18]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id SAA09572 for ; Tue, 7 Dec 1999 18:28:51 +0100 Message-ID: <384C7914.7CC70086@apache.org> Date: Tue, 07 Dec 1999 04:03:48 +0100 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: FESI.jslib.* imports References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> <384C4A69.F6988C2C@apache.org> <027201bf4049$930630f0$0201010a@algx.net> <384C5BDC.DFB9DECC@apache.org> <02a801bf404f$dbd7f2e0$0201010a@algx.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brett McLaughlin wrote: > > No, you didn't get it: the reflection code must be inside Cocoon, not > > Ant. Ant already uses reflection to avoid all the components to be > > present at build time. > > Ah, I see. This is not so good, because a minority gets a benefit while a > majority pays the price. Right. > > People should be able to modify stuff and recompile. That's the goal. > > No, I mean if I assemble a complete application, say including Cocoon, > Tomcat, EJBoss, some JNDI classes, and my custom classes, but need to > distribute on different platforms, I may need to run Ant type tasks as part > of an overall install. In this case, Ant breaking in the middle is not > acceptable. However, particularly with the reflection having to be in > Cocoon, I am not so sure that it isn't safe to assume anyone who would do > this would need to be responsible to build an idiot-proof install suite. So > strike that comment. ;-) Ok, I see. > > > You also can look at actually distributing > > > more jar files with Cocoon. > > > > No, I'm done with that. People will manage their components by > > themselves. > > ;-) We see eye to eye on lots of things. :) don't get me wrong, I'm all for making life as easy as possible, but this should not impact on the ability to move the project forward with an increased rate. > > > In both EJBoss and Turbine, we distribute > > > ant.jar, javac.jar, and projectx_tr2.jar, which everyone seems to really > > > like, despite the initial and infrequent pain to download through CVS. > > > > I like good docs instead of fat distributions. > > Yes, but sometimes you get out of balance. Requiring someone to get IBM > XML4J is reasonable; it is on a website. Requiring someone to log into CVS > and get ant.jar and javac.jar... I don't know. well, javac.jar is already in your JDK. Ant will soon have it's own project with mail list, distribution, etc... > That is pushing it in my > mind. Also, have you pulled down jakarta-* modules lately? They are > freaking huge! Right, then we split them. > > > > > Let me know your thoughts, I think Ant has a lot of promise, but needs > work > > > (we seem to be in agreement on that). > > > > Ant rocks but it needs some enhancing (many todo items are mine). I > > would like to be able to have a task that doesn't fail is simple > > dependency linking is missing, but this unfortunately requires a new > > compiler, not a simple Ant Task. > > > > Or, something like this > > > > > > > > > > > > or > > > > > > > > > > > > which is even better since it uses reflection directly and doesn't care > > about different jar naming. > > I think this could actually be done with XML pre-processing. No way. > It is not > unfeasible to think that an XML aware application could make some decisions > about files and then use this knowledge with the XML file to generate a new > XML file, and feed that into Ant. So you would need yet another DTD to teah your pre-preocessor how to do things. What do you gain? > Sort of like using a bean to lead a bean, > you know? I might be interesting to see how thin a piece you could build to > do this pre-processing. It would only have to read a file name, check for > the file's existence, and either print the contents of the if in the > resulting XML file, or skip it. Hmmm... I don't like this. > > I think the current design limitation of having just single empty > > elements is simple too restrictive. > > Yup, what's the point of XML when it's not _extensible_ ? Right there :) -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche From bmclaugh@algx.net Tue Dec 7 17:40:06 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 51080 invoked from network); 7 Dec 1999 17:40:06 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 17:40:06 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Tue, 7 Dec 1999 11:40:05 -0600 Message-ID: <017401bf40da$06416360$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: References: <00df01bf400d$8979b2f0$8c0f0a0a@allegiancetelecom.com> <384C4A69.F6988C2C@apache.org> <027201bf4049$930630f0$0201010a@algx.net> <384C5BDC.DFB9DECC@apache.org> <02a801bf404f$dbd7f2e0$0201010a@algx.net> <384C7914.7CC70086@apache.org> Subject: Re: FESI.jslib.* imports Date: Tue, 7 Dec 1999 11:39:34 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > > > > In both EJBoss and Turbine, we distribute > > > > ant.jar, javac.jar, and projectx_tr2.jar, which everyone seems to really > > > > like, despite the initial and infrequent pain to download through CVS. > > > > > > I like good docs instead of fat distributions. > > > > Yes, but sometimes you get out of balance. Requiring someone to get IBM > > XML4J is reasonable; it is on a website. Requiring someone to log into CVS > > and get ant.jar and javac.jar... I don't know. > > well, javac.jar is already in your JDK. Ant will soon have it's own > project with mail list, distribution, etc... Well, I sort of disagree on this, but I think it's minor. Either (a) people _today_ using Cocoon are smart enough to get it or (b) by the time it is an issue, Ant is "standard" and easily obtainable. So I can get over this... > > > That is pushing it in my > > mind. Also, have you pulled down jakarta-* modules lately? They are > > freaking huge! > > Right, then we split them. That would be a solution. > > > > > > > > Let me know your thoughts, I think Ant has a lot of promise, but needs > > work > > > > (we seem to be in agreement on that). > > > > > > Ant rocks but it needs some enhancing (many todo items are mine). I > > > would like to be able to have a task that doesn't fail is simple > > > dependency linking is missing, but this unfortunately requires a new > > > compiler, not a simple Ant Task. > > > > > > Or, something like this > > > > > > > > > > > > > > > > > > or > > > > > > > > > > > > > > > > > > which is even better since it uses reflection directly and doesn't care > > > about different jar naming. > > > > I think this could actually be done with XML pre-processing. > > No way. Well, it can be done... it may not be the best though, see below... > > > It is not > > unfeasible to think that an XML aware application could make some decisions > > about files and then use this knowledge with the XML file to generate a new > > XML file, and feed that into Ant. > > So you would need yet another DTD to teah your pre-preocessor how to do > things. What do you gain? Wait a sec... you were the one that wanted this behavior :-) I am merely proposing alternatives to modifying Ant code. Maybe for no other reason than to demonstrate that ANt is a better solution... > > > Sort of like using a bean to lead a bean, > > you know? I might be interesting to see how thin a piece you could build to > > do this pre-processing. It would only have to read a file name, check for > > the file's existence, and either print the contents of the if in the > > resulting XML file, or skip it. Hmmm... > > I don't like this. Right, because it shouldn't be XML handling this, it should be code. XML needs to stay dat-centric, which is why I suggested either requiring the files, or providing them. It seems that either Ant needs to grow significantly, or we all pay a price of carrying heavy distros around. > > > > I think the current design limitation of having just single empty > > > elements is simple too restrictive. > > > > Yup, what's the point of XML when it's not _extensible_ ? > > Right there :) -Brett From bmclaugh@algx.net Tue Dec 7 18:39:29 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 53290 invoked from network); 7 Dec 1999 18:39:29 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 7 Dec 1999 18:39:29 -0000 Received: from dfwbmclaugh ([216.99.224.6]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Tue, 7 Dec 1999 12:39:24 -0600 Message-ID: <001401bf40e2$5e9f2da0$8c0f0a0a@allegiancetelecom.com> From: "Brett McLaughlin" To: Subject: Producers, re: init() and destory() Date: Tue, 7 Dec 1999 12:39:18 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 How do I simulate init() and destroy actions when using the Producer model as opposed to the servlet model? Should I just have some "dummy" servlet or class that is loaded and handles this, but is never actually directly referenced? init() and destory() allow aome advanced caching and pre-setup that I need. Thanks, Brett From j.her@t-online.de Tue Dec 7 21:16:30 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 55777 invoked from network); 7 Dec 1999 21:16:30 -0000 Received: from mailout00.btx.dtag.de (194.25.2.148) by 63.211.145.10 with SMTP; 7 Dec 1999 21:16:30 -0000 Received: from fwd08.btx.dtag.de ([194.25.2.168]) by mailout00.btx.dtag.de with smtp id 11vRyG-0004Ch-00; Tue, 7 Dec 1999 22:16:28 +0100 Received: from owlglass (07219553084-0001(btxid)@[62.158.113.68]) by fwd08.btx.dtag.de with smtp id ; Tue, 7 Dec 1999 22:16:12 +0100 Message-Id: To: "cocoon-dev@xml.apache.org" Date: Tue, 07 Dec 1999 13:56:50 +0100 Reply-To: "Juergen Hermann" Priority: Normal X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: Producers X-Sender: 07219553084-0001@t-dialin.net From: j.her@t-online.de (Juergen Hermann) On Mon, 6 Dec 1999 18:27:18 -0600, Brett McLaughlin wrote: >mechanism. I certainly don't want to get an error (or give one to a client) >and show them that a file at d:\dev\xsl\sheet.xsl is missing, it gives too >much information about my system away. > >Let's talk more on this, I can help implement it. The cocoon: schema is one thing to inspect. But with this and all other possible solutions, the problem remains how you can pass the path resolution algorithm into subsystems, especially parsers and (XSLT) processors. Whatever the solution is, you surely have to encapsulate the "path" concept into its own class (or class tree), also in order to solve the "real path should remain hidden" problem you outlined above. What I would also like to see in such a concept is a way to use SGML catalogs, for example "sgml:ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML". This would lead to error pages showing the SGML identifier, while parsers would use a getRealPath() method to retrieve the file (or HTTP URL). -- Juergen Hermann, Karlsruhe, Germany | http://www.schiele-ct.de/jh | IRC: SNIBRIL From j.her@t-online.de Tue Dec 7 21:16:39 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 56045 invoked from network); 7 Dec 1999 21:16:39 -0000 Received: from mailout00.btx.dtag.de (194.25.2.148) by 63.211.145.10 with SMTP; 7 Dec 1999 21:16:39 -0000 Received: from fwd08.btx.dtag.de ([194.25.2.168]) by mailout00.btx.dtag.de with smtp id 11vRyK-0004DN-00; Tue, 7 Dec 1999 22:16:32 +0100 Received: from owlglass (07219553084-0001(btxid)@[62.158.113.68]) by fwd08.btx.dtag.de with smtp id ; Tue, 7 Dec 1999 22:16:11 +0100 Message-Id: To: "cocoon-dev@xml.apache.org" Date: Tue, 07 Dec 1999 13:31:39 +0100 Reply-To: "Juergen Hermann" Priority: Normal X-Mailer: PMMail 98 Standard (2.00.1500) For Windows NT (4.0.1381;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: FESI.jslib.* imports X-Sender: 07219553084-0001@t-dialin.net From: j.her@t-online.de (Juergen Hermann) On Tue, 07 Dec 1999 00:44:41 +0100, Stefano Mazzocchi wrote: >I'm working to make a better build file, but I'm not sure _how_ to allow >Cocoon to be built without throwing errors if the required packages are >not in the classpath. > >Well, I do have a solution, but it requires reflection which is not the >cleanest/fastest thing to do... My built file I sent some time ago did that (and that was the reason it was relatively complicated). But it was semi-automatic, by checking whether the path to certain libs was set or not. >What do you think? I can't judge how much work it'll be, but in the long run separating the optional source from the core source seems the best way to me. Although it is much work NOW, it allows the painless addition of options later. It would require a change in source layout like this... org/apache/cocoon/Cocoon.java // only source file on this level org/apache/cocoon/core/Browsers.java, cache, compiler, ... ... org/apache/cocoon/options/processor/xslt/XTProcessor.java ... This structure would allow easy ntegration with Ant's project model and recursive operations. Another option is to extend Ant in a way which allows "exclusion lists" to be established for the copy operations. If possible, that is the best way. -- Juergen Hermann, Karlsruhe, Germany | http://www.schiele-ct.de/jh | IRC: SNIBRIL From mlim@encommerce.com Wed Dec 8 01:49:53 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 65414 invoked from network); 8 Dec 1999 01:49:53 -0000 Received: from mail.encommerce.com (166.90.168.4) by 63.211.145.10 with SMTP; 8 Dec 1999 01:49:53 -0000 Received: from yoshimitsu ([10.10.40.99]) by mail.encommerce.com (Netscape Messaging Server 3.62) with ESMTP id 294 for ; Tue, 7 Dec 1999 17:47:42 -0800 Message-Id: <4.2.0.58.19991207173714.00abbd20@mail.encommerce.com> X-Sender: mlim@mail.encommerce.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Tue, 07 Dec 1999 17:43:10 -0800 To: "cocoon-dev@xml.apache.org" From: "Mario Lim" Subject: Help with "starts-with(String, String)" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Hello there, I'm trying to use the tag and I need to compare a string, but unfortunately I couldn't find any string comparison function. I decided to use "start-with" to test an attribute but It is not comparing correctly. The code looks like: Where {@notify} is a valid element atribute. What am I doing wrong??? ---------------------------------------------------------------------- |Mario Lim | |enCommerce Inc. 2901 Patrick Henry Drive Suite 100 | |Software Engineer Santa Clara, CA. 95054 | |mlim@encommerce.com Tel: 408.222.7902 | |http://www.encommerce.com Tel: 800.318.6010 X7902 | | Fax: 408.733.7867 | |--------------------------------------------------------------------| |"It is possible to commit no mistakes and still lose. | | That is not a weakness; that is life." | | | | -- Picard, "Peak Performance" | ---------------------------------------------------------------------- From balld@phoenix.webslingerZ.com Wed Dec 8 02:55:04 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 66605 invoked from network); 8 Dec 1999 02:55:04 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 8 Dec 1999 02:55:04 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id VAA10337 for ; Tue, 7 Dec 1999 21:56:44 -0500 Date: Tue, 7 Dec 1999 21:56:44 -0500 (EST) From: Donald Ball To: "cocoon-dev@xml.apache.org" Subject: Re: Help with "starts-with(String, String)" In-Reply-To: <4.2.0.58.19991207173714.00abbd20@mail.encommerce.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 7 Dec 1999, Mario Lim wrote: > Hello there, > I'm trying to use the tag and I need to compare a string, but > unfortunately I couldn't find any string comparison function. I decided to > use "start-with" to test an attribute but It is not comparing > correctly. The code looks like: > > > > > > > > > > Where {@notify} is a valid element atribute. What am I doing wrong??? a) this question belongs on the XSL mailing list - xsl-list@mulberrytech.com b) lose the curly braces i think c) for the latest version of the XSLT recommendation, you could do this: - donald From balld@phoenix.webslingerZ.com Wed Dec 8 04:11:06 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 67566 invoked from network); 8 Dec 1999 04:11:06 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 8 Dec 1999 04:11:06 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id XAA10827 for ; Tue, 7 Dec 1999 23:12:50 -0500 Date: Tue, 7 Dec 1999 23:12:50 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: Producers, re: init() and destory() In-Reply-To: <001401bf40e2$5e9f2da0$8c0f0a0a@allegiancetelecom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 7 Dec 1999, Brett McLaughlin wrote: > How do I simulate init() and destroy actions when using the Producer model > as opposed to the servlet model? Should I just have some "dummy" servlet or > class that is loaded and handles this, but is never actually directly > referenced? init() and destory() allow aome advanced caching and pre-setup > that I need. If you make your actors (producers, processors, what have you) implement the org.apache.cocoon.framework.Configurable method, they will be initiatialized by the master factory. Stefano did, in my opinion, a stellar job in making actor creation and configuration very easy to work with; so easy, it's deceptive. :) Cocoon actors don't die until cocoon does, so there's no explicit destroy support, just what the JVM supports. - donald From mike@mglenn.com Wed Dec 8 04:31:50 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 68900 invoked from network); 8 Dec 1999 04:31:50 -0000 Received: from ha1.rdc3.on.home.com (HELO mail.rdc3.on.home.com) (24.2.9.68) by 63.211.145.10 with SMTP; 8 Dec 1999 04:31:50 -0000 Received: from mglenn.com ([24.112.45.130]) by mail.rdc3.on.home.com (InterMail v4.01.01.02 201-229-111-106) with ESMTP id <19991208042948.CEFO14330.mail.rdc3.on.home.com@mglenn.com> for ; Tue, 7 Dec 1999 20:29:48 -0800 Message-ID: <384DDF18.CCAB6A53@mglenn.com> Date: Tue, 07 Dec 1999 23:31:20 -0500 From: Michael Glenn Organization: North 49 Design X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Producers, re: init() and destory() References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Donald Ball wrote: > > On Tue, 7 Dec 1999, Brett McLaughlin wrote: > > > How do I simulate init() and destroy actions when using the Producer model > > as opposed to the servlet model? Should I just have some "dummy" servlet or > > class that is loaded and handles this, but is never actually directly > > referenced? init() and destory() allow aome advanced caching and pre-setup > > that I need. > > If you make your actors (producers, processors, what have you) implement > the org.apache.cocoon.framework.Configurable method, they will be > initiatialized by the master factory. Stefano did, in my opinion, a > stellar job in making actor creation and configuration very easy to work > with; so easy, it's deceptive. :) Thanks Donald, I'd missed this and initialized my producers in the constructor method. > Cocoon actors don't die until cocoon does, so there's no explicit destroy > support, just what the JVM supports. FTI, writing a finalize() method should do the trick here. -- Michael Glenn North 49 Design http://www.mglenn.com From bmclaugh@algx.net Wed Dec 8 06:18:28 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 70166 invoked from network); 8 Dec 1999 06:18:28 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 8 Dec 1999 06:18:28 -0000 Received: from enterprise ([216.99.228.69]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with SMTP id net for ; Wed, 8 Dec 1999 00:18:27 -0600 Message-ID: <00c901bf4144$962c4b10$0201010a@algx.net> From: "Brett McLaughlin" To: Subject: Compiling 1.6_dev Date: Wed, 8 Dec 1999 00:22:21 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 All- I am getting some strange errors trying to compile the latest code from CVS. I have the OpenXML 1.06-fix jar file from the Cocoon dist (1.5), but am getting a problem in OpenXMLParser where it tries to instantiate org.openxml.parser.XMLParser with XMLParser parser = new XMLParser(); It also bombs on the uses of parser later on, but that is a by-product of this deal... Am I mssing something obvious here? Thanks, Brett From balld@locus.apache.org Wed Dec 8 07:37:24 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 71632 invoked from network); 8 Dec 1999 07:37:24 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 8 Dec 1999 07:37:24 -0000 Received: (qmail 16885 invoked by uid 2016); 8 Dec 1999 07:37:16 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 16846 invoked from network); 8 Dec 1999 07:37:16 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 8 Dec 1999 07:37:16 -0000 Received: (qmail 71629 invoked by uid 1037); 8 Dec 1999 07:37:09 -0000 Date: 8 Dec 1999 07:37:09 -0000 Message-ID: <19991208073709.71628.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/processor/sql ColumnFormatter.java SQLProcessor.java Utils.java balld 99/12/07 23:37:09 Modified: src/org/apache/cocoon/processor/sql ColumnFormatter.java SQLProcessor.java Utils.java Log: Moved a few things around in ColumnFormatter so that it's possible for columns to be formatted as more than simply a text node (e.g. embedded HTML). Also added a little formatter that can transform \n into
    for text and varchar columns. Revision Changes Path 1.2 +84 -12 xml-cocoon/src/org/apache/cocoon/processor/sql/ColumnFormatter.java Index: ColumnFormatter.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/ColumnFormatter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ColumnFormatter.java 1999/12/07 09:20:59 1.1 +++ ColumnFormatter.java 1999/12/08 07:37:08 1.2 @@ -1,3 +1,52 @@ +/* + ============================================================================ + The Apache Software License, Version 1.1 + ============================================================================ + + Copyright (C) 1999 The Apache Software Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without modifica- + tion, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. + + 4. The names "Cocoon" and "Apache Software Foundation" must not be used to + endorse or promote products derived from this software without prior + written permission. For written permission, please contact + apache@apache.org. + + 5. Products derived from this software may not be called "Apache", nor may + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + This software consists of voluntary contributions made by many individuals + on behalf of the Apache Software Foundation and was originally created by + Stefano Mazzocchi . For more information on the Apache + Software Foundation, please see . + */ + package org.apache.cocoon.processor.sql; import org.w3c.dom.*; @@ -5,6 +54,15 @@ import java.text.*; import java.util.*; +/** + * This class allows certain columns to be formatted specially. If it gets + * too complex, it should probably be broken apart into a manager and a + * set of specific formatting classes (e.g. one for dates, one to transform + * text into an HTML tree according to certain rules, etc.) + * + * @author Donald A. Ball Jr. + * @version does this really change magically? let's see. + */ class ColumnFormatter { protected Properties formats_by_name = new Properties(); @@ -26,21 +84,17 @@ } protected void putFormat(String name, String type, String format) { - System.err.println("TRYING TO ADD FORMAT FOR NAME: "+name+" TYPE: "+type); if (format == null || format.equals("")) { return; } if (name == null || name.equals("") && (type != null && !type.equals(""))) { - System.err.println("ADDING TYPE: "+type); formats_by_type.put(type,format); } else { - System.err.println("ADDING NAME: "+name); formats_by_name.put(name,format); } } protected String getFormat(Column column) { - System.err.println("GETTING FORMAT FOR "+column.name+" "+column.type); String format = formats_by_name.getProperty(column.name); if (format == null) { format = formats_by_type.getProperty(column.type); @@ -48,19 +102,37 @@ return format; } - protected String formatColumn(Column column, ResultSet rs, int i) throws SQLException { + protected void addColumnNode(Document document, Element parent, Column column, ResultSet rs, int i) throws SQLException { String format = getFormat(column); String value; if (format != null) { - if (column.type.equals("timestamp") || - column.type.equals("time") || - column.type.equals("date") || - column.type.equals("datetime")) { - SimpleDateFormat date_format = new SimpleDateFormat(format); - return date_format.format(rs.getDate(i)); + if (column.type.equals("timestamp") || column.type.equals("time") || column.type.equals("date") || column.type.equals("datetime")) { + SimpleDateFormat date_format = new SimpleDateFormat(format); + parent.appendChild(document.createTextNode(date_format.format(rs.getDate(i)))); + return; + } else if (column.type.equals("varchar") || column.type.equals("text")) { + if (format.equals("br")) { + StringBuffer sb = new StringBuffer(); + StringCharacterIterator iter = new StringCharacterIterator(rs.getString(i)); + for (char c = iter.first(); c != iter.DONE; c = iter.next()) { + if (c == '\n') { + if (sb.length() > 0) { + parent.appendChild(document.createTextNode(sb.toString())); + sb.setLength(0); + } + parent.appendChild(document.createElement("br")); + } else { + sb.append(c); + } + } + if (sb.length() > 0) { + parent.appendChild(document.createTextNode(sb.toString())); + } + return; + } } } - return rs.getString(i); + parent.appendChild(document.createTextNode(rs.getString(i))); } } 1.7 +3 -16 xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java Index: SQLProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/sql/SQLProcessor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SQLProcessor.java 1999/12/07 09:20:59 1.6 +++ SQLProcessor.java 1999/12/08 07:37:08 1.7 @@ -62,7 +62,7 @@ * A processor that performs SQL database queries. * * @author Donald Ball - * @version $Revision: 1.6 $ $Date: 1999/12/07 09:20:59 $ + * @version $Revision: 1.7 $ $Date: 1999/12/08 07:37:08 $ */ public class SQLProcessor extends AbstractActor implements Processor, Status { @@ -250,7 +250,6 @@ Element column_element; Node row_node = results_node; Element row_element = null; - String value; int count = 0; if (skip_rows > 0) { while (rs.next()) { @@ -269,19 +268,7 @@ } for (int i=0; iDonald Ball - * @version $Revision: 1.5 $ $Date: 1999/12/03 08:42:29 $ + * @version $Revision: 1.6 $ $Date: 1999/12/08 07:37:09 $ */ public class Utils { @@ -173,6 +173,5 @@ } return sb.toString(); } - } From balld@locus.apache.org Wed Dec 8 07:38:49 1999 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 71923 invoked from network); 8 Dec 1999 07:38:49 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 8 Dec 1999 07:38:49 -0000 Received: (qmail 18595 invoked by uid 2016); 8 Dec 1999 07:38:44 -0000 Delivered-To: apcore-xml-cocoon-cvs@apache.org Received: (qmail 18547 invoked from network); 8 Dec 1999 07:38:43 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 8 Dec 1999 07:38:43 -0000 Received: (qmail 71920 invoked by uid 1037); 8 Dec 1999 07:38:41 -0000 Date: 8 Dec 1999 07:38:41 -0000 Message-ID: <19991208073841.71919.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon changes.xml balld 99/12/07 23:38:41 Modified: . changes.xml Log: Revision Changes Path 1.7 +4 -1 xml-cocoon/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon/changes.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- changes.xml 1999/12/07 09:24:23 1.6 +++ changes.xml 1999/12/08 07:38:41 1.7 @@ -4,7 +4,7 @@ @@ -15,6 +15,9 @@ + + Moved a few things around in ColumnFormatter so that it's possible for columns to be formatted as more than simply a text