cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <>
Subject Re: Problem with XSP
Date Mon, 27 Mar 2000 22:48:41 GMT
Hi Hervé,

On Mon, 27 Mar 2000, Hervé Guidetti wrote:
> I've read your XSP Processor - A Primer Web site. Very well done. Thanks a
> lot for your work.
Thanks! More docs are coming: a mini-tutorial on logicsheet authoring and
a description of the core logicsheets and their associated utility classes.

> I've tried the two first example (the Date). The first one works. The second
> one (with the tag lib) doen't.
> <xsp:page
>   language="java"
>   xmlns:xsp=""
>   xmlns:example=""
>   <page title="Time of Day">
>     <p>
>       To the best of my knowledge, it's now
>       <!-- Substitute time of day here -->
>       <example:time-of-day format="yy/MM/dd hh:mm:ss aa"/>
>     </p>
>   </page>
> </xsp:page>
> Why Cocoon doesn't transform the <example:time-of-day> tag ?
> Where do I "said" to Cocoon the existence of the mylib file ? And how ?

For this xsp page to work, it's necessary that you either:

1) implicitly associate a logicsheet with the "example"
   namespace, or
2) explicitly associate your logicsheet with your particular
   xsp page (the preferred method for non-core taglibs)

Logicsheets are implicitly  associated with namespaces
in the xsp section of the "" conf file.
For the above namespace/logicsheet pair, for instance,
your entry might look like:

  processor.type.xsp = org.apache.cocoon.processor.xsp.XSPProcessor
  . . . = file:///www/logicsheets/example.xsl
  . . . 
Here, you're indicating you have an xsp logicsheet ("example.xsl")
which is associated with the "example" namespace and uses Java
as the scripting language.

This is the way xsp works in Cocoon 1.6

If you've downloaded the latest Cocoon 1.7 you may prefer to
use the simpler approach of explicitly associating your logicsheet
with your xsp page without a namespace association.

This is achieved by means of the <?xml-logicsheet?> processing
instruction, like in:

  <?xml version="1.0"?>
  <?cocoon-process type="xsp"?>
  <?xml-logicsheet href="file:///www/logicsheets/example.xsl"?>
  . . .
    . . .

Note that you still must declare the "example" namespace in your
<xsp:page> root element. This is necessary for regular namespace
processing (you're using <example:time-of-day>) but is _not_
[any longer] related to logicsheet processing.



View raw message