cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <con...@paradise.net.nz>
Subject RE: [Bug] Default-reader depends on JTidy!!!
Date Tue, 13 May 2003 08:36:28 GMT
Joerg wrote:

> What are the use cases for AutoMagicFileGenerator? Avoiding typing? I
> only see a use case, if the source can be of different types.

I agree, and I reckon even here a Selector would be better than a Generator,
like :
AutoMagicMimeTypeSourceSnifferSelector. e.g.

...
<map:select type="mime-type">
	<map:parameter name="url" value="{1}"/>
	<map:when test="text/html">
		<map:generate type="html" src="{1}"/>
	</map:when>
	<map:when test="image/svg+xml" src="{1}">
		<map:generate type="xml" src="{1}"/>
	</map:when>

etc.

Put all the AutoMagic stuff into a Selector, then you have magic PLUS you
have control over how you use the magic. :-)

Con


Mime
View raw message