You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by ws...@lexmark.com on 2002/08/23 21:30:31 UTC

Re: [OT] HTML to XHTML conversion


Another difference is that in XHTML, tag names are case sensitive, and it's
either the convention or standard to make all tag names lower-case. Also, tag
attributes have to be in pairs, so instead of <option selected> you have <option
selected="selected">. And values on the right side of an assignment like that
have to be in double quotes; the quotes are no longer optional. There are
probably a few more things I'm still forgetting.

Wes



"D. Hageman" <dh...@interlock.lexmark.com> on 08/23/2002 12:07:35
PM

To:   "Jonathan M. Hollin" <ne...@interlock.lexmark.com>
cc:   modperl%perl.apache.org@interlock.lexmark.com (bcc: Wesley
      Sheldahl/Lex/Lexmark)
Subject:  Re: [OT]  HTML to XHTML conversion



My suggestion would to just use a XML parser module like XML::LibXML.
Load the file up using the HTML loading functions and print it using the
XML printing functions ... since the only difference I can see between
HTML and XHMTL is that optional ending tags are no longer optional (per
XML spec) and single tags must be ended properly (per XML spec).



On Fri, 23 Aug 2002, Jonathan M. Hollin wrote:

> [OFF TOPIC]
>
> I am trying to find a module that can convert HTML to XHTML, but have
> drawn a blank on CPAN and GOOGLE.  Is there anything out there to do
> this other than HTML TIDY?
>
> I am developing a mod_perl CMS application at the moment.  All its
> output is compliant with XHTML Transitional.  But its users can create
> content that isn't (and are likely to) and I'd like to parse this and
> convert it XHTML before it goes into the RDBMS if possible.
>
> If nothing exists along these lines - would anyone like to collaborate
> on the development of a module for this purpose?  HTML::XHTML anyone?
>
>
>

--
//========================================================\\
||  D. Hageman                    <dh...@dracken.com>  ||
\\========================================================//