Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Root element specified by DTD ? >Thread Next - Re: Root element specified by DTD ? Re: Root element specified by DTD ?To: NULL Date: 6/2/2006 6:07:00 AM Lachlan Hunt wrote: > Andy Dingley <dingbat@c...> wrote: > > Is this fragment a valid HTML document ?... > > <!DOCTYPE div PUBLIC "-//W3C//DTD HTML 4.01//EN" > > "http://www.w3.org/TR/html4/strict.dtd"> > > <div> > > <p>Foo</p> > > </div> > > Yes, it's valid. The validator would have told you that. I don't know _what_ the validator is telling me. As an example (from Tidy) it gives a warning "inserting missing 'title' element" Now to my mind, this suggests that it's seen as a valid serialisation of a HTML document, but that after parsing it the HTML-specific tool has implied the <html>, <head>, <title> and presumably <body> elements. Now that's quite a different behaviour to "These documents are valid as fragments based on any root element". I also don't have a generic SGML parser to hand, just HTML ones. My real interest here is in the XML or SGML cases, not anything HTML-specific that is being implied by the context or HTTP headers. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
