On Thu, Aug 09, 2007 at 09:58:44AM +0200, debian.anti-spam(a)rutschle.net wrote:
On Wed, Aug 08, 2007 at 05:34:33PM +0200, Nicolas François wrote:
> It seems it's a common feature (SSI), so I will consider implementing it
> in the Xhtml module.
I know talk is cheap, but I don't have time to code this
myself, however I'd suggest doing differently and allowing
Xhtml.pm to call an external pre-filter program instead of
doing the SSI work directly in Xhtml.pm. This way if someone
was using the C preprocessor, or m4, or whatever to include
files the whole process still works.
In fact, it might make sense to have such an option at a
more generic level (Xml.pm, or even for every file?)
The Xhtml module only contained a configuration with a set of tags.
To implement SSI, I just needed to add an option and divert the f_extract
method of tag !--# to a specific extraction function. So it was clean
enough for me.
Providing support for filters (for any module) is a good idea.
I will add it to my TODO list for 0.33.
It may just be a matter of changing the Transtractor's read() to support
reading from "filter < file |" or "filter file |"
Best Regards,
--
Nekral