<?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>5285</bug_id>
          
          <creation_ts>2007-11-26 15:05:26 +0000</creation_ts>
          <short_desc>Validator ignores &quot;xml-stylesheet&quot; PI in XHTML 1.0/1.1 where&apos;s no link element</short_desc>
          <delta_ts>2012-06-11 13:41:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>Parser</component>
          <version>CSS Validator</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://dark-chiaki.net/test/00048689/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Neumann">peter.neumann</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>byk_przemek</cc>
    
    <cc>herminator.hermann</cc>
    
    <cc>olivier.thereaux</cc>
          
          <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>17844</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Neumann">peter.neumann</who>
    <bug_when>2007-11-26 15:05:26 +0000</bug_when>
    <thetext>I got a problem with the W3C CSS Validator while trying to validate a document (written in XHTML 1.0 Strict, served as application/xhtml+xml, encoding UTF-8, validated by W3C Validator) in wich the stylesheet is referenced with a XML processing instruction as follows:

&lt;?xml-stylesheet alternate=&quot;no&quot; href=&quot;URI&quot; type=&quot;text/css&quot; media=&quot;all&quot; ?&gt;

Since Firefox is cappable of this notation, the CSS Validator says
&quot;No Errors or Warnings found. No Stylesheet found.&quot;
and validates nothing at all. The validation only works (and is successful), if I additionally include a reference with the link element as follows:

&lt;link rel=&quot;stylesheet&quot; href=&quot;URI&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;

Occurs on any Platform/OS/UA, direct and with referer-link, used browsers are Firefox 2.0.0.9 and IE 7.0 (itself not cappable of XHTML, but doesn&apos;t change the failded validation).

To reproduce the error/failing, try to get a validation with:
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.djg-muenchen.de%2F
(Page in german language, but this shouln&apos;t be relevant for testing.)

Best regards,
Peter Neumann</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18285</commentid>
    <comment_count>1</comment_count>
    <who name="Peter Neumann">peter.neumann</who>
    <bug_when>2008-01-13 17:46:22 +0000</bug_when>
    <thetext>Just as a side note:

This problem belongs also to XHTML 1.1 documents.

It seems, that the validator at the moment is unable
to detect and/or handle xml processing instructions at all,
if no &lt;link&gt; element and/or internal stylesheet is given.

Seems to be related to Bug #4105 and maybe Bug #2403.
(http://www.w3.org/Bugs/Public/show_bug.cgi?id=4105)
(http://www.w3.org/Bugs/Public/show_bug.cgi?id=2403)

Best Regards,
Peter Neumann</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19743</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Neumann">peter.neumann</who>
    <bug_when>2008-04-07 05:41:36 +0000</bug_when>
    <thetext>Testlink provided in Description has changed:
&gt;&gt; http://dark-chiaki.net/test/00048689/
(XHTML 1.0 Strict, served as &apos;application/xhtml+xml; charset=&quot;utf-8&quot;&apos;)

The earlier provided testpage has been rewritten to HTML 4.01 Strict,
as a result no XML Stylesheet-PI will be provided for the test anymore.

Best Regards,
Peter Neumann</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25171</commentid>
    <comment_count>3</comment_count>
      <attachid>698</attachid>
    <who name="William F. McCaw">william</who>
    <bug_when>2009-05-15 17:58:57 +0000</bug_when>
    <thetext>Created attachment 698
Proposed patch for this issue.

I also encountered this problem whilst attempting to validate a site I&apos;m
building (XHTML 1.1, application/xhtml+xml and xml-stylesheet PIs) using
both the online validator, and the development version from CVS run from
the command line.

This patch makes the following change to the processingInstruction methods
of both the TagSoupStyleSheetHandler and the XMLStyleSheetHandler classes
within the org.w3c.css.css package.

* The local &quot;mt&quot; variable is assigned the MimeType instance created from
  the &quot;type&quot; pseudo-attribute of the xml-stylesheet PI.

Without this change, the validator does not see the specified URI as
referencing a CSS stylesheet, and so ignores it.

Best regards,
William F. McCaw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48468</commentid>
    <comment_count>4</comment_count>
    <who name="">byk_przemek</who>
    <bug_when>2011-05-11 05:47:20 +0000</bug_when>
    <thetext>*** Bug 12632 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>698</attachid>
            <date>2009-05-15 17:58:57 +0000</date>
            <delta_ts>2009-05-15 17:58:57 +0000</delta_ts>
            <desc>Proposed patch for this issue.</desc>
            <filename>CSSValidatorBug5285.patch</filename>
            <type>text/plain</type>
            <size>1144</size>
            <attacher name="William F. McCaw">william</attacher>
            
              <data encoding="base64">ZGlmZiAtciAtdSBjc3MtdmFsaWRhdG9yLm9yZy9vcmcvdzNjL2Nzcy9jc3MvVGFnU291cFN0eWxl
U2hlZXRIYW5kbGVyLmphdmEgY3NzLXZhbGlkYXRvci9vcmcvdzNjL2Nzcy9jc3MvVGFnU291cFN0
eWxlU2hlZXRIYW5kbGVyLmphdmEKLS0tIGNzcy12YWxpZGF0b3Iub3JnL29yZy93M2MvY3NzL2Nz
cy9UYWdTb3VwU3R5bGVTaGVldEhhbmRsZXIuamF2YQkyMDA5LTAyLTEzIDIxOjUwOjE1LjAwMDAw
M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