On Nov 8, 2007 8:57 PM, Dan Scott <[EMAIL PROTECTED]> wrote:
>
> On 08/11/2007, Dan Scott <[EMAIL PROTECTED]> 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).

I wonder if checking the namespace on the element would be more
appropriate, maybe even as some sort of configurable map of
transformations?  Let's do this now so we're more xhtml compliant, but
I'd like to see more discussion on this -- even if it's just to see if
the idea is worth our time.  IOW, is mod_xmlent something that others
may want to use?  I'd think so, it makes translations easy to create,
but I don't think (maybe it is?) it's general enough just yet for
others.

Anyway, thanks Dan.  Apply at will! :)

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  [EMAIL PROTECTED]
 | web:  http://www.esilibrary.com

Reply via email to