On Tue, Jun 13, 2006 at 11:14:02PM +0200, Nicolas François wrote:
I've committed the Xhtml.pm patch.
For the testsuite, I've created a new set of tests (data-25). As long as
the Html module still exists, I would prefer to keep its testsuite.
Fair enough. Thanks for commiting.
> The patch also folds in the previous patch to Xml.pm I sent
> earlier this week, which prevents Xml.pm from eating SSI
> statements ( <!--# ... --> ). While it's necessary for my
> application, it'll have to be moved to Xhtml.pm once the API
> to modify @tag_types has been added.
I see no problem in committing this one. Can you just comment a little bit
more on SSI?
Yes: Server Side Includes; they're a module commonly found
in Apache which allows simple server-side scripting in the
html files, most commonly including files. The most typical
use would be something along the lines of:
<html>
<!--#include virtual="header.html" -->
Blah blah
<!--#include virtual="footer.html" -->
</html>
Basically it makes up for HTML not having any way to include
another file: upon serving the file, Apache will scan
through it and execute all the statements, and replace the
#include with the actual content of the file. From the
client side, you never know anything is going on.
So it's a hack on HTML really, using the semantics of
comments for something else. It's not technically breaking
anything because the client is still getting well formed
XHTML.
This is why I don't think it belongs in Xml.pm for the long
term: it's not a W3C standard at all. At the same time, I
suppose it wouldn't hurt users of proper XML.
Is it a common way of adding comments?
Not really comments at all... I don't mind my comments being
removed :-)
Do you know of other similar method?
Well, you can easily replace it with PHP (something like
<?php include "file.html" ?> IIRC) and probably a million
other methods. I'm afraid PHP would be a much heavier
method to do the work than SSI is.
HTH,
Y.