rexml/httpwrite, why must you mock me?

Daniel Sheppard daniels at pronto.com.au
Tue Sep 27 20:48:57 EDT 2005


My initial thought was to put in an allowed_content_type directive, but
then how should MouseHole perform the document translation?

If it's served as text/xml, in some cases you'll want it processed by an
RSS Handler to turn it into an RSS document, in others you'll want it
handled by the XML handler as a xml document, in others you might just
want a Plain Text Handler to manipulate it directly as a string.

The attachment in my previous email undoes the work of rexml/httpwrite
and does a scan of the document in the write_output method of
HtmlDocumentConverter to make sure the write elements are left empty - I
take it the only place that's actually causing this problem is the
<script/> element?

-----Original Message-----
From: mousehole-scripters-bounces at rubyforge.org
[mailto:mousehole-scripters-bounces at rubyforge.org] On Behalf Of why the
lucky stiff
Sent: Tuesday, 27 September 2005 4:27 PM
To: mousehole-scripters at rubyforge.org
Subject: Re: rexml/httpwrite, why must you mock me?

Daniel Sheppard wrote:

> Then I noticed something strange - my rewritten feed had no content in

> the <link/> elements. Apparently, the reason for this is the 
> rexml/httpwrite.rb code - which seems to be designed to ensure that 
> HTML elements that aren't meant to have content don't end up having 
> any content... Why does this code exist? Shouldn't it by the task of
the 
> tree builder to put the right things in the right nodes? Otherwise, 
> wouldn't it be better to have something walking the tree and trimming 
> the bad nodes before it gets output?
>
Sounds like HtmlDocumentConverter just needs REXML::HtmlElements to go
along with it, leaving regular REXML::Elements uneffected.

Regarding the rewrite of non-HTML goods, maybe a `mime_type' directive
or `allow_non_html' directive?

_why

_______________________________________________
Mousehole-scripters mailing list
Mousehole-scripters at rubyforge.org
http://rubyforge.org/mailman/listinfo/mousehole-scripters


#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################



More information about the Mousehole-scripters mailing list