W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

Re: XML source doctype

From: Dave Raggett <dsr@w3.org>
Date: Tue, 28 Mar 2000 18:48:52 +0100 (GMT Daylight Time)
To: Brad Stowers <bstowers@pobox.com>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10003281845560.-462379@hazel.hpl.hp.com>
On Fri, 24 Mar 2000, Brad Stowers wrote:

> I'm trying to run an XML file through tidy and it seems to choke
> on the doctype (the output stops at that line).  If I remove the
> line, the file is properly formatted.  Unfortunately, I need the
> line in there.  I could remove it, run it through tidy, and then
> put it back in, but I'd really prefer not to do that if I don't
> have to.  I'm hoping I'm missing some config option or
> something, but I couldn't find it if I am.  Anyway, here's what
> the beginning of the source file looks like:
> 
> <?xml version="1.0" ?>
> <?fdl version="Beta 1"?>
> <!DOCTYPE fenestra-fdl SYSTEM "fenestra-fdl.dtd">
> 
> <fenestra-fdl>
> 
>   <constraint-package>
> 
> [...snip...]
> 
> 
> and after formatting:
> 
> <?xml version="1.0"?><?fdl version="Beta 1"?>
> <!DOCTYPE fenestra-fdl SYSTEM "fenestra-fdl.dtd">

This is tricky. Tidy needs to known when it could safely break the
line and when it shouldn't because this would introduce meaningful
whitespace. I guess it's reasonably safe before the doctype
declaration, though.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 385 320 444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)
Received on Tuesday, 28 March 2000 12:48:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT