You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Tatsuhiko Miyabe <ha...@ybb.ne.jp> on 2005/05/05 16:06:54 UTC

[OT] The CSS-like logicsheets.

Dear Cocoon-Dev members,

First, please excuse me if it is improper.

My name is Tatsuhiko Miyabe, a student.
Please let me introduce CSS-like logicsheet that I developed.

For example, if you would like to turn text to red,
you can write following template:

<span cls-logic="[present: a; |attribute: 'style' 'color: Red']">
This text will be turned red.
</span>

cls-logic="[present: a; |attribute: 'style' 'color: Red']"
says "if present value _a_ then filter to set style attribute has value 'color: Red;'".

Also, this template can be separated to two files:

-- CSS-like logicsheet.
.if-present-a-turn-it-to-red {
  [
    present: a;
    |attribute: 'style' 'color: Red'
  ]
}
--

-- Template
<span cls-class="if-present-a-turn-it-to-red">
This text will be turned red.
</span>
--

3 years ago, I was impressed with code generation mechanism of XSP logicsheet.
But also, I began to think while hacking it.
"Logicsheet is very powerful, but it seems pretty complex.
Perhaps, there might can be a Cascading Logicsheet for the XSP logicsheet as
there is Cascading Stylesheet for the XSLT stylesheet."

I started coding and made experiments on apply to a forum application and
shopping cart,etc.
And, it has been understood to be able to endure practical use powerful enough 
recently. 

This is a forum application war packege.

http://www.port4.info/release/pasta-forum.war
[Scanned by Norton Antivirus]

Please deploy it on servlet engine and access to
http://hostname:port/pasta-forum/forum.html

And this is the all source code of the "Pasta" template engine.

http://www.port4.info/release/pasta-0.7.1b.tar.gz
[Scanned by Norton Antivirus]

This is the specification of "CLS" processing system.
(Sorry, this is machine translation from japanese.
Probably very heavy.)

http://babelfish.altavista.com/babelfish/trurl_pagecontent?url=http%3A%2F%2Fwww.port4.info%2Fpasta%2Fbasic%2Fspec.html&lp=ja_en
[original: http://www.port4.info/pasta/basic/spec.html]

Pasta based Excalibur Fortress container and, borrowd many ideas from Cocoon.
But almost parts are different to Cocoon.
For example, Pasta can construct SAX pipeline for each "element".

Unforunally, there are not a lot of people interested
in Cocoon and Avalon in Japan
(I'm not.I'm very interested in Cocoon and respect its developers!). 
It is one of the reasons to post this mail. 

Three attachments are template, style and logic of top-page of forum
application.
They are separeted completely and a part of completed forum application.

Sincerely,
-- 
Tatuhiko Miyabe
harumanx2000@ybb.ne.jp
http://www.port4.info/