Bertrand Delacretaz wrote:

How about making it the other way round, by allowing Generators to read from Readers?

<map:match pattern="*.doc" default-view="binary">
<map:generator label="xml-content-for-indexing" type="wordToXml">
<map:read src="word-documents/{1}.doc" label="binary" mime-type=.../>
</map:generator>
<map:serialize type="xml"/>
</map:match>


Do you mean that the generator would be used if the "xml-content-for-indexing" view is selected ? This doesn't fit with the existing sitemap behaviour, since generators are _always_ added to the pipeline.

But what if we write it the other way around :
<map:read src="docs/{1}.doc">
 <map:generate src="docs/{1}.doc" type="wordToXml" label="content"/>
</map:read>

The meaning of the above is : if a view is requested, execute what's _inside_ the <map:read>. If it builds a complete pipeline then return its result, otherwise just perform the usual read operation.

Is that RT-ish enough?


Mmmmh... not as wild as Nicola Ken's. Try again ;-P

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




Reply via email to