<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1184</bug_id>
          
          <creation_ts>2005-04-01 09:11:09 +0000</creation_ts>
          <short_desc>markup validator ignores SYSTEM doctypes</short_desc>
          <delta_ts>2005-06-03 00:15:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>0.7.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/Style/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>856</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Olivier Thereaux">ot</reporter>
          <assigned_to name="Olivier Thereaux">ot</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3862</commentid>
    <comment_count>0</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-04-01 09:11:09 +0000</bug_when>
    <thetext>0.7.0dev seems to have trouble recognizing custom DTDs, even moreso than &lt;= 0.6.7

e.g 1) http://www.yoyodesign.org/doc/dtd/demo/frameset.php?yoyolng=en
or 2) http://www.w3.org/Style/

0.6.7 declares 1) invalid, but no error given, and declares 2) valid
current CVS version claims &quot;This page is not Valid (no Doctype found)!&quot; for both.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3812</commentid>
    <comment_count>1</comment_count>
      <attachid>385</attachid>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-04-06 04:27:11 +0000</bug_when>
    <thetext>Created attachment 385
remove redundant code and rewrite core feature of sub preparse_doctype()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3553</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-05-09 05:49:36 +0000</bug_when>
    <thetext>This bug was twofold:

1)- a recent modification in sgml.soc (the sgml catalog in the sgml-lib used by, and distributed with, 
the validator), aiming at giving warnings when a bogus FPI was use with a good system identifier, was 
in effect ignoring the system identifier, even when that should not be the case 

2)- the doctype detection code (currently in check, &amp;preparse_doctype(), previously &amp;preparse(), and 
before that probably in something named detect_doctype()...) never detected the presence of a doctype 
in the case of a SYSTEM declaration, only PUBLIC

3)- version 0.7.0 of check is stricter with its handling of documents without recognized doctypes, and 
forces the fallback to a known doctype instead of accepting documents as &quot;valid &lt;BLANK&gt;&quot;. This new 
situation is not a bug per se, rather a bug fix, but it made the issue described in point 2)  apparent.


Suggested fixes:
- 1) was fixed by revision 1.16 of http://dev.w3.org/cvsweb/validator/htdocs/sgml-lib/sgml.soc

- the collision of 2) and 3) can be fixed by changing preparse_doctype to also recognise SYSTEM 
doctypes. I will commit such a patch later today.

- as also discussed earlier, changing the model from valid/invalid foo to no/n error(s) found would also 
avoid such issues, but this is not planned (yet).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3016</commentid>
    <comment_count>3</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-06-03 00:15:15 +0000</bug_when>
    <thetext>http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check#rev1.416 seems to fix this by recording into 
$File-&gt;{Doctype} the FPI if present, the SI otherwise, both for PUBLIC and SYSTEM doctypes.

The change is not http://www.w3.org/Bugs/Public/attachment.cgi?id=385 (that one was rejected), but a 
minor change in regexp within preparse_doctype()
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>385</attachid>
            <date>2005-04-06 04:27:11 +0000</date>
            <delta_ts>2005-04-06 04:27:11 +0000</delta_ts>
            <desc>remove redundant code and rewrite core feature of sub preparse_doctype()</desc>
            <filename>check_preparse_doctype.patch</filename>
            <type>text/plain</type>
            <size>1746</size>
            <attacher name="Olivier Thereaux">ot</attacher>
            
              <data encoding="base64">SW5kZXg6IGNoZWNrCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9zb3VyY2VzL3B1YmxpYy92YWxpZGF0
b3IvaHR0cGQvY2dpLWJpbi9jaGVjayx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS40MTMKZGlmZiAt
dSAtcjEuNDEzIGNoZWNrCi0tLSBjaGVjawkzMSBNYXIgMjAwNSAyMTozMzowNCAtMDAwMAkxLjQx
MworKysgY2hlY2sJNiBBcHIgMjAwNSAwNDoyNTowOSAtMDAwMApAQCAtMTcyNCwxNiArMTcyNCwx
MCBAQAogc3ViIHByZXBhcnNlX2RvY3R5cGUgewogICBteSAkRmlsZSA9IHNoaWZ0OwogCi0gICMK
LSAgIyBSZXNldCBET0NUWVBFLCBSb290IChmb3Igc2Vjb25kIGludm9jYXRpb24sIHByb2JhYmx5
IG5vdCBuZWVkZWQgYW55bW9yZSkuCi0gICRGaWxlLT57RE9DVFlQRX0gICAgICAgICA9ICcnOwot
ICAkRmlsZS0+e1Jvb3R9ICAgICAgICAgICAgPSAnJzsKLQogICBteSAkZHRkID0gc3ViIHsKICAg
ICByZXR1cm4gaWYgJEZpbGUtPntSb290fTsKLSAgICAoJEZpbGUtPntSb290fSwgJEZpbGUtPntE
T0NUWVBFfSkgPSBzaGlmdCA9fiAgbSg8IURPQ1RZUEVccysoXHcrKVxzK1BVQkxJQ1xzKyg/Oltc
J1wiXSkoW15cIlwnXSspKD86W1wiXCddKS4qPilza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gfQorICAgICAgZWxzaWYgKG06KFx3KylccytTWVNURU1ccytbXCJcJ10oLiopW1wiXCdd
OmlzbykKKyAgICAgICAgeworICAgICAgICAgICMgbm90aGluZyB5ZXQKKyAgICAgICAgfQorICAg
ICAgICAKKyAgICAgIH0KKyAgfQogICAkRmlsZS0+e0RPQ1RZUEV9ID0gJycgdW5sZXNzIGRlZmlu
ZWQgJEZpbGUtPntET0NUWVBFfTsKICAgJEZpbGUtPntET0NUWVBFfSA9fiBzKF5ccyspeyB9ZzsK
ICAgJEZpbGUtPntET0NUWVBFfSA9fiBzKFxzKyQpeyB9ZzsK
</data>

          </attachment>
      

    </bug>

</bugzilla>