Re: [xml] xmllint and HTML



On Thu, Oct 30, 2003 at 02:59:42PM +0000, Alberto Manuel Brandão Simões wrote:
Hi!

Although I may seem complaining, do not see it like that. Maybe it is my
bad English :)

1. I was used to use xmllint --html to process HTML or generic HTML
files with some special (mine) tags. Now, xmllint complains (ok, I can
ignore the complains :D but it would be nice to have a generic
pseudo-html processor)

  That's a BAD idea !!!  Suppose the libxml2 HTML parser sees

  <p>
  <foo>

Does <foo> closes <p> ? is <foo> itself expected to be closed ? 
If you want to extend the base syntax *use XML* ! It was designed
precisely to overcome the limitation that an SGML HTML parser has.
So "switch to XHTML" is the only acceptable answer at this point,
any other design decision is just broken, sorry !

2. The second problem is that an empty tag (again with xmllint --html)
gives complains: for example
 _.xml:2: error: Unexpected end tag : hr
 <hr></hr>
          ^

  Hum, that's a valid point, please bugzilla it, so it will get fixed.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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