473,237 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

Unknown Parse Mode! warning from w3c validator with custom doctype

The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm
uses a custom DTD, the w3c validator validates it but with this warning:

"Unknown Parse Mode!

The MIME Media Type (text/html) for this document is used to serve both
SGML and XML based documents, and it is not possible to disambiguate it
based on the DOCTYPE Declaration in your document. Parsing will continue
in SGML mode."
http://validator.w3.org/check?uri=ht...custom_dtd.htm

Afaics the validator should parse in 2 stages, first to retrieve the url
to the custom DTD, after which there should be no ambiguity about
parsing the document as SGML or XML, so why does the w3c validator issue
the warning?

The WDG and Page valet validators don't issue such a warning:
http://www.htmlhelp.com/cgi-bin/vali...m&warnings=yes
http://valet.webthing.com/view=Asis/...&parseMode=web

--
Spartanicus
Sep 6 '05 #1
8 7385
Spartanicus a écrit :
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm
uses a custom DTD, the w3c validator validates it but with this warning:

"Unknown Parse Mode!

The MIME Media Type (text/html) for this document is used to serve both
SGML and XML based documents, and it is not possible to disambiguate it
based on the DOCTYPE Declaration in your document. Parsing will continue
in SGML mode."
http://validator.w3.org/check?uri=ht...custom_dtd.htm

Afaics the validator should parse in 2 stages, first to retrieve the url
to the custom DTD, after which there should be no ambiguity about
parsing the document as SGML or XML, so why does the w3c validator issue
the warning?

The WDG and Page valet validators don't issue such a warning:
http://www.htmlhelp.com/cgi-bin/vali...m&warnings=yes
http://valet.webthing.com/view=Asis/...&parseMode=web


You may want to open an account at W3C and add a comment here:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1809

I certainly would appreciate this since this unknown parse mode warning
is a regression IMO.

Gérard
--
remove blah to email me
Sep 7 '05 #2
Gérard Talbot <ne***********@gtalbot.org> wrote:
You may want to open an account at W3C and add a comment here: - - I certainly would appreciate this since this unknown parse mode warning
is a regression IMO.
I'm not particularly enthusiastic about bug reporting systems that
require the reporter to register just to help the maintenance of some
software. I understand concerns with spamming, but forced registration
makes spamming the volunteer helper's problem, which means less
volunteers.

Anyway, if someone wishes to contribute to fixing the problem, I'd
suggest mentioning that the message is verbally wrong (as well as
questionable in general). It's not a matter of unknown parse mode. The
validator knows the two parse modes well. It's just unwilling to make a
choice between them without making noise about it. "Unresolved parse
mode" would be a bit better.
Afaics the validator should parse in 2 stages, first to retrieve the
url to the custom DTD, after which there should be no ambiguity about
parsing the document as SGML or XML, so why does the w3c validator
issue the warning?


As far as I know, the validator is a conglomerate that uses an old SGML
parser and a newer XML parser, and the DTD parsing is handled by them as
well. Therefore it needs to select the parser at an early stage. And
apparently it defaults to SGML parsing for text/html. You can even feed
XHTML to it that way.

If it first tried to parse the DTD as an SGML DTD and switch to XML
parsing if errors are found in the DTD, we would probably get even
stranger error messages than today if there is an error in the DTD - or
just a feature that exceeds the capacity limitations of the validator.
They still haven't fixed the GRPCNT limitation, or added reporting of DTD
problems, so for a document like
http://www.cs.tut.fi/~jkorpela/html/nobr.html I still get "Failed
validation, 0 error".

So instead of reporting problems with the W3C validator, I use the WDG
validator.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Sep 7 '05 #3
In article <Xn*****************************@193.229.0.31>,
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote:
As far as I know, the validator is a conglomerate that uses an old SGML
parser and a newer XML parser, and the DTD parsing is handled by them as
well. Therefore it needs to select the parser at an early stage.


AFAIK, the W3C Validator does not have an XML parser at all. It has an
SGML parser and the "parse mode" means the choice of SGML declaration.

It can be proven by demonstration that the W3C Validator does not use an
XML processor as defined in the XML 1.0 spec and, therefore, is not an
XML validator:
http://hsivonen.iki.fi/test/ill-formed-but-sgml-valid/

See also the thread that starts at
http://lists.w3.org/Archives/Public/...5Sep/0009.html

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Sep 7 '05 #4
Spartanicus wrote:
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm
uses a custom DTD, the w3c validator validates it but with this warning:

"Unknown Parse Mode!

The MIME Media Type (text/html) for this document is used to serve both
SGML and XML based documents, and it is not possible to disambiguate it
based on the DOCTYPE Declaration in your document. Parsing will continue
in SGML mode."
http://validator.w3.org/check?uri=ht...custom_dtd.htm
I agree that's a regression.

It's dealing with a problem you don't have: namely people using
nonstandard XHTML DTDs and getting a bunch of unexpected errors
due to SGML-mode parsing. Although it is correct to parse as
SGML (XHTML 1.0 makes an exception, but that applies _only_ to
the three listed doctypes), it was generating confusion and
bug reports.
Afaics the validator should parse in 2 stages, first to retrieve the url
to the custom DTD, after which there should be no ambiguity about
parsing the document as SGML or XML, so why does the w3c validator issue
the warning?
The underlying parser can't do that. By the time it fetches your DTD,
it is already firmly in one mode or the other. It can use the media
type (text/html) and known XHTML types (Appendix C), but that's all.
The WDG and Page valet validators don't issue such a warning:
http://www.htmlhelp.com/cgi-bin/vali...m&warnings=yes
http://valet.webthing.com/view=Asis/...&parseMode=web


They use basically the same logic, but just spare you that particular
inappropriate warning.

Speaking as the developer of Valet, I wouldn't have embarked on that
project if I didn't think I could do, in some way, a better job than
the existing services (I've also had some slight input into the W3C
service, but they haven't adopted any of my more substantial ideas).
The net result is: you have a choice to use whichever service you
prefer.

--
Nick Kew
Sep 7 '05 #5
Refer to: http://esw.w3.org/topic/MarkupValidator/M12N

I find considerable merit in the XML Schema Validator of Christoph
Schneegans: http://schneegans.de/sv/

--
James Pickering
http://jp29.org/

Sep 7 '05 #6
James Pickering wrote:
I find considerable merit in the XML Schema Validator of Christoph
Schneegans: http://schneegans.de/sv/

Indeed. Do you also like http://badame.vse.cz/validator/ ?
All good services for their intended purpose, which is in
each case slightly different from HTML validation.

--
Nick Kew
Sep 7 '05 #7
Nick Kew wrote:
..... Do you also like http://badame.vse.cz/validator/ ?


I do indeed -- also your own excellent Page Valet:
http://valet.webthing.com/page/

--
James Pickering
http://jp29.org/

Sep 7 '05 #8
Gérard Talbot a écrit :

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1809


This bug 1809 was fixed today.

Gérard
--
remove blah to email me
Sep 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ph47f3 | last post by:
I get a strange parse error in the following lines. Can anyone see what I don't. //Query the Database $query = "SELECT type FROM `map` WHERE map_file = " . $_SESSION . " AND col = " ....
4
by: Ray B. X. Zhou | last post by:
I use xml.sax to parse big5 encoding xml file. And I got message "unknown encoding: big5". What can I do? Thank you very much. Ray
4
by: David Moore | last post by:
Hello I am using the System.DirectoryServices namespace classes to access Active Directory. We connect using the LDAP://DOMAIN method. The code works on local dev boxes, and in staging, but...
7
by: Richard Hayden | last post by:
Hi, I've just upgraded my gcc and I'm currently trying to compile some code for my own operating system kernel, but I am getting an error of "Undefined reference to `memcpy`" when I try to link...
2
by: Brecht Yperman | last post by:
Hi, when calling the XmlSerializer constructor, I get the following error: Top Level Exception Type: System.IO.IOException Message: Unknown Error (-1). Source: mscorlib...
7
by: jccorreu | last post by:
I've got to read info from multiple files that will be given to me. I know the format and what the data is. The thing is each time we run the program we may be using a differnt number of files,...
12
by: Sachin Punjabi | last post by:
Hi, I wanted to read a file encoded in utf-8 and and using the following syntax in my source which throws me an error specifying Lookuperror : unknown encoding : utf-8. Also I am working on...
2
by: belovah | last post by:
Hey!! Can anyone please tell me what's wrong with this line. I'm totally lost :s Error: Parse error: parse error, unexpected '.' in C:\Server\www\4images\includes\functions.php on line 479 ...
23
by: Himanshu Chauhan | last post by:
Hi! I was wondering, In the first parse of a singly linked list of unknown length, is it possible to know when we are at middle of the linked list? Regards --Himanshu
1
by: Gramma2005 | last post by:
I am trying to connect to an access db through php on Windows Server 2003 running XAMPP. The code I am using has worked before on another access db on this server so I am not sure what is causing...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.