cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabien Campagne <campa...@inka.mssm.edu>
Subject Re: XSP problem
Date Tue, 29 Feb 2000 17:50:51 GMT
MORÁVEK Peter wrote:

> I'm going to rewrite my CDPProducer to XSP. But I can't get my tag library
> to work.

Welcome to the club...



Is the following really what you want? As far as I understand xsp (not far),
xsp:expr delimits expressions, which need to be evaluated before their result
is "substituted". In your example, "in open" is not a valid java expression, and
so should generate a compilation error, but it does not, and this is the problem
I believe... The namespace stuff is another problem (I do reproduce it).

> Here are my files:

><xsl:template match="prefix:open">
>  <xsp:expr>in open</xsp:expr>
></xsl:template>


> -----------
> output that I want to gain
> -----------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
>                       "http://www.w3.org/TR/REC-html40/strict.dtd">
> <page>
>                 <p>in open</p>
>                 <p>in close</p>
>         </page>
> 
> <!-- This page was served in 8562 milliseconds by Cocoon 1.7 -->
> 

Can someone post an example of tag-library that actually works, plus the information
about the package versions necessary to run this. What are the important parameters 
to set to have this work, etc..

I tried the example given on http://xml.apache.org/cocoon/xsp.html, with Cocoon 1.7,
[xalan_0_19_3D01, xalan_0_19_3D03.jar, xalan_0_19_4.jar] and the following line
in the cocoon.properties file :

processor.xsp.library.example.java = file://usr/local/apache/htdocs/rbde/service/sample.xsl

The file URL points to the sample.xsl file given in http://xml.apache.org/cocoon/xsp.html,
as
installed on my system. cocoon runs on IRIX 6.5.

This is what I get:
-------------------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
                      "http://www.w3.org/TR/REC-html40/strict.dtd">
<?xml-stylesheet href="sample.xsl" type="text/xsl"?>
<page title="Time of Day">
                                           <p>
                                             To the best of my knowledge, it's now
                                             
                                             <example:time-of-day format="yy/MM/dd hh:mm:ss
aa"></example:time-of-day>
                                           </p>
                                         </page>

<!-- This page was served in 748 milliseconds by Cocoon 1.7 -->

ps. Peter, please do me a favor and email me anything you can find to
make this work, I will do the same to you. Thanks.

-- 
Fabien Campagne      -- Dept. of Physiology and Biophysics,   
phone: (212)-241-0860   Box 1218, Mount Sinai School of Medicine,
fax:   (212)-860-3369   One Gustave L. Levy Place,
---------------------   New York, NY 10029-6574 -----------------

Mime
View raw message