cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sergeant <>
Subject Re: [Cocoon2] XSP 2.0 changes list
Date Mon, 22 May 2000 16:39:44 GMT
First off, to whom it concerns: My email address is -
someone at has kindly (and unbeknownst to me) setup a
forwarding to But for future please use

More comments below...

On Mon, 22 May 2000, Stefano Mazzocchi wrote:

> 2) Deprecation of <xsp:content>
> Implementations show that xsp:content is not useful to XSP semantics.
> Since very element that doesn't belong to the XSP controlled namespaces,
> will be automatically interpreted as content.

Having spent exactly 1 day with XSP (including implementation), I'm in way
over my head here, but from the example:

. . .
    String timeOfDay = (new SimpleDateFormat("aa")).format(new
    if (timeOfDay.equals("AM")) {
    } else {
. . .

How would Morning and Afternoon be separated from code above?

> 3) Optional use of <xsp:page> for pure-taglib usage.
> This would allow a page like
>  <whatever>
>    Today is <util:date/>
>  </whatever>
> to be processable by the XSP engine without requiring to wrap everything
> by <xsp:page>. This will also remove the problem with having to define
> one and only one content element after <xsp:page>. This is mostly useful
> for taglib usage.

I think my implementation allows this already, but I'd have to check. If
not it's a fairly trivial change.

> 4) Namespace-driven taglib evaluation
> You should not need to use <xsp:logicsheet> (as currently implemented in
> Cocoon 1.x) to turn on taglib processing, but it should be automatic,
> given the XSP engine with configurations that associate the specific
> logicsheet to the registered namespace.

Interesting... I had no idea Cocoon's XSP _didn't_ do this, and that's how
I wrote the Perl implementation. Each sub-taglib is a subclass of the XSP
class (Apache::AxKit::Language::XSP), and simply calls
__PACKAGE__->register_taglib(<namespace>). Obviously register_taglib is
just implemented in the base class and figures everything out for you,
setting up a hash of package->class mappings. When there's an entry for a
namespace it uses that class, when there isn't, it calls a default
function. (all this is done using XML::Parser's SAX-like methods).

I assumed this was how the SQL taglib was implemented... :-)


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.

View raw message