<?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>5031</bug_id>
          
          <creation_ts>2007-09-11 06:35:55 +0000</creation_ts>
          <short_desc>Doctype detection fails if root element includes non &quot;word&quot; character</short_desc>
          <delta_ts>2007-09-11 06:50:39 +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.8.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://qa-dev.w3.org/HEAD/dev/tests/5031-root_dash.xml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.8.2</target_milestone>
          
          
          <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>16453</commentid>
    <comment_count>0</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-11 06:35:55 +0000</bug_when>
    <thetext>The doctype detection routine in preparse_doctype() has the following regexp to detect FPI and SI:

m(&lt;!DOCTYPE\s+(\w+)\s+(?:PUBLIC|SYSTEM)\s+...
the first (\w+) is the name of the document type, which has to be the root element
(ref: http://www.w3.org/TR/xml/#vc-roottype )
but the \w+ is incorrect, as the root element can (among others) have a dash or dot.
(ref: http://www.w3.org/TR/xml/#IDANQDS )

This half-breaks detection of the doctype for languages with root element including non &quot;perl word (alphanum plus _)&quot; characters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16454</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-09-11 06:50:39 +0000</bug_when>
    <thetext>Patched in http://lists.w3.org/Archives/Public/www-validator-cvs/2007Sep/0071.html

Adding test case. 

The validator should now report on this test case as:
This Page Is Valid -//Recordare//DTD MusicXML 1.1 Partwise//EN!
rather than
This Page Is Valid XML!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>