473,387 Members | 1,536 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,387 software developers and data experts.

Weird error on W3C css validator

Hi

The W3C css validation service at http://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "

Given that those fonts are very widely used and most are standard
Windows fonts, any idea why I'm getting this weird message from the
validator?

Dave
Jun 27 '08 #1
13 2067
On 12 May, 16:54, Dave Rado <dave.r...@dsl.pipex.comwrote:
Hi

The W3C css validation service athttp://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "

Given that those fonts are very widely used and most are standard
Windows fonts, any idea why I'm getting this weird message from the
validator?

Dave
It's okay I've discovered that the word Serif needed to have a capital
"S". Not a very helpful error message though!!

Dave
Jun 27 '08 #2
On May 12, 5:03*pm, Dave Rado <dave.r...@dsl.pipex.comwrote:
On 12 May, 16:54, Dave Rado <dave.r...@dsl.pipex.comwrote:
Hi
The W3C css validation service athttp://jigsaw.w3.org/css-validator/
claims that:
{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}
is invalid on the grounds that "Too many values or values are not
recognized "
Given that those fonts are very widely used and most are standard
Windows fonts, any idea why I'm getting this weird message from the
validator?
Dave

It's okay I've discovered that the word Serif needed to have a capital
"S". Not a very helpful error message though!!
When you changed it to a capital S did you also add the missing comma?

"Times Roman" serif should be "Times Roman", serif

By the spec you don't need a capital letter but you do need a comma.

Steve
Jun 27 '08 #3
Dave Rado <da*******@dsl.pipex.comwrites:
The W3C css validation service at http://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "
You're missing the comma between "Times Roman" and "serif".

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Jun 27 '08 #4
In article
<b1**********************************@t54g2000hsg. googlegroups.com>,
Dave Rado <da*******@dsl.pipex.comwrote:
Hi

The W3C css validation service at http://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "

Given that those fonts are very widely used and most are standard
Windows fonts, any idea why I'm getting this weird message from the
validator?
You should have a "," after "Times Roman"

--
dorayme
Jun 27 '08 #5
Dave Rado wrote:
On 12 May, 16:54, Dave Rado wrote:
>>
The W3C css validation service at http://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "
>
It's okay I've discovered that the word Serif needed to have a capital
"S". Not a very helpful error message though!!

The fact that the behavior changed reminds me of that old song...

"Comma, comma, comma, comma, comma, chameleon..."
-Boy George, Culture Club
--
John
At least I *think* that's what he was singing...
Jun 27 '08 #6
In article <48**********@news.bluewin.ch>,
John Hosking <Jo**@DELETE.Hosking.name.INVALIDwrote:
Dave Rado wrote:
On 12 May, 16:54, Dave Rado wrote:
>
The W3C css validation service at http://jigsaw.w3.org/css-validator/
claims that:

{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

is invalid on the grounds that "Too many values or values are not
recognized "

It's okay I've discovered that the word Serif needed to have a capital
"S". Not a very helpful error message though!!


The fact that the behavior changed reminds me of that old song...

"Comma, comma, comma, comma, comma, chameleon..."
-Boy George, Culture Club
The Boy George official site is under construction and has three html
errors at least. It looks so promising though.

--
dorayme
Jun 27 '08 #7
On 12 May, 22:32, dorayme <doraymeRidT...@optusnet.com.auwrote:
You should have a "," after "Times Roman"

--
dorayme
Yes, sorry.

I still think the validator's error message was very unhelpful though.

Dave
Jun 27 '08 #8
Dave Rado wrote:
On 12 May, 22:32, dorayme <doraymeRidT...@optusnet.com.auwrote:
>You should have a "," after "Times Roman"

--
dorayme

Yes, sorry.

I still think the validator's error message was very unhelpful though.
All the validator knew at the point where it reached "serif"--or even
just the "s"--was that it was expecting to see one of the following but
not seeing any of them (not sure this is an exhaustive list): a comma;
!important; a semicolon; or the end of the list. It can't tell you
"you're missing a comma" because it doesn't know from its point of view
that that's the nature of the problem. Granted, the least it could do is
show you the position of the character where it identified the presence
of a problem.
Jun 27 '08 #9
On Tue, 13 May 2008, dorayme wrote:
>{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif}

You should have a "," after "Times Roman"
You should have a "," after "Times".

There's "Times New Roman" and there's "Times".
But "Times Roman" is not the name of a typeface family, afaik.
The Times typeface family consists of
Times Roman, Times Italic, Times Bold, Times Bold Italic.

/*
I'm still convinced that the name "Times New Roman" for
a typeface *family* is a misnomer. It ought to be Times New.
*/

--
http://groups.google.com/groups/sear...Alan.J.Flavell
Jun 27 '08 #10
Harlan Messinger wrote:
Dave Rado wrote:
>On 12 May, 22:32, dorayme <doraymeRidT...@optusnet.com.auwrote:
>>You should have a "," after "Times Roman"

--
dorayme

Yes, sorry.

I still think the validator's error message was very unhelpful though.

All the validator knew at the point where it reached "serif"--or even
just the "s"--was that it was expecting to see one of the following but
not seeing any of them (not sure this is an exhaustive list): a comma;
!important; a semicolon; or the end of the list. It can't tell you
"you're missing a comma" because it doesn't know from its point of view
that that's the nature of the problem. Granted, the least it could do is
show you the position of the character where it identified the presence
of a problem.
On reflection I realize I was missing the fact that the validator DID
tell you something specific: that there were too many values. It DID
construe "serif" to be a value *because* it followed the preceding items
without an intervening comma, semicolon, etc. The problem is you not
knowing what they meant by "value". CSS has composite properties like
font, border, margin, etc., that can set several individual properties
at once--for example, you can use font to set several font-related
properties:

font: serif 1.2em italic;

This example has three values.

It's weird, but CSS uses commas to separate alternatives *within* a
value while it uses spaces to separate values. So in

"Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif

one value is

"Book Antiqua", Palatino, "Times New Roman", "Times
Roman"

and the other is

serif

Since font-family isn't a composite property, it takes only one value,
so the validator characterized the error as an excess of values.
Jun 27 '08 #11
Scripsit Harlan Messinger:

[discussing error reporting for
{font-family: "Book Antiqua", Palatino, "Times New Roman", "Times
Roman" serif} ]
All the validator knew at the point where it reached "serif"--or even
just the "s"--was that it was expecting to see one of the following
but not seeing any of them (not sure this is an exhaustive list): a
comma; !important; a semicolon; or the end of the list.
Actually, "end of the list" doesn't belong here - it's not a syntactic
construct as such.
It can't tell
you "you're missing a comma" because it doesn't know from its point
of view that that's the nature of the problem. Granted, the least it
could do is show you the position of the character where it
identified the presence of a problem.
It _could_ also tell that it was expecting one of ",", "!important", and
";", as you wrote. But this would probably require a major rewrite of
the program. Moreover, with some extra analysis, it could tell that
indeed a comma is apparently missing, since adding a comma is the
minimal change that makes the construct syntactically correct. Or,
perhaps simpler, since serif is a keyword with a specific meaning, it
cannot start a new declaration or a new rule, so a comma is what is
missing.

If the construct had
"Times Roman" foobar}
then such an analysis would not be possible without lookahead, since
taken locally, the problem might be a missing "}" and foobar might be a
selector, starting a new rule. With lookahead, it might be possible to
judge that this is less like than missing ",".

Advanced error reporting and recovery is possible but it means tedious
work (though this depends on the syntax of the language - CSS is
relatively easy in this respect). Moreover, the risk of issuing very
confusing messages when trying to be helpful is very real. (Been there,
done that.)

In practical terms, a person who checks a stylesheet must be assumed to
know CSS well and to figure out, from good references, where the problem
really is. Automatic checking effectively just tells that _something_ is
wrong and coarsely identifies the location of the problem. Helpful error
messages would be nice, but I can understand that there is little
motivation for working on them.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #12
In article
<3f**********************************@f36g2000hsa. googlegroups.com>,
Dave Rado <da*******@dsl.pipex.comwrote:
On 12 May, 22:32, dorayme <doraymeRidT...@optusnet.com.auwrote:
You should have a "," after "Times Roman"

--
dorayme

Yes, sorry.

I still think the validator's error message was very unhelpful though.
It's a robot, it does not know quite what is wrong and so it has a stab
and we have to read between the lines. <g>

It can take x hours to design a machine to do a job. To turn that
machine into turn-key operation would mean blowing the budget because
the turn-key bit would take an unreasonable proportion of time and
effort.

What does this last mean? It means that a team can engineer a plant that
is excellent for trained staff to use in 18 months for $US1.5 million.
But that it might take 5 years and $US6 million to turn it into a plant
that less trained staff can use. In other words it is cheaper to train
staff!

--
dorayme
Jun 27 '08 #13
Hi Andreas

On 13 May, 15:40, Andreas Prilop <prilop2...@trashmail.netwrote:
There's "Times New Roman" and there's "Times".
But "Times Roman" is not the name of a typeface family, afaik.
The Times typeface family consists of
Times Roman, Times Italic, Times Bold, Times Bold Italic.
How confusing! Thanks for letting me know.

Dave
Jun 27 '08 #14

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

Similar topics

8
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta...
5
by: Frances Del Rio | last post by:
I'm connected to internet via Comcast cable modem, very fast connection, usu. have no problems, but all of a sudden there are a number of sites I can't get to (while others no problem.. very...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
5
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This is used for comparing a value enterd by the user against the primary key in the SQL database. IF the VALUE ENTERED BY THE...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
3
by: Nick Goloborodko | last post by:
Hi, I've been having a really weird problem with required field validator. Here's the detailed description of the problem: I have originally been developing my web application on Windows XP...
18
by: William | last post by:
I have the following javascript function that updates a scroll_list and sends the updated entry (with its index) to a server script ( i.e. http://mkmxg00/cgi/confirmUpload.pl ) for further...
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
3
by: Adrock952 | last post by:
I have a form which validates fine using classes but i would like the fields that have the error to be highlighted a different color At the moment I just get a list of errors but would like a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.