Re: [xml] *mlDocDumpMemory[Enc] functions croak?



On Wed, May 04, 2005 at 09:52:56AM -0700, Abraham Nelson wrote:
--- Daniel Veillard <veillard redhat com> wrote:
paphio:~/XML -> xmllint --html
http://www.teleworking.gr/
http://www.teleworking.gr/:97: HTML parser error :
Unexpected end tag : style
        css += '</style>\n'
                        ^
[...]
There is a serious parsing failure in the script
content. This seems to be the
source of the error, 

Shouldn't the script section be simply seen as a block
of CDATA instead (at least when using the html
parser)? I don't see the need to try to parse anything
within it...

  Maybe you're tired. But 'within it' means you need to find the boundaries.
But the "</style>" sequence of character is in it. Now how would you know
that it's not the end of the <style> if you don't parse it. Precisely the
HTML spec requires to not use a specific parser for all languages possibly
embbeddable in style and instead tell to stop the parsing at the first
"</" occurence.
  The document is broken beyon repair... sorry...

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://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]