cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: [RT] Content Aggregation-another spin (long)
Date Wed, 24 Jan 2001 01:47:09 GMT
I won't pretend to be following this discussion closely enough, but...

Berin Loritsch <bloritsch@apache.org> wrote:
>We have a template for a site like this:
>
>+--------------------------+
>|          Header          |
>+---+------------------+---+
>|   |                  |   |
>| N |                  | N |
>| a |       Body       | e |
>| v |                  | w |
>|   |                  | s |
>+---+------------------+---+
>
>The JSP methodology is that it puts the basic look in one
>template and include the various aspects.  We can achieve
>this relatively crude functionality using XSP and the
><util:include-uri href="dest"/> approach.  XSL allows us
>to go farther with this template approach and specify
>a single namespace that a transformer (or aggregator)
>will use to substitute the different parts.
>
>Aggregation as a process is a mixture of Generation and
>Transformation at the same time.  (Technically it is a
>generator in the strictist form, but like XSP there is
>some substitution going on).
>
>This template approach is very powerful because it allows
>companies to leverage their existing expertise in site
>design and use existing tools like Adobe PageMaker.
>
>This is the way I envisage it working:
>
><!-- In the sitemap -->
>
><map:match pattern="**.html">
>   <map:aggregate template="templates/site.xhtml">
>     <map:part name="header">
>       <map:generate src="templates/header.xhtml">
>     </map:part>
>     <map:part name="nav">
>       <map:generate type="serverpages" src="docs/nav.xsp"/>
>       <map:transform src="stylesheets/nav2xhtml.xsl"/>
>     </map:part>
>     <map:part name="body">
>       <map:generate src="docs/{1}.xml"/>
>       <map:transform src="stylesheets/document2xhtml.xsl"/>
>     </map:part>
>     <map:part name="news">
>       <map:aggregate type="directory" template="templates/news.xml">
>         <map:part name="item" src="news/">
>           <map:transform src="stylesheets/news2xhtml.xsl"/>
>         </map:part>
>       </map:aggregate>
>     </map:part>
>   </map:aggregate>
>   <!-- further transformation could be done here -->
>   <map:serialize/>
></map:match>
>
><!-- In the template -->
>
><html>
>   <header><title>Your Title</title></header>
>   <body>
>     <div class="header"><agg:part name="header"/></div>
>     <div class="nav"><agg:part name="nav"/></div>
>     <div class="body"><agg:part name="body"/></div>
>     <div class="news"><agg:part name="news"/></div>
>   </body>
></html>

Minor point - that's not well-formed XML - you need namespace declarations!

>
><!-- In the news template -->
>
><news>
>   <newsitem><map:part name="item"/><newsitem>
></news>
>
>This really only adds one more Sitemap Component:
>aggregate

But there's no need to introduce a reverse-order templating system. It's 
Flexibility Syndrome! Almost the same ease of use can be achieved with 
literal-result-element stylesheets ( 
http://www.w3.org/TR/xslt#result-element-stylesheet
) in the same order as normal (stylesheets after generators). This would be 
more consistent with normal Cocoon usage.

Furthermore it has a lot more power if needed later, because you can use any 
kind of XSLT without changing your sitemap at all.




_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Mime
View raw message