cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: [RT] Views for readers
Date Thu, 14 Aug 2003 12:17:42 GMT
On Thu, Aug 14, 2003 at 01:41:55PM +0200, Sylvain Wallez wrote:
> Jeff Turner wrote:
...
> ><map:view name="indexablecontent" from-position="first">
> > <map:select type="xml-type">
> >   <map:when test="docbook">
> >     <map:transform src="docbook2whatever.xsl"/>
> >   </map:when>
> >   <map:when test="tei">
> >     <map:transform src="tei2whatever.xsl"/>
> >   </map:when>
> >   <map:when test="msword">
> >     <map:transform src="word2whatever.xsl"/>
> >   </map:when>
> > </map:select>
> ></map:view>
> >
> 
> Ah, ok, the "strongly type pipelines" are a different wording for 
> "content-aware selectors" !

Ah yes.  Strange how the same concept can live two separate lives in
one's head ;)  Like the same class in two classloaders.

> >So http://mycocoonsite.com/foo.doc?cocoon_view=indexablecontent would
> >return XML representing the content of the .doc file.
> >
> >I described the same thing in a mail with subject 'Type-aware Views (Re:
> >Link view goodness)'.  Same need, different context, same proposed
> >solution.
> >
> 
> Not exactly : the use case here is that we have a binary file which is 
> normally sent as is to the browser using a reader. It is _not_ parsed as 
> an XML stream. So we can't attach a view to these kinds of URLs since 
> views provide a different _ending_ to a pipeline, meaning there must 
> exist at least a generator and optionnaly one or more transformers at 
> the point where processing is directed to the view.
> 
> So even content-aware selectors don't solve this problem...

Isn't the problem there that a <map:read> is a whole little pipeline unto
itself?  If it were broken into two atomic operations:

<map:generate type="binary" src="foo.doc"/>
<map:serialize type="binary"/>

then we could have a <map:view from-position="first"/> using a
content-aware pipeline, and everything would work.

I have the feeling that handling non-XML content in Cocoon is Just Wrong,
and that <map:read> is just a hack.  The fact that it doesn't integrate
with Views is a symptom of this.  In a theoretically pure world, we'd
either make Cocoon an XML-only framework and kill <map:read>, or make
Cocoon a generic data pipelining framework capable of handling and
transforming binary content.

Well it's a RT after all.. ;)

--Jeff

> Sylvain
> 
> -- 
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> Orixo, the opensource XML business alliance  -  http://www.orixo.com
> 
> 

Mime
View raw message