You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthew Cordes <mc...@maine.edu> on 2000/12/14 03:31:29 UTC

and esql

Hello all.

Anyone have any idea why when i use the esql logicsheet with my own logic
sheet it doesn't appear to work, the esql tags just appear in the output.
I am using the version that came with 1.8 and I include the namespace
in the logicsheet. 

-matt




xsl:copy and xsl:copy-of

Posted by Benjamin Dixon <be...@arches.uga.edu>.
Hi all,

I've been working along on my search and have run into another pothole...
this time with stylesheets and xsl:copy-of. I have the following code:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<template match="/">
   <xsl:copy>
   <xsl:copy-of select="node()|@*"/>
   <xsl:apply-templates/>
   </xsl:copy>
</template>

which I thought would copy whatever XML came in to the output... but when
I try it, I get a cocoon error that says:

xsl:copy-of not allowed inside a stylesheet!

Why is this? Am I not using copy and copy-of correctly? All the examples
I've seen show it used in this way within a template so whats the deal?
(Looked through the archives and found nothing relevant)

Any help is appreciated,

Ben



Re: and esql

Posted by Matthew Cordes <mc...@maine.edu>.
Thanks for your help.  I did not have a connection element, but 
I did use <esq:use-connection> without luck.  I did however get the
version of esql that comes with cocoon 1.8 to work sufficiently for my 
needs so I'll stick with that until the next version of cocoon is 
released.

-matt


On Thu, Dec 14, 2000 at 01:15:52AM -0500, Donald Ball wrote:
> On Thu, 14 Dec 2000, Matthew Cordes wrote:
> 
> > That didn't seem to work, but this is my second logicsheet so I most
> > likely am in error.
> >
> > my logicsheet:
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> > xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > xmlns:mine="http://mine.com/my-logicsheet"
> > >
> >
> > <xsl:template match="mine:do-stuff">
> >   <esql:execute-query>
> >     <esql:query>
> >       select name, description from some_table where some condition
> >     </esql:query>
> >
> > 		<esql:results>
> > 			<record>
> > 				<name><esql:get-string column="name"/></name>
> > 				<description><esql:get-string column="name"/></description>
> > 			</record>
> > 		</esql:results>
> >
> > 		<esql:error-results>
> >
> > 			<!-- BUG?: with the newest cvs version i get null pointer exceptions
> > 				when i include the below -->
> > 			<!--
> > 				<message><esql:get-message/></message>
> > 				<stack><esql:get-stacktrace/></stack>
> > 			-->
> > 		</esql:error-results>
> >   </esql:execute-query>
> > </xsl:template>
> >
> > <xsl:template match="@*|*|text()|processing-instruction()">
> > <xsl:copy>
> >   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
> > </xsl:copy>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> >
> > my page:
> > ?xml version="1.0"?>
> > <?cocoon-process type="xsp"?>
> > <?xml-logicsheet href="logicsheet.xsl" type="text/xsl"?>
> > <xsp:page language="java"
> > 	xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > 	xmlns:mine="http://mine.com/my-logicsheet"
> > 	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> > >
> >
> > <page>
> > 	<mine:do-stuff/>
> > </page>
> > </xsp:page>
> 
> look carefully at the esql sample. you don't have an esql:connection
> element, for instance.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: and esql

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 14 Dec 2000, Matthew Cordes wrote:

> That didn't seem to work, but this is my second logicsheet so I most
> likely am in error.
>
> my logicsheet:
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:mine="http://mine.com/my-logicsheet"
> >
>
> <xsl:template match="mine:do-stuff">
>   <esql:execute-query>
>     <esql:query>
>       select name, description from some_table where some condition
>     </esql:query>
>
> 		<esql:results>
> 			<record>
> 				<name><esql:get-string column="name"/></name>
> 				<description><esql:get-string column="name"/></description>
> 			</record>
> 		</esql:results>
>
> 		<esql:error-results>
>
> 			<!-- BUG?: with the newest cvs version i get null pointer exceptions
> 				when i include the below -->
> 			<!--
> 				<message><esql:get-message/></message>
> 				<stack><esql:get-stacktrace/></stack>
> 			-->
> 		</esql:error-results>
>   </esql:execute-query>
> </xsl:template>
>
> <xsl:template match="@*|*|text()|processing-instruction()">
> <xsl:copy>
>   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
>
>
> my page:
> ?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <?xml-logicsheet href="logicsheet.xsl" type="text/xsl"?>
> <xsp:page language="java"
> 	xmlns:esql="http://apache.org/cocoon/SQL/v2"
> 	xmlns:mine="http://mine.com/my-logicsheet"
> 	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >
>
> <page>
> 	<mine:do-stuff/>
> </page>
> </xsp:page>

look carefully at the esql sample. you don't have an esql:connection
element, for instance.

- donald


Re: and esql

Posted by Matthew Cordes <mc...@maine.edu>.
Donald, 

That didn't seem to work, but this is my second logicsheet so I most
likely am in error.

my logicsheet:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:mine="http://mine.com/my-logicsheet"  
>

<xsl:template match="mine:do-stuff">
  <esql:execute-query>
    <esql:query>
      select name, description from some_table where some condition
    </esql:query>

		<esql:results>
			<record>
				<name><esql:get-string column="name"/></name>
				<description><esql:get-string column="name"/></description>
			</record>
		</esql:results>

		<esql:error-results>

			<!-- BUG?: with the newest cvs version i get null pointer exceptions
				when i include the below -->
			<!--
				<message><esql:get-message/></message>
				<stack><esql:get-stacktrace/></stack>
			-->
		</esql:error-results>
  </esql:execute-query>
</xsl:template>

<xsl:template match="@*|*|text()|processing-instruction()">
<xsl:copy>
  <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>	


my page: 
?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?xml-logicsheet href="logicsheet.xsl" type="text/xsl"?>
<xsp:page language="java"
	xmlns:esql="http://apache.org/cocoon/SQL/v2"
	xmlns:mine="http://mine.com/my-logicsheet"  
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

<page>
	<mine:do-stuff/>
</page>
</xsp:page>


the result:
<page xmlns:mine="http://mine.com/my-logicsheet">
	<esql:execute-query>
		<esql:query>
			select name, description from some_table where some condition
		</esql:query>
		
		<record>
			<name><esql:get-string column="name"></esql:get-string></name>
			<description><esql:get-string column="name"></esql:get-string></description>
		</record>
	</esql:execute-query>
</page>


Am i doing something wrong?  It appears exactly as before (I added
appropriate formatting) except <esql:results> is missing. Oh, and I'm
using esql from cvs as of 11:00pm Eastern 12/14/00.

-matt






On Wed, Dec 13, 2000 at 09:34:05PM -0500, Donald Ball wrote:
> On Wed, 13 Dec 2000, Matthew Cordes wrote:
> 
> > Anyone have any idea why when i use the esql logicsheet with my own logic
> > sheet it doesn't appear to work, the esql tags just appear in the output.
> > I am using the version that came with 1.8 and I include the namespace
> > in the logicsheet.
> 
> you'll need to declare the esql namespace in the page itself. yeah, this
> sucks, it's a deficiency in the xsp processor in c1.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: COCOON AND XSP

Posted by Santos Jha <sj...@cox.rr.com>.
I  did read FAQ beofre starting this thread. It says in an answer to a similar
question

"This happens because Cocoon requires the java compiler to be present in your
classpath, so, if you have Java 1.2.x, you have to set the tools.jar package you
find in [jdk_home]/lib/tools.jar in your classpath (either system classpath or your
servlet engine's classpath). ".

 In my case I have included tools.jar in wrapper.classpath specification.I have
attached my  wrapper.classpath specification  in my first posting.
I guess I am doing something wrong. Since I am new to Cccoon any help will be
appreciated.
santos

Donald Ball wrote:

> On Thu, 14 Dec 2000, Santos Jha wrote:
>
> >  I have installed coccoon on my linux(Redahat 6.2) box which has apache and
> > jserv as web server and servlet engine. I
> >  tried all the examples defined at
> >
> >  http://myhostname/samples/index.xml
> >
> >  most of them work except examples in Dynamic content Generation section. When
> > I tried to run I get following error:
> >
> >  java.lang.NoClassDefFoundError: sun/tools/javac/Main
>
> RTFM, por favor. specifically, the FAQ.
>
> - donald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: COCOON AND XSP

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 14 Dec 2000, Santos Jha wrote:

>  I have installed coccoon on my linux(Redahat 6.2) box which has apache and
> jserv as web server and servlet engine. I
>  tried all the examples defined at
>
>  http://myhostname/samples/index.xml
>
>  most of them work except examples in Dynamic content Generation section. When
> I tried to run I get following error:
>
>  java.lang.NoClassDefFoundError: sun/tools/javac/Main

RTFM, por favor. specifically, the FAQ.

- donald


COCOON AND XSP

Posted by Santos Jha <sj...@cox.rr.com>.
Hi,

 I have installed coccoon on my linux(Redahat 6.2) box which has apache and
jserv as web server and servlet engine. I
 tried all the examples defined at

 http://myhostname/samples/index.xml

 most of them work except examples in Dynamic content Generation section. When
I tried to run I get following error:

 java.lang.NoClassDefFoundError: sun/tools/javac/Main

 I have put folowing as my wrapper.classpath in my jserv.properties.

 wrapper.classpath=/usr/lib/apache/ApacheJServ.jar
 wrapper.classpath=/download/sunJava/jdk1.2.1/lib/tools.jar
 wrapper.classpath=/home/httpd/classes/servlet-2.0.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/bin/cocoon.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/xalan_1_2_D02.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/servlet_2_2.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/bsf.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/turbine-pool.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/fop_0_13_0.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/xerces_1_2.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/stylebook-1.0-b2.jar
 wrapper.classpath=/usr/local/cocoon/cocoon-1.8/lib/bsfengines.jar

 Do you have any hint why it is not working? Thank you in advance. Regards,
 santos


Re: and esql

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 13 Dec 2000, Matthew Cordes wrote:

> Anyone have any idea why when i use the esql logicsheet with my own logic
> sheet it doesn't appear to work, the esql tags just appear in the output.
> I am using the version that came with 1.8 and I include the namespace
> in the logicsheet.

you'll need to declare the esql namespace in the page itself. yeah, this
sucks, it's a deficiency in the xsp processor in c1.

- donald