Reviewing the "What is different between HTML and XHTML?" we have
All tags must close
or be single tags like
Tag names are case sensitive
All attributes must be name="value" (double quotes required, no more
multiple,checked,selected)
And all tags must nest properly
XHTML also has rules about which elements can appear where (the XHTML DTD)
NOTE: There are two XHTML DTD's of interest, Strict and Transitional.
Transitional is much more forgiving. I always View Source of www.w3.org to
get the strange DOCTYPE syntax for Transitional, and the path to the DTD
-Original Message-
From: D. Hageman [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 23, 2002 12:08 PM
To: Jonathan M. Hollin
Cc: [EMAIL PROTECTED]
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<[EMAIL PROTECTED]> ||
\\//
--
This message is intended only for the personal and confidential use of the designated
recipient(s) named above. If you are not the intended recipient of this message you
are hereby notified that any review, dissemination, distribution or copying of this
message is strictly prohibited. This communication is for information purposes only
and should not be regarded as an offer to sell or as a solicitation of an offer to buy
any financial product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or
error-free. Therefore, we do not represent that this information is complete or
accurate and it should not be relied upon as such. All information is subject to
change without notice.