cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [Bug] Default-reader depends on JTidy!!!
Date Tue, 13 May 2003 07:03:34 GMT
Stefano Mazzocchi wrote:
> on 5/11/03 5:35 PM Carsten Ziegeler wrote:

...

>>Yes, and this works fine, but *if* you know what kind of stream you
>>are connecting to and *if* you know that Cocoon does handle this kind
>>of stream automatically for you, where is the problem?
> 
> 
> The problem is on errors: implicit behavior makes error recovery harder.

...

>>Now, I still don't see the point, what's wrong with saying:
>><map:generate src="thesite.html"/>
>>Why should I have to use
>><map:generate src="thesite.html" type="html"/>
>>It's in my eyes redundant, because thesite.html contains a mime-type
>>(html) and that's all I need to know.
> 
> 
> In my eyes, anything that the sitemap does implicitly is a potential
> source of user misunderstanding and hard error recovery. This is based
> on a *direct* experience, and I think I have enough cocoon knowledge to
> go around problems.

...

>>Currently you can include html pages that are automatically transformed
>>into xhtml. If you remove the toSAX method mentioned above this is
>>not possible any. So, a different solution is here needed.
>>And please, don't tell me that I should include an internal pipeline
>>that uses the html generator.
>>
>>This is - in my eyes - not user friendly.
> 
> 
> I disagree. I believe it's much more user friendly to have deal
> *coherently* with the URI space. Equating verbosity with user
> unfriendly-ness is, IMO, a pretty bad equation.
> 

...

> Look: I found it a barrier to include an .html file (which was valid
> XHTML!) and see a JTidy-non-found error? where did that error come from?
> I'm not using JTidy anywhere in my sitemap!
> 
> *this* took me half an hour to find out. It would have taken me a few
> seconds to cut/paste a pipeline to deal with adapting HTML content if I
> really wanted to.
> 
> (besides: how do you know the mime-type of a file on disk before
> parsing? don't tell me you match extensions!)
> 
>>Users want - for example cinclude html directly (and please
>>take this only as one example) and the users don't want complicated
>>ways of doing it.
> 
> I can tell you want *I* want: coherence and explicitness in the sitemap.
> Verbosity comes in second place.
> 
>>With changes like these we make Cocoon harder and harder to use.
>>But again, if I'm the only one, remove it from the SourceResolver.
> 
> +1 to remove it.
> 
> other votes?

+1 to remove it and explicitely saying the type in the sitemap

Of course, it's a bit redundant. But the user must get to know what he 
is happening, auto-magic stuff should be removed as far as possible.

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

How to differ between HTML and XHTML? Both have text/html mime-type and 
often both have .html as extension. But when JTidy comes across the 
namespace declaration, you will have your first error, won't you?

Are there so many users trusting on auto-magic if we have a 
HTMLGenerator? What happens if we change the auto-magic? The user won't 
get any hint on the cause of the error.

Of course, it's "harder to use" Cocoon in the sense of more typing, but 
it's really simpler to use in the sense of understanding what happens 
and where a possible error comes from.

Joerg


Mime
View raw message