Re: -//W3C/DTD XHTML gives no error in Markup validator 0.80 ?

Hi Nikita,

Yes, right, OpenSP tries to download the DTDs when it is not in his 
catalog. And unhappily, it does not work when being in an intranet 
behind a proxy.
What happens in practice is that OpenSP timeout after a long time after 
noticing he could not reach the DTD.

For example, I just redid the test with onsgmls for the page that 
Olivier pointed: http://www.w3.org/Style/
But you will reproduce it too if you copy the validator website behind a 
proxy.

This page has a customized DTD:

<!DOCTYPE html SYSTEM "http://www.w3.org/Style/HTML40-plus-blink.dtd">

If you run onsgmls behind a proxy on this page on it you will get this.

c:/www/opensp/onsgmls.exe:<OSFD>0:1:69:554586320.2311:E: error 
connecting to "www.w3.org" (error number 10060)
c:/www/opensp/onsgmls.exe:<OSFD>0:1:69:554586320.323:E: DTD did not 
contain element declaration for document type name
c:/www/opensp/onsgmls.exe:<OSFD>0:9:11:554586320.108:E: there is no 
attribute "LANG"
c:/www/opensp/onsgmls.exe:<OSFD>0:9:13:554586320.76:E: element "HTML" 
undefined
[...]

When I wrote this code, about 1 year ago, such page caused the extension 
and firefox to become too slow and unusable. So, I searched for a proxy 
option that I never found.
But happily, there is a option in OpenSP (a compilation flag 
SP_HAVE_SOCKET) that allow to enable/disable the URLStorageManager of 
OpenSP. (= HTTP calls)

After doing this, I do not have the error above anymore but this

line 1 column 69 - Error: URL not supported by this version <- error 2317
line 1 column 69 - Error: DTD did not contain element declaration for 
document type name
line 9 column 11 - Error: there is no attribute "LANG"
line 9 column 13 - Error: element "HTML" undefined
line 10 column 14 - Error: there is no attribute "PROFILE"
...
And mostly, no http calls anymore and the Firefox extension does not 
freeze anymore with such page when being behind a firewall.
I do not like this work-around since it makes my extension behave a 
little differently than the real validator. But that is the only thing I 
found.

The difference in  behavior for my extension and the validator for 
http://www.mt-olympus.com/ and "-//W3C/DTD XHTML 1.0 Strict//EN" seems 
to be a border case due to the above change.
I learned that after this interesting mail exchange.

Regards,

Marc

Nikita The Spider The Spider wrote:
> On 8/17/07, Marc Gueury <mgueury@skynet.be> wrote:
>   
>> Hi Olivier,
>>
>> Your analysis is exactly the same than mine:
>> - I have included the 2 catalogs xml.soc, sgml.soc with the extension
>> - I have a problem because of a lack of proxy in OpenSP.
>>     
>
> Marc,
> I'm confused -- what exactly is OpenSP trying to download from the Net? DTDs?
>
>   

Received on Friday, 17 August 2007 19:42:35 UTC