cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <>
Subject RE: [RT] Improving Views
Date Thu, 21 Aug 2003 00:42:03 GMT
Sylvain Wallez wrote:

> Relating this to the newly introduced virtual components, we can 
> consider the view definition as a virtual serializer.
> Example :
> <map:serializers>
>   <map:serializer type="xml" src="oacs.XMLSerializer"/>
>   <map:serializer type="pretty-xml">
>     <map:transform type="xslt" src="xml2pretty.xsl"/>
>     <map:serialize type="xml"/>
>   </map:serializer>
> </map:serializers>
> <map:views>
>   <map:view name="content" from-label="content" serializer="xml"/>
>   <map:view name="pretty-content" from-label="content" 
> serializer="pretty-xml"/>
> </map:views>

I like this, and while we're at it - I'd also like to see the ability to define different
views with the same name. I don't think this is possible at present. e.g.

   <map:view name="search" from-label="tei" serializer="tei-search"/>
   <map:view name="search" from-label="html" serializer="html-search"/>
   <map:view name="search" from-label="svg" serializer="svg-search"/>

When accessing a pipeline using a view called X, the pipeline processor could branch off from
the main pipeline at the FIRST label Y for which there exists a <map:view> with @name="X"
and @from-label="Y". 

This would make it easy to define e.g. a "search" view of heterogeneous pipelines, with different
types of content. Typically the label attributes in the pipeline would refer to the TYPE of
the content at that stage in the pipeline.



View raw message