cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: [C2] (hopefully) last sitemap major changes
Date Fri, 30 Jun 2000 21:09:02 GMT
Stefano Mazzocchi wrote:
> 
> 1) namespace:
> 
> from
> 
>  http://xml.apache.org/cocoon/sitemap/1.0
> 
> to
> 
>  http://apache.org/cocoon/sitemap/1.0
> 
> to avoid possible virtual-host collisions in the future since the ASF is
> thinking about removing all apache virtual hosts or giving a different
> virtual host for each project. The above is independent of the result of
> such URI refactoring and is designed with forward compability in mind.

+1

> 2) filter becomes transformer
> 
> One main reason for this: filter and its verbe are the same word in
> English... this causes big troubles in sitemap validation, while
> "transform" and "transformer" are different words and have different
> semantics inside the sitemap.

+1

> 3) increased redirection capabilities
> 
>  <map:redirect-to uri="..."/>
>  <map:redirect-to resource="..."/>
> 
> a "resource" being a
> 
>  <map:resource name="...">
> 
> where the "name" attribute is the ID and "resource" is the IDREF.

We have still type= and name=. As there were no comments on it I thought
you would make them consistent. But this didn't happend so I vote for
using name= as IDs and type= as IDREFs.

> 
> 5) added the notion of "error handling" (which includes metaevents
> handling) as such
> 
>  <map:pipeline>
>   <map:match ...>
>    ...
>   </map:match>
>   <map:handle-errors>
>    <map:transform src="./style/error-page2html.xsl"/>
>    <map:serialize/>
>   </map:handle-errors>
>  </map:pipeline>

First some glossary: 
- a pipeline is the block enclosed by <map:pipeline> and </map:pipeline>
- a pipe is a assebled chain of a generator, transformers and a
serializer choosen by matchers, choosers, mounts and/or resources.

Do I understand it right, that the hole
<map:handle-errors></map:handle-errors> block is a pipe for itself with
the surrounding pipeline (excluding the handle-errors block) as its
generator. Every component (including matchers, chooser, etc.) of the
pipeline can fire event to that handle-error block and as soon as an
(maybe special) Exception is thrown the handle-errors block becomes the
active pipe which writes to the OutputStream instead of the failing
pipe. 

There is a need to extend existing Interfaces or introduce new ones to
have access to the ContentHandler of the handle-errors block.

> 6) added the notion of "views" and pipeline "labels".
> 
> for example
> 
>  <map:view name="content" generate-from="content">
>   <map:serialize type="xml"/>
>  </map:view>
> 
>  <map:view name="schema" generate-from="content">
>   <map:transformer type="schema"/>
>   <map:serialize type="xml"/>
>  </map:view>
> 
>  ....
> 
>   <map:label name="content">
>    <map:generate src="./file/document.xml"/>
>   </map:label>
>   <map:transform src="./style/doc2html.xsl"/>
>   <map:serialize/>
> 
> where it can be viewed as
> 
>  g -(content)-> t -> s   [normal view]
>         +-----> t -> s   [schema view]
>         +----------> s   [content view]

I see a lot of new Interfaces introduced getting that to work. And also
some changes to the existing ones. You too?
> 
> The sitemap allows each "producing" component (generators and
> transformers) to attach "default labels" to these components so that
> 
>   <map:label name="content">
>    <map:generate src="./file/document.xml"/>
>   </map:label>
>   <map:transform src="./style/doc2html.xsl"/>
>   <map:serialize/>
> 
> is totally equivalent to
> 
>   <map:generate src="./file/document.xml"/>
>   <map:transform src="./style/doc2html.xsl"/>
>   <map:serialize/>
> 
> if the "parser" generator (which here is default), has attached as
> default label "content"... such as in
> 
>   <map:generators default="parser">
>    <map:generator type="parser" src="..." label="content"/>
>   </map:generators>
> 
> this should allow us to use sitemaps for simple views (such as content
> or schema) without introducing too much sitemap-creation overhead and
> reduce readability with a bunch of <label> tags.

I don't think I have that all grasped but my intuition says it will come
on the right way.

> This, for me, it's the last working draft for Cocoon 2.0... it may not
> be perfect, but it covers up everything I wanted to cover with this
> release.

<snip/>

> So, I consider it feature-frozen from now.
> 
> Let's polish it and let's rock and roll implementing it :)

Uff, finaly. Now we can implement that monster leisurely :)

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

Mime
View raw message