This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1173 - Invalid xHTML in CSS validator, but Valid in xHTML Validator?
Summary: Invalid xHTML in CSS validator, but Valid in xHTML Validator?
Status: RESOLVED INVALID
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: XHTML1.0 (show other bugs)
Version: CSS Validator
Hardware: PC Windows XP
: P4 major
Target Milestone: ---
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL: http://jigsaw.w3.org/css-validator/va...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-19 14:08 UTC by Joel Low
Modified: 2006-04-21 05:53 UTC (History)
1 user (show)

See Also:


Attachments

Description Joel Low 2005-03-19 14:08:34 UTC
I have validated the page both in the CSS validator, with just the CSS source
file (hence i dare put the Valid CSS link on my page), and with the xHTML
validator (http://validator.w3.org/) It both validates, but when i use the
validator from /check/referer, it will generate this error:

Target: http://forum.joelsplace.sg/index.php
Please, validate your XML document first!
Line 187
Column 324
Element type "null" must be followed by either attribute specifications, ">" or
"/>". 

I've looked through the source code - looks beautiful (not literally) - no errors.

This has been bugging me for quite a while now...
Comment 1 Bj 2005-03-19 14:38:26 UTC
Yes, the validator notes in the results that it has only limited support for 
XML and this is one of the known limitations. You can find more limitations 
from http://www.websitedev.de/markup/validator/tests/
Comment 2 Joel Low 2005-03-20 02:42:06 UTC
(In reply to comment #1)
> Yes, the validator notes in the results that it has only limited support for 
> XML and this is one of the known limitations. You can find more limitations 
> from http://www.websitedev.de/markup/validator/tests/

Does that means that i can still have the "Valid CSS" thing on my page? Do I
just directly link to the URI of my source CSS file?
Comment 3 Michael March 2006-03-11 07:48:50 UTC
<p>
 <a href="http://jigsaw.w3.org/css-validator/">
  <img style="border:0;width:88px;height:31px"
       src="http://jigsaw.w3.org/css-validator/images/vcss" 
       alt="Valid CSS!">
 </a>
</p>

the <img> tag is not closed.  Add a space then / before the > and that will resolve the issue.
Comment 4 Michael March 2006-03-11 07:50:37 UTC
To be a little more specific the code should look like:

<p>
 <a href="http://jigsaw.w3.org/css-validator/">
  <img style="border:0;width:88px;height:31px"
       src="http://jigsaw.w3.org/css-validator/images/vcss" 
       alt="Valid CSS!" />
 </a>
</p>
Comment 5 Ville Skyttä 2006-03-11 10:43:12 UTC
The CSS validator already detects if the validated document is XHTML, and ends the img element with "/>" if it is.  For non-XHTML documents it uses the plain ">" which is the right thing to do.  Compare for example:

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.w3.org&usermedium=all
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.yahoo.com&usermedium=all
Comment 6 Ville Skyttä 2006-03-11 10:46:17 UTC
See also the note in parenthesis below the code in question in the results page.
Comment 7 Bj 2006-03-11 10:48:14 UTC
Note that the bug was about some XML syntax error in the document the Validator was unable to detect, like adjacent attribute specifications and such. I'm not sure why it's still open, or what comment #3 is about...
Comment 8 Olivier Thereaux 2006-04-21 05:53:21 UTC
ditto bjoern,
- the initial report was about a problem in the markup validator, which we know about
- later comments are about something different, and Ville explained properly why it is a non issue.
closing.