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

Re: XML source doctype

From: David P. Heitmeyer <heitmey@fas.harvard.edu>
Date: Fri, 24 Mar 2000 11:45:28 -0600
To: Brad Stowers <bstowers@pobox.com>
Cc: html-tidy@w3.org
Message-ID: <OFF2D14D79.692C7ACA-ON8625685F.0059D8A9@rfdinc.com>

I've experienced the problem with the DOCTYPE in XML as well.  If it
helps, I observe the problem with the Nov 30 1999 version of tidy, but the
July 26 1999 version does not have this problem.

Example:
fas% lwp-request http://www.news.perl.org/perl-news-short.rdf
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
            "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<channel>
<title>Perl News</title>[...cut...]

Example of Tidy processing:
fas% lwp-requesthttp://www.news.perl.org/perl-news-short.rdf | tidy -xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"http://my.netscape.com/publish/formats/rss-0.91.dtd">

[eof]

-- David

David P. Heitmeyer
Web Systems Administrator
FAS Computer Services
email: heitmey@fas.harvard.edu
Phone: 617-495-1259
Fax:   617-495-1210

On Wed, 5 Jan 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">
>
> [end of file]
>
>
> As I said, if I remove the !DOCTYPE tag, it will work fine.  Any ideas?
>
> --Brad
>
Received on Friday, 24 March 2000 13:15:04 GMT

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