W3C home > Mailing lists > Public > public-qa-dev@w3.org > April 2005

[check] ignores SYSTEM declarations?

From: Olivier Thereaux <ot@w3.org>
Date: Wed, 6 Apr 2005 14:40:33 +0900
To: public-qa-dev@w3.org
Message-ID: <20050406054033.GA21176@w3.mag.keio.ac.jp>

I am still trying to make sense of the issues with the markup validator
with regards to custom DTDs... I am reaching some conclusions, but since
this is not my area of choice, I'd appreciate if you could have a look
at them and confirm (or not).

As far as I understand, the main problem is with the following two
pieces of logic:

* when detecting the DTD, check (in sub preparse_doctype) ignores the
DTD uri and only takes care of the FPI. I'm not going to re-open the
debate on whether this is OK for public declarations, but for SYSTEM
ones, this seems wrong.

* as a result, the only piece of information on the DTD that is passed
along is $File->{DOCTYPE}, which (most of the time) holds the FPI.

* check has a mechanism to output a warning and replace with a default
Doctype declaration if none is recorded to be found or not recognized

My suggested course of action would be to:
- modify preparse_doctype to also grok SYSTEM declarations [1]
- use two variables for the doctype instead of one: $File->{Doctype_FPI}
  and $File->{Doctype_URI} (which will also help us whine about
  discrepancies in the future for PUBLIC)
- only force replace the found doctype if neither FPI nor URI are set

... there, I reckon we may run into issues with the sgml-lib, but am I
right in expecting that onsgmls will go fetch the DTD for SYSTEM
references, and validate the document, even with -R?

[1] http://www.w3.org/Bugs/Public/attachment.cgi?id=385

-- 
olivier
Received on Wednesday, 6 April 2005 05:40:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 August 2010 18:12:45 GMT