473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

comparing results of validators

http://geocities.com/r_bullis/gallery2.html

Validator 3 at w3c totally annhialates the page.
It doesn't like comment tags, nor does it like "alt" not being used with img
tags.
While the jigsaw version now says the page is compliant.

Validator 3 doesn't like the added stuff yahoo puts on for their embedded
ads, while Jigsaw totally ignores them.

Validator 3 apparently does not like the use of inline <style> while jigsaw
does.
Most interesting.

So what is the proper use of comment tags within a division?
<!---- image 101 ---> is not approved of.
Excuse me. It's a comment. It should be ignored.
It ignored the // script comments.
Jul 21 '05 #1
11 1550
On Tue, 14 Dec 2004 10:29:16 -0600, "Richard" <An*******@127.001>
wrote:
http://geocities.com/r_bullis/gallery2.html

Validator 3 at w3c totally annhialates the page.
It doesn't like comment tags, nor does it like "alt" not being used with img
tags.
While the jigsaw version now says the page is compliant.
They're validating different things.
validator.w3.org is an HTML validator.
jigsaw.w3.org/css-validator/ is a CSS 'validator'.
Validator 3 doesn't like the added stuff yahoo puts on for their embedded
ads, while Jigsaw totally ignores them.
Because they're HTML errors not CSS errors.
So what is the proper use of comment tags within a division?
<!---- image 101 ---> is not approved of.
A comment starts and ends with two dashes. So you have an extra dash
after the end of the comment but before the close of the declaration.
That's an error.
Excuse me. It's a comment. It should be ignored.
It is ignoring the comment (everything between -- and --). It's the
stuff after the comment that's an error.
It ignored the // script comments.


Of course, the content of <script> blocks is CDATA and hence subject
to different parsing rules.

Steve

Jul 21 '05 #2
Once upon a time *Richard* wrote:
http://geocities.com/r_bullis/gallery2.html

Validator 3 at w3c totally annhialates the page.
What is "Validator 3"? Do you mean validator.w3.org?
It doesn't like comment tags, nor does it like "alt" not being used with img
tags.
While the jigsaw version now says the page is compliant.
The "jigsaw version" ( jigsaw.w3.org ) is a CSS validator only. It
does'nt validate anything else. The "validator.w3.org" validates HTML
Validator 3 doesn't like the added stuff yahoo puts on for their embedded
ads, while Jigsaw totally ignores them.
The validator don't like it because it's on top of the file, where the
doctype spec. should be. Jigsaw don't see any CSS in the "Yahoo stuff",
since it's javascript only(?)
Validator 3 apparently does not like the use of inline <style> while jigsaw
does.
Oh yes, it does. It's something else that cause the error.
So what is the proper use of comment tags within a division?
<!---- image 101 ---> is not approved of.
Excuse me. It's a comment. It should be ignored.
It ignored the // script comments.


The validator want just two hyphens in the comments, like
<!-- Correct comment -->
Don't ask me why, it's just like that it is :-)

--
/Arne
http://web.telia.com/~u97802964/

The old believe everything, the middle-aged suspect everything and the
young know everything. (Oscar Wilde)
Jul 21 '05 #3
*Richard* wrote:
<!---- image 101 ---> is not approved of.
Excuse me. It's a comment. It should be ignored.

Arne <us**@domain.invalid> wrote: The validator want just two hyphens in the comments, like
<!-- Correct comment -->
Don't ask me why, it's just like that it is :-)


As the FAQ <http://www.htmlhelp.com/faq/html/basics.html#html-comments>
explains:

A comment declaration starts with "<!", followed by zero or more
comments, followed by ">". A comment starts and ends with "--", and
does not contain any occurrence of "--" between the beginning and
ending pairs.

So, the first example should be interpretted as:

<! Start the declaration
-- Start a comment
-- End a comment
image 101 Text not within a comment (not allowed)
-- Start a comment
-> Text within a comment

And neither the second comment nor the declaration itself are closed.

But browsers don't really support SGML comments. The practical rule for
HTML comments (from the FAQ) is:

An HTML comment begins with "<!--", ends with "-->", and does not
contain "--" or ">" anywhere in the comment. Do not put comments
inside tags (i.e., between "<" and ">") in HTML markup.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"FAILURE IS NOT AN OPTION. It comes bundled with the software."
Jul 21 '05 #4
Darin McGrew <mc****@stanfordalumni.org> wrote:
*Richard* wrote:


Could you change your quote line to something more standard? Removing
the asterikses or including the email address allows for more effective
filtering of follow ups.

--
Spartanicus
Jul 21 '05 #5
The main reason I use <!--- comment ---> is because the editor I use won't
accept anything less.
<! comment > is not acceptable.
<!- comment > is not acceptable.

I have used the same style before with validated pages.
So something else may have triggered the errors.
Jul 21 '05 #6
On Tue, 14 Dec 2004 13:27:44 -0600, Richard <An*******@127.001> wrote:
The main reason I use <!--- comment ---> is because the editor I use
won't accept anything less.


If your editor won't accept[1]

<!-- ... -->

then it's broken and time to find a new one.

[snip]

Mike
[1] I find it difficult to believe that an editor would somehow prevent
you from entering valid SGML comment delimiters.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #7
On Tue, 14 Dec 2004 13:27:44 -0600, "Richard" <An*******@127.001>
wrote:
The main reason I use <!--- comment ---> is because the editor I use won't
accept anything less.
IF your editor doesn't except <!-- comment --> then your editor is
very, very broken and you should drop it.
<! comment > is not acceptable.
<!- comment > is not acceptable.
Those aren't comments.
I have used the same style before with validated pages.
So something else may have triggered the errors.


You probably used <!-- comment --> before and simply didn't realise
that this time you'd used --- instead of --.

Steve

Jul 21 '05 #8

"Richard" <An*******@127.001> wrote in message
news:cp********@news3.newsguy.com...
The main reason I use <!--- comment ---> is because the editor I use won't
accept anything less.
<! comment > is not acceptable.
<!- comment > is not acceptable.
What you've just said is that you're using one wrong format because two
other wrong formats don't work. What have you got against using the right
format, the one with *two* hyphens on each end?

I have used the same style before with validated pages. So something else

may have triggered the errors.

I don't think so. When I run the following code through the validator:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<title>Comments</title>
<! comment >
<!- comment ->
<!-- comment -->
<!--- comment --->
<p>HELLO!</p>

I get the following error messages:

1. Line 3, column 0: character data is not allowed here

<! comment >

You have used character data somewhere it is not permitted to appear.
Mistakes that can cause this error include putting text directly in the body
of the document without wrapping it in a container element (such as a
<p>aragraph</p>) or forgetting to quote an attribute value (where characters
such as "%" and "/" are common, but cannot appear without surrounding
quotes).

2. Line 6, column 16: invalid comment declaration: found name character
outside comment but inside comment declaration

<!--- comment --->

3. Line 6, column 0: comment declaration started here

<!--- comment --->

In error message two, column 16 is the third hyphen in the second trio of
hyphens, and that particular hyphen is colored red. So that is indeed being
flagged as an error.

What I don't understand is why the version with *one* hyphen on each side is
accepted.
Jul 21 '05 #9
On Tue, 14 Dec 2004 10:29:16 -0600, "Richard" <An*******@127.001> wrote:
http://geocities.com/r_bullis/gallery2.html
[...]
So what is the proper use of comment tags within a division?
<!---- image 101 ---> is not approved of.
Excuse me. It's a comment.
Nope, it's not.

It's a Comment Start, directly followed by a Comment End, followed by
some misplaced text, followed by yet another Comment Start that has the
characters '->' in it and then never ends as a comment until the parser
finds yet another sequence of two consecutive 'dashes'.

At which place your page is already hopelessly lost for the validator
already.

You have totally misunderstood the correct syntax of an SGML(HTML)
comment.

It is built from the following bits and pieces.

<! = MDO = Markup Declaration Open
-- = COM = Comment Start or End = MDC = Markup Declaration Close
so the following is a valid comment in SGML(HTML)

<!-- this is a comment -->

Here is another one that is correct...

<!-- this is another comment --
-- with two comment lines in it --


....now move on to count the balance of 'double dashes' in your page
source.

Summary:

Two consecutive 'dashes' starts a comment, the next occurrence of two
consecutive 'dashes' ends that same comment.

The very first two 'dashes' _MUST_ follow directly after an initial MDO.

After the last two closing 'dashes' there can be arbitrary white space
(but absolutely no NAME characters) before the closing MDC.

You have some length of road to travel yet, but its nice to see that you
have an interest to learn :-)

Fix your obvious comment syntax errors first and then come back so we
can help you out with the rest of your problems.

--
Rex
Jul 21 '05 #10
On Tue, 14 Dec 2004 16:17:20 -0500, "Harlan Messinger"
<h.*********@comcast.net> wrote:

[...]
What I don't understand is why the version with *one* hyphen on each side is
accepted.


It's not accepted, just an effect of the parser needing to find a place
in the data stream where it can "recover" from total "mumbo-jumbo".

--
Rex
Jul 21 '05 #11
In article <32*************@individual.net>,
"Harlan Messinger" <h.*********@comcast.net> writes:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<title>Comments</title>
<! comment >
<!- comment ->
<!-- comment -->
<!--- comment --->
<p>HELLO!</p>

I get the following error messages:
[chopped]
1. Line 3, column 0: character data is not allowed here
2. Line 6, column 16: invalid comment declaration: found name character
outside comment but inside comment declaration
3. Line 6, column 0: comment declaration started here

What I don't understand is why the version with *one* hyphen on each side is
accepted.


It isn't. Lines 3 and 4 are character data, which has already been
reported as an error in the first message. Put it inside a <div>
(so character data *is* allowed) and get another surprise.

"Errors" 2 and 3 are a single error - which you have correctly
identified - and reporting it as two errors is a longstanding bug.
Validate it at Page Valet for a saner report.

--
Nick Kew
Jul 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
41
by: Odd-R. | last post by:
I have to lists, A and B, that may, or may not be equal. If they are not identical, I want the output to be three new lists, X,Y and Z where X has all the elements that are in A, but not in B, and...
6
by: Mark | last post by:
We have Validators embedded in an asp table server control. The table server control is necessary and cannot be replaced. We want to apply CSS formatting to the validators, but the validators...
3
by: John Blair | last post by:
Hi, I have validators outside of a datagrid (for adding a new grid row) - however when i click "edit" column and then the "update" column of a grid row that has been edited - my other...
1
by: Gabriel Lozano-Morán | last post by:
When using the tabstrip control combined with a multipage (several pageview) there is a problem when using validators. The problem is that validation also occurs on the validators that are not on...
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
20
by: Bill Pursell | last post by:
This question involves code relying on mmap, and thus is not maximally portable. Undoubtedly, many will complain that my question is not topical... I have two pointers, the first of which is...
5
by: Gerardo Herzig | last post by:
Hi all. Im in this situation: I want to perform several kind of (validating) methods to a given value. Lets say i have a class named Number, and the following methods: is_really_a_number(),...
2
hodgeman
by: hodgeman | last post by:
My second thread on thescripts, so hoping to get the same feedback and help as last time... I've developed an online invoicing and payment system for all my accounts for my web design company....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.