You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rayed Al-Rashed <ra...@mail.com> on 2000/10/29 02:15:24 UTC

FP & ESQL taglib don't work in the same page

Hello everyone,

I am trying to use FP taglib and ESQL taglib in the same page, but I
get an error without writing any statements, and both taglib work fine
separately, any ideas on how to resolve this problem, I am using
cocoon 1.8
_____________________________________________
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page 
  language="java" 
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
>

<page>
<!--  <fp:redirect>article.xml</fp:redirect> -->
</page>
</xsp:page>

_____________________________________________
Error found handling the request.

java.lang.Exception: XSP Java Compiler: Compilation failed for
_test.java
66: Type expected.
((Element) xspCurrentNode).setAttribute(
^
1 error

at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java,
Compiled Code)
at java.lang.Exception.(Exception.java, Compiled Code)
at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java,
Compiled Code)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java,
Compiled Code)
at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java,
Compiled Code)
at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled
Code)
at java.lang.Thread.run(Thread.java:479)
_____________________________________________


Thnaks

- Rayed

Re: FP & ESQL taglib don't work in the same page

Posted by Konstantin Piroumian <KP...@flagship.ru>.
Fixed stylesheet.
I simply changed  the xsp:page template's 'match' attribute's predicate:

<xsl:template match="xsp:page/*[not(starts-with(name(.), 'xsp:'))]">
...

and now it works fine.

Best regards,

Konstantin Piroumian
Software engineer

Protek Flagship LLC
Phone: + 7 095 795 0520 (add. 1288)
Fax: + 7 095 795 0525
E-mail: kpiroumian@flagship.ru
http://www.protek.com

> On Mon, 30 Oct 2000, Konstantin Piroumian wrote:
>
> > Yes, this is a bug in the FP taglib's stylesheet.
> > I have already fixed it and mailed to the author (Jeremi Quinn) for
tests.
> >
> > I can send you the fixed stylesheet.
> > Or maybe it's better to ask Jeremi.
>
> jeremy's awfully busy - if you could flip it my way i'll check it in if
> it's sane and jeremy can yell at me (and revert the commit) if he doesn't
> like it. :)
>
> - donald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>

Re: FP & ESQL taglib don't work in the same page

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 12:21 -0500 30/10/00, Donald Ball wrote:
>On Mon, 30 Oct 2000, Konstantin Piroumian wrote:
>
>> Yes, this is a bug in the FP taglib's stylesheet.
>> I have already fixed it and mailed to the author (Jeremi Quinn) for tests.
>>
>> I can send you the fixed stylesheet.
>> Or maybe it's better to ask Jeremi.
>
>jeremy's awfully busy - if you could flip it my way i'll check it in if
>it's sane and jeremy can yell at me (and revert the commit) if he doesn't
>like it. :)

Thanks Guys,

I did it yesterday ....

Two little fixes (I hope) to the FP TagLib:

1. applied Konstantin's suggested patch to allow FP to work better with
other taglibs.

2. Fixed poor support for "config elements" (from, to, select, mode)

	ie.

	<fp:write to="thing" select="blah">
		<request:get-parameter name="blag"/>
	<fp:write>

could be rewritten like this, if you need dynamic parameters:

	<fp:write to="thing" select="blah">

		<to><xsp:expr>yourMethod()</xsp:expr></to>
		<select><request:get-parameter name="your.selection"/></select>

		<request:get-parameter name="blag"/>
	<fp:write>

There is a better chance of them working now :)

If I had followed the "standards" properly, these paramaters should be called:

	<fp:select/>
	<fp:to/>
	<fp:from/>
	<fp:mode/>

They are already like this in the new version (yet to be finished) plus
other changes to the DTD (you are warned :) would it be best to implement
this change now? It think maybe I will, I cannot imagine anyone would have
successfully used these config params yet, they mostly would not have
worked.

If I hear nothing to the contrary, I will apply this change later today.


Thanks for your patience !

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: FP & ESQL taglib don't work in the same page

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 30 Oct 2000, Konstantin Piroumian wrote:

> Yes, this is a bug in the FP taglib's stylesheet.
> I have already fixed it and mailed to the author (Jeremi Quinn) for tests.
> 
> I can send you the fixed stylesheet.
> Or maybe it's better to ask Jeremi.

jeremy's awfully busy - if you could flip it my way i'll check it in if
it's sane and jeremy can yell at me (and revert the commit) if he doesn't
like it. :)

- donald


Re: FP & ESQL taglib don't work in the same page

Posted by Konstantin Piroumian <KP...@flagship.ru>.
Yes, this is a bug in the FP taglib's stylesheet.
I have already fixed it and mailed to the author (Jeremi Quinn) for tests.

I can send you the fixed stylesheet.
Or maybe it's better to ask Jeremi.

Regards,
  Kot.

----- Original Message ----- 
From: "Donald Ball" <ba...@webslingerZ.com>
To: <co...@xml.apache.org>
Sent: 29 ??????? 2000 ?., ??????????? 05:55
Subject: Re: FP & ESQL taglib don't work in the same page


> On Sat, 28 Oct 2000, Rayed Al-Rashed wrote:
> 
> > Hello everyone,
> > 
> > I am trying to use FP taglib and ESQL taglib in the same page, but I
> > get an error without writing any statements, and both taglib work fine
> > separately, any ideas on how to resolve this problem, I am using
> > cocoon 1.8
> > _____________________________________________
> > <?xml version="1.0"?>
> > <?cocoon-process type="xsp"?>
> > <xsp:page 
> >   language="java" 
> >   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >   xmlns:esql="http://apache.org/cocoon/SQL/v2"
> >   xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
> > >
> > 
> > <page>
> > <!--  <fp:redirect>article.xml</fp:redirect> -->
> > </page>
> > </xsp:page>
> > 
> > _____________________________________________
> > Error found handling the request.
> > 
> > java.lang.Exception: XSP Java Compiler: Compilation failed for
> > _test.java
> > 66: Type expected.
> > ((Element) xspCurrentNode).setAttribute(
> > ^
> > 1 error
> 
> as far as i can tell, this is a bug in the fp logicsheet - it's trying to
> put some method level logic at the class level. i'll try to delve more
> deeply into it and see if there's a simple fix.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 


Re: FP & ESQL taglib don't work in the same page

Posted by Donald Ball <ba...@webslingerZ.com>.
On Sat, 28 Oct 2000, Rayed Al-Rashed wrote:

> Hello everyone,
> 
> I am trying to use FP taglib and ESQL taglib in the same page, but I
> get an error without writing any statements, and both taglib work fine
> separately, any ideas on how to resolve this problem, I am using
> cocoon 1.8
> _____________________________________________
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <xsp:page 
>   language="java" 
>   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>   xmlns:esql="http://apache.org/cocoon/SQL/v2"
>   xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
> >
> 
> <page>
> <!--  <fp:redirect>article.xml</fp:redirect> -->
> </page>
> </xsp:page>
> 
> _____________________________________________
> Error found handling the request.
> 
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _test.java
> 66: Type expected.
> ((Element) xspCurrentNode).setAttribute(
> ^
> 1 error

as far as i can tell, this is a bug in the fp logicsheet - it's trying to
put some method level logic at the class level. i'll try to delve more
deeply into it and see if there's a simple fix.

- donald