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 55947 invoked from network); 7 Jul 2000 14:55:57 -0000 Received: from pragma.com.co (207.159.135.113) by locus.apache.org with SMTP; 7 Jul 2000 14:55:57 -0000 Received: from helios.pragmalab.com.co ([209.88.10.18]) by pragma.com.co (8.9.3/8.9.3) with ESMTP id IAA03385 for ; Fri, 7 Jul 2000 08:55:32 -0600 (MDT) Received: from helios ([192.168.0.10]) by helios.pragmalab.com.co (Netscape Messaging Server 4.1) with ESMTP id FXBNHN00.A01 for ; Fri, 7 Jul 2000 09:53:47 +0000 Message-ID: <33165014.962963627336.JavaMail.root@helios> Date: Fri, 7 Jul 2000 09:53:47 +0000 (GMT+00:00) From: "=?ISO-8859-1?Q?Pedro_E._G=F3mez?=" Reply-To: "=?ISO-8859-1?Q?Pedro_E._G=F3mez?=" To: Cocoon Subject: Sugestions and doubs Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Organization: PRAGMA LIMITADA X-Mailer: misiva I have some questions and doubts about the SQL processor and XSL: 1- Do you have to declare always the params which are going to be use inside the XSL template? e.g. Without this it does not work for me. 2- How can I format the results in the XSL, for example a date? 3- Can I define my own functions to be use in the XSL? The general idea is that i want to add my own functions to the XSL. 4- There are some kind of connection pool? I have some sugestions about connection pooling and the queries. Connections: ~~~~~~~~~~~~ - As some one say in the cocoon documentation, there are still many information in legacy systems. The connections to the database are expensive and it is goot to have some pool schema. - Put the connection information in some place alone. It could be in XML or a properties file for each one. Diferent properties file is usefull if you have a big installation and diferent people working but not together (I mean, in diferent projects), and you don't want to share your users and passwords with the other people. In properties File: ~~~~~~~~~~~~~~~~~~ autoCommit=false driver=oracle.jdbc.driver.OracleDriver freeTimeout=300000 lockedTimeout=7200000 getTimeout=2000 maxConnections=3 url=jdbc:oracle:thin:@homero:1521:dbhomero user=sid password=sid Or as I said in an XML file: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ false oracle.jdbc.driver.OracleDriver 300000 7200000 2000 3 jdbc:oracle:thin:@homer:1521:dbhomer sid sid The queries ~~~~~~~~~~~ - Is so useful to have all the related queries in the same place because of the big systems. You can change so easy all the statements. documents document lower yes coddoc coddoc count select * from sidt_docume where coddoc > ? and type = ? types type lower yes type type count select * from sidt_types comments comment lower yes commentId commentId count select * from sidt_comments where coddoc = ? XSP queries ~~~~~~~~~~~ Something like this: someDocuments sid request.getParameter("coddoc") request.getParameter("type") documentTypes sid Now lets supose that we have the comments of each one document, I mean, a new query for each document something like this: someDocuments sid request.getParameter("coddoc") request.getParameter("type") documentComments document.coddoc I said all this because we have our own html template framework and it suport all this and we are so happy with it, and I want to share it with you, and you will be happy to. In our schema we have diferents statements files, becouse we have many systems living together. The statement name could be something like sidStatements.documentComments For example I can have a html template like this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <%=global.PJR_BASEHREF/%>

Documentos

<%PJRBLOCK NAME="documents" SRC="DBManager.executeQuery('pgomez.sample01.isaPool','pgomez.sample01.isaSt','documents',form.coddoc,form.type)"%> <%PJRBODY%> <%/PJRBODY%>
Code Name Comments
<%=documents.coddoc/%> <%=documents.nombre/%>, <%=documents.getObject("date").formatDate("dd/MM/yyyy")/%> <%PJRBLOCK NAME="comments" SRC="DBManager.executeQuery('pgomez.sample01.isaPool','pgomez.sample01.isaSt','comments',documents.coddoc)"%> <%=comments.comment/%>
<%/PJRBLOCK%>
<%/PJRBLOCK%> CONCLUSION ~~~~~~~~~~ I can work on something like this, what do you thing about all? ______________________________________ Message sent with Misiva. Visit us at http://www.pragma.com.co/misiva