[ic] Usertag: table_organize question
Jon Jensen
jon at endpoint.com
Tue Jan 25 10:45:04 EST 2005
On Tue, 25 Jan 2005, Gary Norton wrote:
> I am working on updating my modules to validate against XHTML 1.0
> Transitional and want to make a change to the table_organize tag.
>
> Tags are case sensitive in XHTML so I need to change <TD> to <td> and </TD>
> to </td> (the embed function of table_organize requires the case differences
> in order to determine which code it should manipulate, and which code it
> should not).
You could just postprocess the final output to lowercase the HTML tags. At
the end of the sub, remove the "return $out . $postamble;" and put this
there:
$out = $out . $postamble;
$out =~ s:(</?TD>): lc($1) :eg;
return $out;
That's untested, but the general idea should work.
> I tried to search for regex syntax on the "s:" notation (didn't know the
> proper terminiology, so results were sparce). It seems that this syntax is
> deprecated in favor of the s///s (I am making an assumption that the trailing
> "s" is for singleline).
[snip]
> Can anyone give me a bit of help here on this? Have I made the correct
> assumptions about the s:::s syntax?
No, there's nothing deprecated about s::: -- it's just a different
delimiter. And the trailing "s" modifier is fine too. Read the "perlre"
manpage closely.
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...
More information about the interchange-users
mailing list