|
From: David G. <go...@us...> - 2002-10-09 01:09:20
|
Greg Ward wrote: > I'm having problems validating HTML output by Docutils using nsgmls, > my HTML/XHTML validator of choice. (It's from the James Clark's SP > package -- installed on my Debian "unstable" box as > sp_1.3.4-1.2.1-28.) Brings back memories. I used SP/nsgmls and their predecessor sgmls intensively for 3 years, back when I lived in Japan. > I'm sure you're all familiar with the first two lines of Docutils > HTML output: > > $ head -2 upload.html > <?xml version="1.0" encoding="us-ascii"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > If I ask nsgmls to parse this (I just use it for the errors and warnings > it prints), it barfs almost immediately: ... > So what's up here -- is Docutils emitting bad HTML here? or is > nsgmls barfing on valid HTML? That was just a thinko. I thought the word "SYSTEM" was needed there, but it isn't. I had the same bug with the XML writer (docutils_xml.py), fixed recently. I've fixed the DOCTYPE header for HTML; please try it again with the latest snapshot. -- David Goodger <go...@us...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |