Re: [xml] xmllint and HTML

On Thu, Oct 30, 2003 at 04:07:07PM +0000, Alberto Manuel Brandão Simões wrote:
OK. It is a good point.
only one more thing: xhtml is not valid html?
I mean, the following behaviour is expected?

[albie natura albie]$ xmllint --html index.html > _.xhtml

  I would expect _.xhtml to be SGML HTML there

[albie natura albie]$ xmllint --html _.xhtml > /dev/null
_.xhtml:1: error: htmlParseStartTag: invalid element name
<?xml version="1.0" standalone="yes"?>

  Apparently it's not the case, sounds like a bug

_.xhtml:2: error: Misplaced DOCTYPE declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

  Considering your question it doesn't make much sense.
xhtml is XML. This is not SGML. XHTML and SGML HTML do not have 
similar validity rules. "valid" has a very strict meaning in XML.
I don't know what meaning you're trying to give to it in your question.
And  xmllint --html index.html is not supposed to generate XHTML .


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]