Skip to main content.
home | support | download

Back to List Archive

Re: difference in XML2 vs HTML2 ?

From: Peter Karman <karman(at)not-real.cray.com>
Date: Tue Feb 03 2004 - 17:47:12 GMT
Peter Karman wrote:

> Where is the list of non-inline HTML tags defined? In the libxml2 HTML 
> parser, or in swish-e somewhere?
> 

>>No, did you look at the code in check_html_tag()?

I checked check_html_tag and see where all the structural stuff is 
defined. There's also a reference to a isinline() function. I searched 
the xmlsoft.org site. That seems to be a feature of libxml2:

http://mail.gnome.org/archives/xml/2003-January/msg00115.html

Or am I totally off?

All of this is to say, that after reading your response and thinking 
about it some more, I see why the HTML2 and XML2 parsers parse 
differently. Is it fair to say that they do that because HTML is messy 
and typically written to represent how something should LOOK, while 
(valid) XML is tidy and written to represent what something MEANS? Or is 
that too simplistic?

In any case, I shall make sure to use the HTML2 parser when I want more
'grace' with respect to whitespace.

Thanks, Bill.

pek

-- 
Peter Karman - Software Publications Programmer - Cray Inc
phone: 651-605-9009 - mailto:karman@cray.com
Received on Tue Feb 3 09:47:12 2004