Vadim,

I was thinking the same thing... Here is my resolved xsp after transforming
it using xalan:

<?xml version="1.0" encoding="UTF-8"?>
<xsp:page xmlns:xsp="http://apache.org/xsp";
xmlns:ctwig="http://www.pigbite.com/xsl";>
<xsp:logic>
        int counter = 0;

          private int count() {
                return counter++;
        }
</xsp:logic>

<page>
  <title>
    Basic XSP/Logicsheet Processing Example - BASIC03-01.XML
  </title>
  <greeting>
    <xsp:logic>
    String msg = "Hello World";
  </xsp:logic><xsp:expr>msg</xsp:expr>
        <xsp:expr>count()</xsp:expr>
  </greeting>
</page>
</xsp:page>

Any thoughts?

Thanks,

Alejandro

-----Original Message-----
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 11:49 AM
To: [EMAIL PROTECTED]
Subject: RE: Logicsheet Errors?!?!


> From: Calbazana, Al [mailto:[EMAIL PROTECTED]]
> 
> Ok...I've modified my logicsheet to have the logic block placed
properly...
> 
> Now.. It appears as though the generated .java file does not contain a
class
> name... The generated code looks like:
> 
> <snip>
> public class extends XSPGenerator {
> 
>   static {
>     dateCreated = L;
>     dependencies = new File[]{
>                      new File("/D:/path/to/xxxx.xsl"),
>                    };
>   }
> </snip>
> 
> Does anyone know where this name is pulled from?!  My guess is the
.xconf
> but changes do not affect it..

Class name is generated by xsp.xsl. Something is wrong here... Try to
apply your logicsheet manually to the source xsp (using Xalan from
command line), and examine result - it should be valid xsp. You may have
some other error in the logicsheet.

Vadim

> 
> Thanks for the tip in comparing this with the esql_xsp .java file!
> 
> Alejandro
> 
> -----Original Message-----
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 30, 2002 9:50 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Logicsheet Errors?!?!
> 
> 
> > From: Calbazana, Al [mailto:[EMAIL PROTECTED]]
> >
> > Hello,
> >
> > Ok... I have modified the ctwig example (the logicsheet sample) to
do
> a
> > little more work.. I am taking baby steps here, but want to
ultimately
> get a
> > few function calls in.  My problem is that when calling any private
> > functions, which are defined in my logicsheet, my page fails
> miserably.  I
> > am pretty sure I have pointed my cocoon.xconf file to the proper
> location
> > for my for logicsheet and hand constructed my logicsheet as
> recommended.
> > The error follows:
> >
> > org.apache.cocoon.ProcessingException: Language Exception:
> > org.apache.cocoon.components.language.LanguageException: Error
> compiling
> > basic03_01_xml:
> > Line 117, column 28:  '}' expected.
> > Line 119, column 4:  Statement expected.
> > Line 126, column 42:  Identifier expected.
> > Line 0, column 0:
> > 3 errors
> 
> So go and check generated Java source file. Then fix your logicsheet
> accordingly, so it generates valid Java.
> 
> PS Looks like you are declaring methods in a wrong place. Check esql
> logicsheet for a correct way of doing this.
> 
> Vadim
> 
> >
> > ***
> >
> > My logicsheet follows:
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet
> >   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >   xmlns:xsp="http://apache.org/xsp";
> >   xmlns:ctwig="http://www.pigbite.com/xsl";
> >   version="1.0">
> >
> > <xsl:template match="ctwig:greeting">
> >
> >   <xsp:logic>
> >     String msg = "Hello World";
> >     </xsp:logic>
> >   <xsp:expr>msg</xsp:expr>
> > </xsl:template>
> >
> > <xsl:template match="ctwig:greeting2">
> > <xsp:logic>
> >     static private int counter = 0;
> >
> >     private synchronized int count()
> >     {
> >             return counter++;
> >     }
> > </xsp:logic>
> >
> >   <xsp:expr>count()</xsp:expr>
> > </xsl:template>
> >
> > <xsl:template match="@*|node()" priority="-1">
> >  <xsl:copy>
> >   <xsl:apply-templates select="@*|node()"/>
> >  </xsl:copy>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> > ***
> >
> > My setup follows:
> > - Win2k
> > - Tomcat 4.0.1
> > - Cocoon2
> > - JDK1.3.1
> > - J2SDKEE 1.2.1
> >
> > Any help will be greatly appreciated.  I am at my wits end with
this!
> >
> > Thanks,
> >
> > Alejandro
> >
> >
> >
> >
**********************************************************************
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error please
notify
> > the system manager.
> >
> > This footnote also confirms that this email message has been swept
by
> > MIMEsweeper for the presence of computer viruses.
> >
> > www.mimesweeper.com
> >
**********************************************************************
> >
> >
> >
---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.com
> **********************************************************************
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


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

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

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

Reply via email to