[OPEN-ILS-DEV] Re: PATCH for review: Make mod_xmlent respect XHTML empty elements

Dan Scott denials at gmail.com
Thu Nov 8 20:57:00 EST 2007


On 08/11/2007, Dan Scott <denials at gmail.com> wrote:
> With some of the recent XHTML cleanup I've been doing of the OPAC, I
> had become aware that mod_xmlent was treating every element as though
> it would contain content, and therefore changed empty elements like
> <link blah />, <img blah />, and <br /> to <link blah></link>, <img
> blah></img>, and <br></br>.
>
> Not heinous, but I figured we should be able to do better than that.
> So I pulled the list of empty elements from xhtml1-transitional.dtd
> and modified mod_xmlent.c to treat empty elements properly.
>
> I'm posting this to the list rather than applying it directly in case
> my semi-rusty C has any obvious "oops!" moments in it. If there's no
> objection or stated need for reworking the patch, I'll apply it in a
> day or two.

Hah - attached is a quick revision, because I forgot to limit the
cases for tag-minimization to those where content-type = 'text/html'
(in case we're parsing other file types).

-- 
Dan Scott
Laurentian University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_xmlent.c.take2.patch
Type: application/octet-stream
Size: 3469 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071108/c6f646cc/mod_xmlent.c.take2.obj


More information about the Open-ils-dev mailing list