On 05.Mar.2003 -- 01:14 AM, Amelie Cordier wrote:
> >
> > Try to use "get-parameter" instead of "get-string-parameter". That
> > should return the node as well. But you need to insert the variable with
> > copy-of, not value-of and in a place where it can safely expand to a
> > <xsp:expr/>.
> >
> 
> Thanks, it works "better" but the returned string is : "null" :( as if the
> parameter didn't went through my custom logicsheet. May be a sitemap
> problem  don't you think?

Don't think so. You can do two things now to work on your problem:

a) easiest is to look at the java source created from your xsp. it is
   located in case of tomcat in a subdirectory of
   $TOMCATHOME/work/Standalone/localhost/cocoon/ and has almost the
   same name as your xsp: foo.xsp -> foo_xsp.java
   Locate the place that corresponds to your tag and post the relevant
   lines.

b) if you have already setup an XSLT processor in your environment,
   you can try to do the transform manually. Look at the resulting xsp
   and see what happened.
   If you don't have setup an XSLT processor, you could try a pipeline
   along these lines:

   <map:match pattern="view-transform">
      <map:generate type="file" src="{request-param:source}"/>
      <map:transform type="xslt" src="{request-param:logicsheet}"/>
      <map:serialize type="xml"/>
   </map>

   Request the result by:
   
http://localhost:8080/cocoon/path/to/pipeline/view-transform?source=relative/path/to/my.xsp&logicsheet=relative/path/to/logicsheet.xsl

   Perhaps you should setup a little HTML form for this.

   Or you can all the included xalan from the commandline (must be in
   your classpath):
   java org.apache.xalan.xslt.Process -IN my.xsp -XSL my.xsl

   Or you could use the great xslt-process-mode for emacs:
   http://xslt-process.sourceforge.net/ 
   This allows to step through your logicsheet!
   
> 
> By the way, what do you mean by "in a place where it can safely expand to a
> <xsp:expr/>" ?

A place where <xsp:expr/> would make sense and does not violate java
syntax. Counter examples

    <xsp:logic>
        String foo="";
        <xsp:logic>a</xsp:logic>  //wrong!
        foo = "bar";

        foo = "bar<xsp:expr>a</xsp:expr>bar"; // wrong!

        // some tag expand to more than an xsp:expr (that is bad
        // but sometimes without alternative)
        // the following does not work:

        foo = "bar" + <xsp:logic> String yada = null; for (int i=0;
                i<yada.length(); i++) { <br/> }; </xsp:logic>

    </xsp:logic>


        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

Reply via email to