W3C home > Mailing lists > Public > www-validator@w3.org > February 2006

Re: Direct input doesn't take XML declaration into account for parsing mode selection

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 08 Feb 2006 10:45:45 +0100
To: Dominique Hazael-Massieux <dom@w3.org>
Cc: www-validator@w3.org
Message-ID: <03dju1h8okgd67p9od4n750q6sp3p3ci0d@hive.bjoern.hoehrmann.de>

* Dominique Hazael-Massieux wrote:
>I guess I was suggesting that a better algorithm than assuming SGML
>parsing in any case for direct input would be to do as follow:
>* DOCTYPE known -> use the appropriate parsing mode
>* DOCTYPE unknown -> XML Declaration -> XML validation
>                  -> no-XML Declaration -> SGML validation
>
>Of course the XML declaration can be interpreted legally in the SGML
>validation, but since this is a case where you need more hints rather
>than less, I think it's fairly safe to default to XML validation when
>encountering an XML declaration.

We need to know the parse mode in order to look for an xml declaration
or document type declaration, doing this using some 80/20 solution would
lead to people construction strange edge cases and reporting bugs, which
in turn keeps Validator maintainers awake at night. That's not good. I
don't mind changing this, but if we do, we should come up with solutions
that work for all content that we want to check at some point. That's
rather tricky, considering that

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <svg xmlns="http://www.w3.org/2000/svg" />

and

  <svg xmlns="http://www.w3.org/2000/svg" />

and

  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" />

and

  <svg xmlns="http://www.w3.org/2000/svg" version="1.2" />

and

  <svg xmlns="http://www.w3.org/2000/svg"
       version="1.2" baseProfile="none" />

and

  <svg xmlns="http://www.w3.org/2000/svg"
       version="1.2" baseProfile="full" />

and

  <svg xmlns="http://www.w3.org/2000/svg"
       version="1.1" baseProfile="basic" />

and

  <svg xmlns="http://www.w3.org/2000/svg"
       version="1.0" baseProfile="tiny" />

and

  ...

are all conforming SVG Tiny 1.2 documents as far as I can tell. We
probably need a feature to select what you really want to check for,
I'd assume any such feature would also allow to choose the behavior
you'd like to see.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 8 February 2006 09:44:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:20 GMT