You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by James & Sue Ann Birchfield <js...@home.com> on 2000/03/01 01:25:52 UTC

RE: XSP problem

Check out http://24.3.47.214:8080/cocoon/mail-xsp/index.html

You will find a working example there.

=====================================
James Birchfield
Chief Technology Officer
jmbirchfield@proteus-technologies.com
http://www.proteus-technologies.com
=====================================

-----Original Message-----
From: campagne@mx2-w.mail.home.com
[mailto:campagne@mx2-w.mail.home.com]On Behalf Of Fabien Campagne
Sent: Tuesday, February 29, 2000 12:51 PM
To: cocoon-dev@xml.apache.org; MORÁVEK Peter
Subject: Re: XSP problem


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 -----------------