473,809 Members | 2,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
13 2109
On 12 May, 22:32, dorayme <doraymeRidT... @optusnet.com.a uwrote:
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 #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************ *************** *******@f36g200 0hsa.googlegrou ps.com>,
Dave Rado <da*******@dsl. pipex.comwrote:
On 12 May, 22:32, dorayme <doraymeRidT... @optusnet.com.a uwrote:
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...@tra shmail.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
5752
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 http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <title>Untitled</title>
5
1740
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 weird..) this is happening on both IE and N, I cleared cache on both of them, N even crashed before, when I got alert saying it can't find a site.. these are some of the sites I can't get to, browser just "hangs" for a long time, then I get a 404.. ...
11
13732
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, there's an "Edit" link. So the page itself looks something like this: <HTML><HEAD><TITLE>blah</TITLE></HEAD><BODY> <!-- TEXT STARTS HERE --> <H1>Hello World!</H1> <P>More stuff here...</P>
5
3596
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 USER EXISTS IN THE DB , then THE ERROR MESSAGE OF THE COMPARE VALIDATOR SHOULD BE DISPLAYED. For this, I used the reference artiicle...
8
7840
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 VALUE ENTERED BY THE USER EXISTS IN THE DB , then THE ERROR MESSAGE OF THE COMPARE VALIDATOR SHOULD BE DISPLAYED. For this, I used the reference artiicle "http://msdn.microsoft.com/library/default.asp?url=/library/en-...
3
2010
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 SP2 under IIS5 with .NET framework V1.1.4322. I have had a couple of RequiredFieldValidator, to ensure that the user enter the username and password on the login form and avoid unnessesary postbacks.
18
7344
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 processing: function saveText( scroll_list, t_area, listToBeUpdated ) { scroll_list.options.text = t_area.text; scroll_list.options.value= t_area.value; var req; var url = "http://mkmxg00/cgi/confirmUpload.pl";
28
13210
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 yow But, in firefox, for same html, getting this:
3
2548
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 field that failed validation changed color. here is my code validator class <?php class Validator { var $errors;
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10637
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10379
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7660
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.