Re: esql:row-count inside esql:row-results

2002-11-01 Thread Jerry Fowler
I forget what version you're in, but I found that in 2.0.3 I had to do this:
		rowcount
		   xsp:expr + _esql_query.rowCount()/xsp:expr
		/rowcount
to get by a long-since-forgotten generator error.

Antonio Gallardo Rivera wrote:

Is this tag already working?

I am having troubles with it.

inside row-results I cannot use it.



--
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Q: Stripped-Down usage? (no web server)

2002-10-16 Thread Jerry Fowler

My home-rolled version (which you can easily improve) is:

#!/bin/tcsh

setenv CATALINA_HOME here
setenv CATALINA_BASE there

cd $CATALINA_BASE
foreach lib (`find $CATALINA_HOME/common/lib webapps/cocoon/WEB-INF/lib 
-name *.jar`)
 if (! $?CLASSPATH ) then
 setenv CLASSPATH $lib
 else
 setenv CLASSPATH $CLASSPATH':'$lib
 endif
end
setenv CLASSPATH $CLASSPATH':'webapps/cocoon/WEB-INF/classes

if ( ! $#argv ) then
   echo Usage:
   echo $0 '[http://localhost:8080]/URI [...]'
   echo You should run this from $CATALINA_BASE
   echo '(CLASSPATH word length problems...)'
   exit
endif

java org.apache.cocoon.Main \
 --brokenLinkFile ./tmp/broken-links \
 --logLevel DEBUG \
 --contextDir ./webapps/cocoon \
 --destDir ./tmp \
 --workDir ./tmpwork \
 --configFile ./webapps/cocoon/WEB-INF/cocoon.xconf \
  $* | tee ./cocoon-test.log


Geoff Howard wrote:
 You can use the cocoon CLI command line interface,
 by executing org.apache.cocoon.Main.  It's not very
 well documented, but you can glean enough to use it
 from the archive, the source code and the build target
 for the docs.
 
 HTH,
 Geoff Howard
 
 --- Torched Salamander [EMAIL PROTECTED] wrote:
 
Has anyone used *just* the core components of cocoon
in a project?

I don't have a web server, I'm not running tomcat. 
Currently, I have a 
bunch of java classes that make SQL calls against a
DB, and build up a big 
XML doc.  I then have more java classes that apply
various XSL 
transformations to create some HTML pages on disk. 
(It is for documentation 
purposes.)  After finding out about cocoon and
reading the docs, parts of it 
look perfect for me, but I haven't found any docs or
examples of people 
using *just* the
core DB to output (HTML) pipeline without using
all the other tomcat etc 
overhead.  Does anyone know of a doc, have an
example, or have advice on 
where to look to create a minimalist non-webby
implementation using cocoon 
tech?




 
 _
 
Get a speedy connection with MSN Broadband.  Join
now! 

 
 http://resourcecenter.msn.com/access/plans/freeactivation.asp
 


 -
 
Please check that your question  has not already
been answered in the
FAQ before posting.
http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:  
[EMAIL PROTECTED]

 
 
 __
 Do you Yahoo!?
 Faith Hill - Exclusive Performances, Videos  More
 http://faith.yahoo.com
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 


-- 
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Can anybody solve this?

2002-10-15 Thread Jerry Fowler

I think this snippet that I gleaned from the list a while back
(didn't thank the author in my comment, unfortunately, so I don't
remember who) addresses what you're asking:

!--
Allows initialization code to be executed exactly once.
This was expressed as:
xsl:template match=xsp:page/*[not(starts-with(name(.), 'xsp:'))]
in the xsp docs with Cocoon, but I think what's below is prettier.
   --
xsl:template match=xsp:page/*[not(self::xsp:*)]
   xsl:copy
 xsl:apply-templates select=@*/
   xsp:logic
 // This code ends up inside populateDocument() before any user code
  String productId = request.getParameter(productid);
   /xsp:logic
 xsl:apply-templates/
   /xsl:copy
/xsl:template


Sonny Sukumar wrote:
 Hi guys,
 
 I sent the following message (below the line) yesterday and got one good suggestion 
to use 
 
 xsp:logic
 String productId = request.getParameter(productid);
 /xsp:logic
 
 instead of 
 
 xsp:logic
 String productId = xsp-request:get-parameter name=productid/;
 /xsp:logic
 
 However, it did not work..same problem with the ordering of the generated Java code 
for the XSP which causes productId to try to be used (to create an attribute value 
for the root element) before it is declared.  I would REALLY appreciate any insight 
into this.
 
 Thanks. :-)
 __
 Using: Cocoon 2.0.3 with Tomcat 4.1.12 on Redhat 7.3
 
 My problem is this:  I'm writing an XSP and trying to insert an attribute
 in the root element of my document.  The root element is Product, as this
 doc stores product info.  
 
 Anyhow, a logicsheet inserts an
 xsp:attribute
   xsp:exprproducts.getCategory(productId)/xsp:expr
 /xsp:attribute
 
 into my XSP within the Product element.  Now, the productId variable is
 declared like this *right* below the root Product element in the XSP:
 
 Product
   xsp:logic
 String productId = xsp-request:get-parameter name=productid default=/;
   /xsp:logic
  ...
 
 The problem is that in the Java class generated for the XSP declares productId
 AFTER the attribute code tries to call products.getCategory using productId
 as a parameter.  This is the ONLY thing causing the error as far as I can
 tell, as the code works fine without putting in the attribute.
 
 Note that NO MATTER WHERE the xsp:attribute../xsp:attribute code gets
 inserted within the Product/Product block, the generated Java code still
 has the same ordering problem.
 
 Does anybody know how to fix this?  I would have put the productId declaration
 above the root element (i.e. made it a class member of the generated Java
 class), but apparently one can't use the xsp-request logicsheet tags at the
 class level.  I don't know why this is the case either.
 
 Thanks for the help!
 
 Sonny
 
 _
 Conserve wilderness with a click (free!) and get your own EcologyFund.net email 
(free!) at http://www.ecologyfund.com.
 
 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, 
POP  more! http://www.everyone.net/selectmail?campaign=tag
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 


-- 
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Xindice logicsheet - initial success

2002-10-10 Thread Jerry Fowler

Josema Alonso wrote:

 reply. I do not know why I haven't got it. It seems I have some problem with
 my email box, cause now I'm getting today's messages from the list twice...

This seems to happen to me as well. During a one or two hour period in 
the afternoon (GMT - 5) on a fairly regular basis, I go without any 
cocoon-users mail, and then suddenly get a spate of duplicates for the 
messages that seem to have been sent in that time. On the other hand, 
mail sitting in my queue in the morning after all you Europeans and 
Asians have been so busy is not duplicated. Is there a hiccup in the 
mailqueue somewhere near Greenwich?


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: Problem with Directories Outside of cocoon...

2002-10-07 Thread Jerry Fowler

My cowardly approach was to
cd webapps/cocoon
cp -r tutorial EXP

edit webapps/cocoon/sitemap.xmap
to copy the reference to tutorial, and make the
appropriate change in the copy to EXP,

and then, of course, actually do something useful and
new with my new
webapps/cocoon/EXP directory.

I figure that at the point I'm really happy with the need not
to browse the tutorial or cocoon itself, I'll then edit the
webapps/cocoon/sitemap.xmap to point exclusively to my EXP.

Anyone wishing to disabuse me of a relative-newbie silliness,
please feel free...

Jaimes Blunt wrote:
 Hi Guys,
 
 I currently have cocoon 2.0.3 installed and running on Tomcat 4.1.12.  I 
 am able to edit my sitemap under the webapps/cocoon directory to 
 recognize new xml and xsl's, however I now want to create a new webapp 
 and use cocoon to parse and transform the xml's.  I seem to be having 
 some problems doing this.  My question is, do I need to copy all of the 
 cocoon files over to the new webapp, or is it possible to point the 
 requests for the new webapp to the sitemap in the cocoon directory.
 
 Any ideas would be mych appreciated.
 
 Thanks All
 
 Jaimes Blunt
 


-- 
Jerry Fowler


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: I feel stupid. COCOON + TOMCAT

2002-10-02 Thread Jerry Fowler

I've been using the 1.4 JVM cocoon binary with an Oracle connection 
using the stock Oracle thin JDBC driver for queries quite successfully. 
Cannot yet attest to viability of update/insert/delete.

Bobby Mitchell wrote:



 This is not the case.  I believe the documentation to be out of date for
 this but for as long as I have been using cocoon (a few months now)
 there has been a downloadable binary for the latest release that is
 compiled for and works with the 1.4 JVM.  It is accessible alongside
 the normal cocoon binaries.

 Are you using database connections, too?
 


-- 
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: help on rolling my own XSL

2002-10-01 Thread Jerry Fowler

Thank you, Giacomo, this was, indeed, missing from my logicsheet.
My extraction from the esql logicsheet original was too hasty and 
incomplete. I'm flying now.

Thanks to all for your forebearance,
Jerry

Giacomo Pati wrote:
 Do you have a copy-over template in your logicsheet like:
 
   xsl:template match=@*|*|text()|processing-instruction()
 xsl:copy
   xsl:apply-templates select=@*|*|text()|processing-instruction()/
 /xsl:copy
   /xsl:template
 
 Giacomo
 
 On Mon, 30 Sep 2002, Jerry Fowler wrote:
 
 
Gentlefolk:

I'm using the off-the-shelf Cocoon 2.0.3. I'm trying to roll my own xsp
logicsheet, with an error result that I hope someone will recognize
instantly:


-- 
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




help on rolling my own XSL

2002-09-30 Thread Jerry Fowler

Gentlefolk:

I'm using the off-the-shelf Cocoon 2.0.3. I'm trying to roll my own xsp 
logicsheet, with an error result that I hope someone will recognize 
instantly:

The constructed file, results_test_xsp.java, contains empty package 
line, and an empty class declaration, as follows:


 package ;
...
 /**
  * Generated by XSP. Edit at your own risk, :-)
  */
 public class  extends XSPGenerator {


My keen nose and the Java parser tell me that the program generator 
should have inserted a package name and a class name in order to make
this code mean anything. My grateful salute to anyone who can say off
the top of the head why the generator chose to shortchange me.

Below I provide the relevant portions of my xsp and my logicsheet if
the clue above does not immediately ring a bell. I believe I have 
faithfully followed the guidelines on 
/cocoon/documents/userdocs/xsp/logicsheet.html, to wit,

File results-test.xsp:
--
?xml version=1.0?

?xml-logicsheet href=file:///tmp/xeosql.xsl?

xsp:page xmlns:xsl=http://apache.org/xsl;
   xmlns:xsp=http://apache.org/xsp;
   xmlns:xsp-request=http://apache.org/xsp/request/2.0;
  xmlns:xeosql=http://xeotron.com/cocoon/SQL/v1;
   document
 body
  xsl:call-template name=xeosql:execute-query
xsl:param name=tabletitle select='Results' /
  /xsl:call-template
 /body
   /document
/xsp:page
--

File xeosql.xsl:
--
?xml version=1.0?

xsl:stylesheet version=1.0
   xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xmlns:xsp=http://apache.org/xsp;
   xmlns:xsp-request=http://apache.org/xsp/request/2.0;
   xmlns:xeosql=http://xeotron.com/cocoon/SQL/v1;
   xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1;
 

xspdoc:desc Deliver data directly from an AIDIF /xspdoc:desc
xsl:param name=XSP-ENVIRONMENT/
xsl:param name=XSP-VERSION/
xsl:param name=filename/
xsl:param name=language/

xsl:variable name=environmentCocoon 2/xsl:variable
xsl:variable name=xsp-namespace-urihttp://apache.org/xsp/xsl:variable

xsl:variable name=prefixxeosql/xsl:variable

xsl:template match=xsp:page
   xsp:page
 xsl:apply-templates select=@*/
 xsp:structure
   xsp:include.../xsp:include
 /xsp:structure

 xsl:apply-templates/
   /xsp:page
/xsl:template

xsl:template name=xeosql:execute-query

xsl:param name=tabletitle select='Results' /

xsp:logic
...
/xsp:logic

/xsl:template

!--
Allows initialization code to be executed exactly once.
   --
xsl:template match=xsp:page/*[not(self::xsp:*)]
   xsl:copy
 xsl:apply-templates select=@*/
   xsp:logic
 // This code ends up inside populateDocument() before any user code
   /xsp:logic
 xsl:apply-templates/
   /xsl:copy
/xsl:template

/xsl:stylesheet
--




Many thanks,
Jerry

-- 
Jerry Fowler
Bioinformatics, Xeotron Corporation
+1 713.842.2121 x292
8275 El Rio, Suite 130
Houston, Texas 77054


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]