- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Wed, 4 Oct 2006 20:31:20 +0300 (EEST)
- To: Rick Stanley <rstanley@rsiny.com>
- cc: www-validator@w3.org
On Wed, 4 Oct 2006, Rick Stanley wrote: > Warning Line 5 column 44: > character "<" is the first character of a delimiter but occurred as > data. > <meta name="revised" content="Time-stamp: <2006-10-03 22:54:38 rick> " /> The warning is misleading. The character "<" is just a data character when it appears inside an attribute value. There it is not a delimiter of any kind. The validator wants to say, informatively, that it is still recommendable to represent it as "<". Don't ask me why. I guess someone has observed some browser or some other software getting the rules wrong. > This is a emacs editor Timestamp. Since I can only use 'Time-stamp: "' > ", or 'Time-stamp: <>' I used the latter since it needed to go inside > quotes. I guess Emacs may use the timestamp for its internal business, expecting to find it in a particular notation, so I would _not_ change the "<" to "<", even though any correct SGML or XML parser should still get it right. We can't expect text editors to do correct parsing. > Should the validator notice what is inside of quotes, Yes, as regards to entity and character references. No, as regards to anything else, including "<" - though a validator may have a second job as a heuristic checker, and in that role it may notice whatever it likes. > especially inside of a meta tag? That's irrelevant in validation. An attribute value declared as CDATA shall be processed by the same rules, no matter what the element name is. > The '<', and '>' characters are NOT > deliminators INSIDE of a quoted string. Inside an attribute value, that is. That's the key. Quotation marks or apostrophes are needed to delimit the attribute value (at least when you have "<" inside it, and always in XHTML), but that's secondary. > I don't think this should invoke a warning. I tend to agree. Is there any tangible benefit from the warning? Does it help people to create practically more robust documents? I don't think so, unless there's some relevant software still in uses that parses attribute values all wrong. Besides, even a program incorrectly looks for tag open characters, i.e. "<", inside an attribute value, it most likely treats them as data characters when followed by a digit and not a letter. At least the warning, if retained, should be rephrased, e.g. simply as "Warning: character < used as data character" -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 4 October 2006 17:31:40 UTC