[Po4a-devel] Translatable attributes in HTML

Yves Rutschle debian.anti-spam at rutschle.net
Thu Aug 9 07:58:44 UTC 2007


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?)

> To use the current Xhtml module, you could move the
> opening <divs from the end of the banner to the beginning
> of school.html, and make a footer which closes what the
> header opened.  (I understand that it may mean to change a
> lot files in this server)

This is what we went through when we moved to using
Xhtml.pm. The goal being that every file is individually
well-formed, and you only ever include entire sections. It
seems to work well in practice, and there are several
reasons it's a good idea: It's cleaner, it allows the Web
developers to work on proper XHTML, and it lets you use
automated tools (because this problem is not po4a-specific:
most every XML/Xhtml tool out there will choke on SSI or
non-well-formed code).

In the end, I'd say it was worth the pain, especially
considering that most of it can be automated with a good vi
macro.

Y.



More information about the Po4a-devel mailing list