diff options
author | link <link@localhost> | 2004-09-03 01:26:33 +0000 |
---|---|---|
committer | link <link@localhost> | 2004-09-03 01:26:33 +0000 |
commit | fd9ebcea0bb503a65ac46b349f080abbd5ed5b18 (patch) | |
tree | d777f265e18bf0dcb588fa55aa881b3ad5fe7bc5 | |
parent | 1ddedf0f0f442a641697930c15d6fc1a1fe961b0 (diff) | |
download | markup-validator-fd9ebcea0bb503a65ac46b349f080abbd5ed5b18.zip markup-validator-fd9ebcea0bb503a65ac46b349f080abbd5ed5b18.tar.gz markup-validator-fd9ebcea0bb503a65ac46b349f080abbd5ed5b18.tar.bz2 |
Landing first cut of new config layout. Clean up various config names,
nuke obsoleted config files, and start to make use of new Types Registry.
There's breakage. There's unfinished pieces (type.cfg). Fun all around! :-)
-rw-r--r-- | htdocs/config/doctypes.cfg | 143 | ||||
-rw-r--r-- | htdocs/config/fpis.cfg | 166 | ||||
-rw-r--r-- | htdocs/config/frag.cfg | 76 | ||||
-rw-r--r-- | htdocs/config/types.conf | 146 | ||||
-rw-r--r-- | htdocs/config/validator.conf | 61 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 72 |
6 files changed, 146 insertions, 518 deletions
diff --git a/htdocs/config/doctypes.cfg b/htdocs/config/doctypes.cfg deleted file mode 100644 index 8062f0f..0000000 --- a/htdocs/config/doctypes.cfg +++ /dev/null @@ -1,143 +0,0 @@ -# -# Mapping of HTML Version "names" to DOCTYPEs. Used for DOCTYPE override. -# -# $Id: doctypes.cfg,v 1.9 2002-11-26 21:40:19 ville Exp $ - -HTML 0.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML Level 0//EN//2.0"> - -Strict HTML 0.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML Strict Level 0//EN//2.0"> - -HTML 1.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0 Level 1//EN"> - -Strict HTML 1.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 1//EN"> - -Strict HTML 2.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0 Strict//EN"> - -HTML 2.0 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> - -HTML 2.1E = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.1E//EN"> - -HTML 3.0 (AdvaSoft version) = \ - <!DOCTYPE html PUBLIC "-//AS//DTD HTML 3.0 asWedit + extensions//EN"> - -HTML 3.0 (Beta) = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 3.0//EN"> - -Strict HTML 3.0 (Beta) = \ - <!DOCTYPE html PUBLIC "-//W3O//DTD W3 HTML Strict 3.0//EN//"> - -Hotjava-HTML = \ - <!DOCTYPE html PUBLIC "-//Sun Microsystems Corp.//DTD HotJava HTML//EN"> - -Strict Hotjava-HTML = \ - <!DOCTYPE html PUBLIC \ - "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN"> - -Netscape-HTML = \ - <!DOCTYPE html PUBLIC "-//WebTechs//DTD Mozilla HTML 2.0//EN"> - -Strict Netscape-HTML = \ - <!DOCTYPE html PUBLIC "-//Netscape Comm. Corp. Strict//DTD HTML//EN"> - -MSIE-HTML = \ - <!DOCTYPE html PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 HTML//EN"> - -Strict MSIE-HTML = \ - <!DOCTYPE html PUBLIC \ - "-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//EN"> - -MSIE 3.0 HTML = \ - <!DOCTYPE html PUBLIC "-//Microsoft//DTD Internet Explorer 3.0 HTML//EN"> - -Strict MSIE 3.0 HTML = \ - <!DOCTYPE html PUBLIC \ - "-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//EN"> - -ORA HTML Extended v1.0 = \ - <!DOCTYPE html PUBLIC "-//OReilly and Associates//DTD HTML Extended 1.0//EN"> - -ORA HTML Extended Relaxed v1.0 = \ - <!DOCTYPE html PUBLIC \ - "-//OReilly and Associates//DTD HTML Extended Relaxed 1.0//EN"> - -Apple Help 1.0 = \ - <!DOCTYPE HTML PUBLIC "-//bebop.net//DTD HTML Apple Help 1.0//EN" \ - "http://www.bebop.net/AppleHelpDTD/AppleHelp1.0.dtd"> - -HTML 2.2 = \ - <!DOCTYPE html PUBLIC "-//IETF//DTD HTML V2.2//EN"> - -HTML 1996-01 = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1996-01//EN"> - -HTML 3.2 = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> - -HTML 3.2 + Style = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML Experimental 970421//EN"> - -HTML Pro = \ - <!DOCTYPE html PUBLIC "+//Silmaril//DTD HTML Pro v0r11 19970101//EN"> - -Spyglass HTML 2.0 Extended = \ - <!DOCTYPE html PUBLIC "-//Spyglass//DTD HTML 2.0 Extended//EN"> - -HTML Level Cougar = \ - <!DOCTYPE html PUBLIC "http://www.w3.org/MarkUp/Cougar/Cougar.dtd"> - -HTML 4.0 Strict = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"> - -HTML 4.0 Transitional = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> - -HTML 4.0 Frameset = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"> - -HTML 4.01 Strict = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> - -HTML 4.01 Transitional = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> - -HTML 4.01 Frameset = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> - -XHTML 1.0 Strict = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" \ - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -XHTML 1.0 Transitional = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \ - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -XHTML 1.0 Frameset = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" \ - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> - -XHTML Basic 1.0 = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" \ - "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> - -XHTML 1.1 = \ - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \ - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - -SVG 1.0 = \ - <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" \ - "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> - -SMIL 1.0 = \ - <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 1.0//EN" \ - "http://www.w3.org/TR/REC-smil/SMIL10.dtd"> - -SMIL 2.0 = \ - <!DOCTYPE smil PUBLIC "-//W3C//DTD SMIL 2.0//EN" \ - "http://www.w3.org/2001/SMIL20/PR/SMIL20.dtd"> diff --git a/htdocs/config/fpis.cfg b/htdocs/config/fpis.cfg deleted file mode 100644 index 0dd8d2c..0000000 --- a/htdocs/config/fpis.cfg +++ /dev/null @@ -1,166 +0,0 @@ -# -# Mapping of FPIs to plain text version strings. -# -# $Id: fpis.cfg,v 1.20 2004-07-21 15:07:00 link Exp $ - -### Fallback DOCTYPE! --//W3C//DTD HTML Fallback//EN = \ - <a href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01</a> Transitional - - --//IETF//DTD HTML Level 0//EN//2.0 = \ - HTML 2.0 Level 0 - --//IETF//DTD HTML Strict Level 0//EN//2.0 = \ - Strict HTML 2.0 Level 0 - --//IETF//DTD HTML 2.0 Level 1//EN = \ - HTML 2.0 Level 1 - --//IETF//DTD HTML 2.0 Strict Level 1//EN = \ - Strict HTML 2.0 Level 1 - --//IETF//DTD HTML 2.0 Strict//EN = \ - Strict HTML 2.0 - --//IETF//DTD HTML 2.0//EN = \ - HTML 2.0 - --//IETF//DTD HTML 2.1E//EN = \ - HTML 2.1E - --//AS//DTD HTML 3.0 asWedit + extensions//EN = \ - HTML 3.0 (AdvaSoft version) - --//IETF//DTD HTML 3.0//EN = \ - HTML 3.0 (Beta) - --//W3O//DTD W3 HTML Strict 3.0//EN// = \ - Strict HTML 3.0 (Beta) - --//Sun Microsystems Corp.//DTD HotJava HTML//EN = \ - Hotjava-HTML - --//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN = \ - Strict Hotjava-HTML - --//WebTechs//DTD Mozilla HTML 2.0//EN = \ - Netscape-HTML - --//Netscape Comm. Corp. Strict//DTD HTML//EN = \ - Strict Netscape-HTML - --//Microsoft//DTD Internet Explorer 2.0 HTML//EN = \ - MSIE-HTML - --//Microsoft//DTD Internet Explorer 2.0 HTML Strict//EN = \ - Strict MSIE-HTML - --//Microsoft//DTD Internet Explorer 3.0 HTML//EN = \ - MSIE 3.0 HTML - --//Microsoft//DTD Internet Explorer 3.0 HTML Strict//EN - Strict MSIE 3.0 HTML - --//OReilly and Associates//DTD HTML Extended 1.0//EN = \ - O'Reilly HTML Extended v1.0 - --//OReilly and Associates//DTD HTML Extended Relaxed 1.0//EN = \ - O'Reilly HTML Extended Relaxed v1.0 - --//bebop.net//DTD HTML Apple Help 1.0//EN = \ - Apple Help 1.0 - --//IETF//DTD HTML V2.2//EN = \ - HTML 2.2 - --//W3C//DTD HTML 1996-01//EN = \ - HTML 1996-01 - --//W3C//DTD HTML 3.2 Final//EN = \ - <a href="http://www.w3.org/TR/REC-html32">HTML 3.2</a> - --//W3C//DTD HTML Experimental 970421//EN = \ - <a href="http://www.w3.org/TR/NOTE-html-970421.html">HTML 3.2 + Style</a> - -+//Silmaril//DTD HTML Pro v0r11 19970101//EN = \ - <a href="http://www.ucc.ie/doc/www/html/dtds/htmlpro.html">HTML Pro</a> - --//Spyglass//DTD HTML 2.0 Extended//EN = \ - Spyglass HTML 2.0 Extended - -http://www.w3.org/MarkUp/Cougar/Cougar.dtd = \ - <a href="http://www.w3.org/MarkUp/Cougar/">HTML Level Cougar"</a> - --//W3C//DTD HTML 4.0//EN = \ - <a href="http://www.w3.org/TR/1998/REC-html40-19980424/">HTML 4.0</a> Strict - --//W3C//DTD HTML 4.0 Transitional//EN = \ - <a href="http://www.w3.org/TR/1998/REC-html40-19980424/">HTML 4.0</a> \ - Transitional - --//W3C//DTD HTML 4.0 Frameset//EN = \ - <a href="http://www.w3.org/TR/1998/REC-html40-19980424/">HTML 4.0</a> \ - Frameset - --//W3C//DTD HTML 4.01//EN = \ - <a href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01</a> \ - Strict - --//W3C//DTD HTML 4.01 Transitional//EN = \ - <a href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01</a> \ - Transitional - --//W3C//DTD HTML 4.01 Frameset//EN = \ - <a href="http://www.w3.org/TR/1999/REC-html401-19991224/">HTML 4.01</a> \ - Frameset - --//W3C//DTD XHTML 1.0 Strict//EN = \ - <a href="http://www.w3.org/TR/2000/REC-xhtml1-20000126/">XHTML 1.0</a> Strict - --//W3C//DTD XHTML 1.0 Transitional//EN = \ - <a href="http://www.w3.org/TR/2000/REC-xhtml1-20000126/">XHTML 1.0</a> \ - Transitional - --//W3C//DTD XHTML 1.0 Frameset//EN = \ - <a href="http://www.w3.org/TR/2000/REC-xhtml1-20000126/">XHTML 1.0</a> \ - Frameset - -XML = \ - <a href="http://www.w3.org/TR/REC-xml">XML</a> - -ISO/IEC 15445:2000//DTD HyperText Markup Language//EN = \ - <a href="http://purl.org/NET/ISO+IEC.15445/15445.html">ISO/IEC \ - 15445:2000</a> (ISO-HTML) - -ISO/IEC 15445:2000//DTD HTML//EN = \ - <a href="http://purl.org/NET/ISO+IEC.15445/15445.html">ISO/IEC \ - 15445:2000</a> (ISO-HTML) - --//W3C//DTD MathML 2.0//EN = \ - <a href="http://www.w3.org/TR/MathML2/">MathML 2.0</a> - --//W3C//DTD XHTML 1.1 plus MathML 2.0//EN = \ - <a href="http://www.w3.org/TR/MathML2/">XHTML 1.1 plus MathML 2.0</a> - --//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN = \ - <a href=http://www.w3.org/TR/XHTMLplusMathMLplusSVG/">XHTML 1.1 + MathML 2.0 + SVG 1.1</a> - --//W3C//DTD XHTML Basic 1.0//EN = \ - <a href="http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/">XHTML Basic \ - 1.0</a> - --//W3C//DTD XHTML 1.1//EN = \ - <a href="http://www.w3.org/TR/2001/REC-xhtml11-20010531/">XHTML 1.1</a> - --//W3C//DTD SVG 1.0//EN = \ - <a href="http://www.w3.org/TR/2001/REC-SVG-20010904/">SVG 1.0</a> - --//W3C//DTD SVG 20010719//EN = \ - <a href="http://www.w3.org/TR/2001/PR-SVG-20010719/">SVG 1.0 PR 20010719</a> - --//W3C//DTD SMIL 1.0//EN = \ - <a href="http://www.w3.org/TR/1998/REC-smil-19980615/">SMIL 1.0</a> - --//W3C//DTD SMIL 2.0//EN = \ - <a href="http://www.w3.org/TR/2001/PR-smil20-20010605/">SMIL 2.0</a> diff --git a/htdocs/config/frag.cfg b/htdocs/config/frag.cfg deleted file mode 100644 index 9f8711a..0000000 --- a/htdocs/config/frag.cfg +++ /dev/null @@ -1,76 +0,0 @@ -# -# Mapping of error message to URL fragment for the explanations. -# -# $Id: frag.cfg,v 1.8 2004-07-21 15:07:00 link Exp $ - -# -# Original SP version. -# - -entity end not allowed in comment = \ - unterm-comment-1 - -name start character invalid only s and comment allowed in comment \ - declaration = \ - unterm-comment-2 - -name character invalid only s and comment allowed in comment declaration = \ - unterm-comment-2 - -unknown declaration type FOO = \ - bad-comment - -character FOO not allowed in attribute specification list = \ - attr-char - -an attribute value must be a literal unless it contains only name characters =\ - attr-quoted - -syntax of attribute value does not conform to declared value = \ - bad-attr-char - -length of attribute value must not exceed LITLEN less NORMSEP = \ - name-length - -element FOO undefined = \ - undef-tag - -element FOO not allowed here = \ - not-allowed - -there is no attribute FOO = \ - attr-undef - -FOO is not a member of the group specified in the declared value of this \ - attribute = \ - undef-attr-val - -FOO is not a member of a group specified for any attribute = \ - bad-abbrev-attr - -end tag for FOO omitted but its declaration does not permit this = \ - no-end-tag - -end tag for element FOO which is not open = \ - floating-close - -end tag for FOO which is not finished = \ - omitted-content - -start tag for FOO omitted but its declaration does not permit this = \ - no-start-tag - -general entity FOO not defined and no default entity = \ - bad-entity - -non SGML character number = \ - bad-char - -cannot generate system identifier for entity FOO = \ - bad-pub-id - -ID FOO already defined = \ - dup-id - -ID FOO first defined here = \ - dup-id diff --git a/htdocs/config/types.conf b/htdocs/config/types.conf index 96df611..92eb095 100644 --- a/htdocs/config/types.conf +++ b/htdocs/config/types.conf @@ -1,7 +1,7 @@ # # Main Document Type Database for the W3C Markup Validation Service. # -# $Id: types.conf,v 1.3 2003-02-24 23:33:18 ville Exp $ +# $Id: types.conf,v 1.4 2004-09-03 01:26:33 link Exp $ # # Maintains all information for each of the document types we support. # See 'perldoc Config::General' for the syntax, and be aware that the @@ -21,14 +21,14 @@ <HTML_2_0> Name = html Display = HTML 2.0 - Info_URL = http://www.w3.org/MarkUp/html-spec/ + Info URL = http://www.w3.org/MarkUp/html-spec/ PubID = -//IETF//DTD HTML 2.0//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/vh20 </Badge> @@ -37,14 +37,14 @@ <HTML_2_0_Level_2> Name = html Display = HTML 2.0 Level 2 - Info_URL = http://www.w3.org/MarkUp/html-spec/ + Info URL = http://www.w3.org/MarkUp/html-spec/ PubID = -//IETF//DTD HTML 2.0 Level 2//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/vh20 </Badge> @@ -53,14 +53,14 @@ <HTML_2_0_Level_1> Name = html Display = HTML 2.0 Level 1 - Info_URL = http://www.w3.org/MarkUp/html-spec/ + Info URL = http://www.w3.org/MarkUp/html-spec/ PubID = -//IETF//DTD HTML 2.0 Level 2//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/vh20 </Badge> @@ -69,14 +69,14 @@ <HTML_2_0_Strict> Name = html Display = HTML 2.0 Strict - Info_URL = http://www.w3.org/MarkUp/html-spec/ + Info URL = http://www.w3.org/MarkUp/html-spec/ PubID = -//IETF//DTD HTML 2.0 Strict//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/vh20 </Badge> @@ -85,14 +85,14 @@ <HTML_2_0_Strict_Level_1> Name = html Display = HTML 2.0 Strict Level 1 - Info_URL = http://www.w3.org/MarkUp/html-spec/ + Info URL = http://www.w3.org/MarkUp/html-spec/ PubID = -//IETF//DTD HTML 2.0 Strict Level 1//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/vh20 </Badge> @@ -103,14 +103,14 @@ <HTML_3_2> Name = html Display = HTML 3.2 - Info_URL = http://www.w3.org/TR/REC-html32 + Info URL = http://www.w3.org/TR/REC-html32 PubID = -//W3C//DTD HTML 3.2 Final//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://www.w3.org/Icons/valid-html32 Height = 31 @@ -125,15 +125,15 @@ <HTML_4_0_Strict> Name = html Display = HTML 4.0 Strict - Info_URL = http://www.w3.org/TR/1998/REC-html40-19980424/ + Info URL = http://www.w3.org/TR/1998/REC-html40-19980424/ PubID = -//W3C//DTD HTML 4.0//EN SysID = http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -148,15 +148,15 @@ <HTML_4_0_Transitional> Name = html Display = HTML 4.0 Transitional - Info_URL = http://www.w3.org/TR/1998/REC-html40-19980424/ + Info URL = http://www.w3.org/TR/1998/REC-html40-19980424/ PubID = -//W3C//DTD HTML 4.0 Transitional//EN SysID = http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -171,15 +171,15 @@ <HTML_4_0_Frameset> Name = html Display = HTML 4.0 Frameset - Info_URL = http://www.w3.org/TR/1998/REC-html40-19980424/ + Info URL = http://www.w3.org/TR/1998/REC-html40-19980424/ PubID = -//W3C//DTD HTML 4.0 Frameset//EN SysID = http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -194,15 +194,15 @@ <HTML_4_01_Strict> Name = html Display = HTML 4.01 Strict - Info_URL = http://www.w3.org/TR/1999/REC-html401-19991224/ + Info URL = http://www.w3.org/TR/1999/REC-html401-19991224/ PubID = -//W3C//DTD HTML 4.01//EN SysID = http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -217,15 +217,15 @@ <HTML_4_01_Transitional> Name = html Display = HTML 4.01 Transitional - Info_URL = http://www.w3.org/TR/1999/REC-html401-19991224/ + Info URL = http://www.w3.org/TR/1999/REC-html401-19991224/ PubID = -//W3C//DTD HTML 4.01 Transitional//EN SysID = http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -240,15 +240,15 @@ <HTML_4_01_Frameset> Name = html Display = HTML 4.01 Frameset - Info_URL = http://www.w3.org/TR/1999/REC-html401-19991224/ + Info URL = http://www.w3.org/TR/1999/REC-html401-19991224/ PubID = -//W3C//DTD HTML 4.01 Frameset//EN SysID = http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Namespaces> Allowed = Required = 0 @@ -263,15 +263,15 @@ <XHTML_1_0_Strict> Name = html Display = XHTML 1.0 Strict - Info_URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ + Info URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ PubID = -//W3C//DTD XHTML 1.0 Strict//EN SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd - Parse_Mode = XML - <Content_Types> + Parse Mode = XML + <Types> Allowed = text/html Allowed = application/xhtml+xml Preferred = application/xhtml+xml - </Content_Types> + </Types> <Namespaces> Allowed = http://www.w3.org/1999/xhtml Required = 1 @@ -286,15 +286,15 @@ <XHTML_1_0_Transitional> Name = html Display = XHTML 1.0 Transitional - Info_URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ + Info URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ PubID = -//W3C//DTD XHTML 1.0 Transitional//EN SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd - Parse_Mode = XML - <Content_Types> + Parse Mode = XML + <Types> Allowed = text/html Allowed = application/xhtml+xml Preferred = application/xhtml+xml - </Content_Types> + </Types> <Namespaces> Allowed = http://www.w3.org/1999/xhtml Required = 1 @@ -309,15 +309,15 @@ <XHTML_1_0_Frameset> Name = html Display = XHTML 1.0 Frameset - Info_URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ + Info URL = http://www.w3.org/TR/2000/REC-xhtml1-20000126/ PubID = -//W3C//DTD XHTML 1.0 Frameset//EN SysID = http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-frameset.dtd - Parse_Mode = XML - <Content_Types> + Parse Mode = XML + <Types> Allowed = text/html Allowed = application/xhtml+xml Preferred = application/xhtml+xml - </Content_Types> + </Types> <Namespaces> Allowed = http://www.w3.org/1999/xhtml Required = 1 @@ -332,15 +332,15 @@ <XHTML_Basic_1_0> Name = html Display = XHTML Basic 1.0 - Info_URL = http://www.w3.org/TR/xhtml-basic/ + Info URL = http://www.w3.org/TR/xhtml-basic/ PubID = -//W3C//DTD XHTML Basic 1.0//EN SysID = http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/xhtml-basic10.dtd - Parse_Mode = XML - <Content_Types> + Parse Mode = XML + <Types> Allowed = text/html Allowed = application/xhtml+xml Preferred = application/xhtml+xml - </Content_Types> + </Types> <Namespaces> Allowed = http://www.w3.org/1999/xhtml Required = 1 @@ -355,15 +355,15 @@ <XHTML_1_1> Name = html Display = XHTML 1.1 - Info_URL = http://www.w3.org/TR/xhtml11/ + Info URL = http://www.w3.org/TR/xhtml11/ PubID = -//W3C//DTD XHTML 1.1//EN SysID = http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11-flat.dtd - Parse_Mode = XML - <Content_Types> + Parse Mode = XML + <Types> Allowed = application/xhtml+xml Forbidden = text/html Preferred = application/xhtml+xml - </Content_Types> + </Types> <Namespaces> Allowed = http://www.w3.org/1999/xhtml Required = 1 @@ -378,14 +378,14 @@ <ISO_IEC_15445_2000> Name = html Display = ISO/IEC 15445:2000 ("ISO HTML") - Info_URL = http://purl.org/NET/ISO+IEC.15445/15445.html + Info URL = http://purl.org/NET/ISO+IEC.15445/15445.html PubID = ISO/IEC 15445:2000//DTD HTML//EN - Parse_Mode = SGML - <Content_Types> + Parse Mode = SGML + <Types> Allowed = text/html Forbidden = application/xhtml+xml Preferred = text/html - </Content_Types> + </Types> <Badge> URI = http://validator.w3.org/images/v15445 </Badge> diff --git a/htdocs/config/validator.conf b/htdocs/config/validator.conf index 09cd7a2..3f0f2f4 100644 --- a/htdocs/config/validator.conf +++ b/htdocs/config/validator.conf @@ -1,74 +1,81 @@ # # Main Configuration File for the W3C Markup Validation Service. # -# $Id: validator.conf,v 1.12 2004-07-21 16:18:29 link Exp $ +# $Id: validator.conf,v 1.13 2004-09-03 01:26:33 link Exp $ # # See 'perldoc Config::General' for the syntax, and be aware that the # 'SplitPolicy' is 'equalsign', ie. keys and values are separated by '\s*=\s*'. # -DEBUG = 0 +# +# This controls whether the debugging options are allowed to be enabled. +Allow Debug = yes # -# Email address of the maintainer of this service. -Maintainer = www-validator@w3.org +# This lets you permanently enable the debugging options. Can be overridden +# with CGI options (unlike "Allow Debug" above). +Enable Debug = no # -# The "Home Page" for the service. Make sure this ends with a slash. -Home_Page = http://validator.w3.org/ +# Whether private RFC1918 addresses are allowed. +Allow Private IPs = no + +# +# Email address of the maintainer of this service. +Maintainer = www-validator@w3.org # -# Base URI To Error Explanations (doc/errors.html) -Msg_FAQ_URI = ${Home_Page}docs/errors.html +# The "Home Page" for the service. Make sure this ends with a slash. +Home Page = http://validator.w3.org/ # # Base URI for the Element Reference. -Element_Ref_URI = http://www.htmlhelp.com/reference/html40/ +Element Ref URI = http://www.htmlhelp.com/reference/html40/ # # The SGML Library Path. -SGML Library = /usr/local/validator/htdocs/sgml-lib +SGML Library = /home/link/Work/w3.org/validator-HEAD/htdocs/sgml-lib # # The SGML Parser to use. Defaults to /usr/bin/onsgmls. -SGML Parser = /usr/bin/onsgmls +SGML Parser = /usr/bin/onsgmls # # Location of template files -Template_Path = /usr/local/validator/share/templates/en_US +Template Path = /home/link/Work/w3.org/validator-HEAD/share/templates/en_US # # Mapping tables etc... -<Element_Map> +<Elements> Include eref.cfg -</Element_Map> - -<Error_to_URI> - Include frag.cfg -</Error_to_URI> +</Elements> <Types> Include types.conf </Types> -<File_Type> - Include type.cfg -</File_Type> - <Charsets> Include charset.cfg </Charsets> +# +# Compatibility shim. @@FIXME: Delete this and fix the borkage!; +<File_Type> + Include type.cfg +</Types> + # -# DanC territory... -<Tips_DB> +# Source for the "Tip of The Day" blurbs. +<Tips> Include tips.cfg </Tips> # -# Comma separated list of protocols the validator is allowed to use for -# retrieving documents. The default is to allow http and https. -#Allowed_Protocols = data,http,https +# Protocols the validator is allowed to use for retrieving documents. +# The default is to allow http and https. +<Protocols> + Allow = data,http,https +</Protocols> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index b7251af..8c73c45 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.332 2004-07-21 17:06:27 link Exp $ +# $Id: check,v 1.333 2004-09-03 01:26:33 link Exp $ # # Disable buffering on STDOUT! @@ -104,15 +104,18 @@ BEGIN { eval { my %config_opts = (-ConfigFile => $ENV{W3C_VALIDATOR_CFG} || '/etc/w3c/validator.conf', - -MergeDuplicateOptions => 'yes', + -MergeDuplicateOptions => TRUE, + -MergeDuplicateBlocks => TRUE, -SplitPolicy => 'equalsign', -UseApacheInclude => TRUE, -IncludeRelative => TRUE, -InterPolateVars => TRUE, -AutoLaunder => TRUE, - -DefaultConfig => { Allowed_Protocols => 'http,https', - SGML_Parser => '/usr/bin/onsgmls', - Template_Path => '/usr/local/validator/share/templates/en_US', + -AutoTrue => TRUE, + -DefaultConfig => { + Protocols => {Allow => 'http,https'}, + 'SGML Parser' => '/usr/bin/onsgmls', + 'Template Path' => '/usr/local/validator/share/templates/en_US', }, ); my %cfg = Config::General->new(%config_opts)->getall(); @@ -120,25 +123,23 @@ BEGIN { }; if ($@) { die <<".EOF."; -Couldn't read configuration. Set the W3C_VALIDATOR_CFG environment variable -or copy conf/* to /etc/w3c/, and make sure that the configuration file, as -well as all included files are readable by the web server user. -The error reported was: '$@' +Could not read configuration. Set the W3C_VALIDATOR_CFG environment variable +or copy conf/* to /etc/w3c/, and make sure that the configuration file, as well +as all included files are readable by the web server user. The error was: +'$@' .EOF. } + # # Split allowed protocols into a list. - # We could use the array / identical values feature of Config::General, - # but that has unwanted effects when the only array type option we need is - # Allowed_Protocols. - if (my $allowed = delete($CFG->{Allowed_Protocols})) { - $CFG->{Allowed_Protocols} = [ split(/\s*,\s*/, $allowed) ]; + if (my $allowed = delete($CFG->{Protocols}->{Allow})) { + $CFG->{Protocols}->{Allow} = [ split(/\s*,\s*/, $allowed) ]; } # # Make sure onsgmls exists and is executable. - unless (-x $CFG->{SGML_Parser}) { - die qq(Configured SGML Parser "$CFG->{SGML_Parser}" not executable!\n); + unless (-x $CFG->{'SGML Parser'}) { + die qq(Configured SGML Parser "$CFG->{'SGML Parser'}" not executable!\n); } { # Make types config indexed by FPI. @@ -185,11 +186,15 @@ The error reported was: '$@' # # Set debug flag. - $DEBUG = TRUE if $ENV{W3C_VALIDATOR_DEBUG} || $CFG->{DEBUG}; + if ($CFG->{'Allow Debug'} == TRUE) { + $DEBUG = TRUE if $ENV{W3C_VALIDATOR_DEBUG} || $CFG->{'Enable Debug'}; + } else { + $DEBUG = FALSE; + } # # Strings - $VERSION = q$Revision: 1.332 $; + $VERSION = q$Revision: 1.333 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -265,15 +270,15 @@ $File->{'Other Namespaces'} = []; # Other (non-root) Namespaces. ############################################################################### my $T = HTML::Template->new( - filename => File::Spec->catfile($CFG->{Template_Path}, 'result.tmpl'), + filename => File::Spec->catfile($CFG->{'Template Path'}, 'result.tmpl'), die_on_bad_params => FALSE, ); my $E = HTML::Template->new( - filename => File::Spec->catfile($CFG->{Template_Path}, 'fatal-error.tmpl'), + filename => File::Spec->catfile($CFG->{'Template Path'}, 'fatal-error.tmpl'), die_on_bad_params => FALSE, ); -$T->param(cfg_home_page => $CFG->{Home_Page}); +$T->param(cfg_home_page => $CFG->{'Home Page'}); ######################################### @@ -316,9 +321,14 @@ if ($HAVE_SOAP_LITE) { # # If ";debug" was given, let it overrule the value from the config file, - # regardless of whether it's "0" or "1" (on or off). - $DEBUG = $q->param('debug') if defined $q->param('debug'); - $File->{Opt}->{Verbose} = TRUE if $DEBUG; + # regardless of whether it's "0" or "1" (on or off), but only if config + # allows the debugging options. + if ($CFG->{'Allow Debug'}) { + $DEBUG = $q->param('debug') if defined $q->param('debug'); + $File->{Opt}->{Verbose} = TRUE if $DEBUG; + } else { + $DEBUG = FALSE; # The default. + } &abort_if_error_flagged($File, O_NONE); # Too early to &print_table. @@ -924,7 +934,7 @@ sub report_valid { $T->param(file_version => $File->{Version}); # @@@ - # print &daily_tip($File, $CFG->{Tips_DB}); + # print &daily_tip($File, $CFG->{Tips}); # &print_warnings($File); if (defined $image_uri) { @@ -1117,7 +1127,7 @@ sub handle_uri { $ua->agent("W3C_Validator/$VERSION " . $ua->agent); $ua->parse_head(0); # Parse the http-equiv stuff ourselves. @@ Why? - $ua->protocols_allowed($CFG->{'Allowed Protocols'} || ['http', 'https']); + $ua->protocols_allowed($CFG->{Protocols}->{Allow} || ['http', 'https']); unless ($ua->is_protocol_supported($uri)) { $File->{'Error Flagged'} = TRUE; @@ -1595,10 +1605,6 @@ sub report_errors ($) { } #DEBUG; -# if (defined $CFG->{Error_to_URI}->{$err->{idx}}) { -# $err->{uri} = $CFG->{Msg_FAQ_URI} . '#' -# . $CFG->{Error_to_URI}->{$err->{idx}}; -# } $err->{src} = $line; $err->{col} = ' ' x $col; @@ -1822,7 +1828,7 @@ sub parsetree { if (my ($close, $elem) = $printme =~ /^([()])(.+)/) { # reformat and add links on HTML elements $close = ($close eq ')') ? '/' : ''; # ")" -> close-tag - if (my $u = $CFG->{'Element Map'}->{lc($elem)}) { + if (my $u = $CFG->{Elements}->{lc($elem)}) { $elem = '<a href="' . $CFG->{'Element Ref URI'} . "$u\">$elem</a>"; } $printme = "<$close$elem>"; @@ -2712,9 +2718,9 @@ sub self_url_q { # # Return random Tip with it's URL. sub get_tip { - my @tipAddrs = keys %{$CFG->{Tips_DB}}; + my @tipAddrs = keys %{$CFG->{Tips}}; my $tipAddr = $tipAddrs[rand scalar @tipAddrs]; - my $tipSlug = $CFG->{Tips_DB}->{$tipAddr}; + my $tipSlug = $CFG->{Tips}->{$tipAddr}; return [$tipAddr, $tipSlug]; } |