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

Content-Type not a reserved name?


I'm trying to validate a page that begins with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.did>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
....
which fails at this line with:

"CONTENT-TYPE" is not a reserved name

Can anyone help me? TIA.

D.

Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant
Jul 20 '05 #1
13 5165
Dennis M. Straussfogel wrote:
I'm trying to validate a page that begins with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.did>
a typo: loose.dtd (not loose.did)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


The syntax is wrong. You should not have /> at the end (that' xhtml
syntax, but your document is html). More importantly, you should set
the content type and charset using real http headers. A search on
Google produced the following document authored by Alan Flavell:

http://ppewww.ph.gla.ac.uk/~flavell/...t/ns-burp.html

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
dm*@bcgroup.net (Dennis M. Straussfogel) wrote:
I'm trying to validate a page that begins with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.did>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

which fails at this line with:

"CONTENT-TYPE" is not a reserved name


You're missing a " at the end of the URL in the doctype. Hence the
validator sees something like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"long string" Content-Type" content="text/html; charset=iso-8859-1" />

The next problem will be the XHTML <meta /> in an HTML document. Never
use that last / in empty elements in HTML, only in XHTML.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
In article <dm******************@news.abccom.bc.ca>, one of infinite monkeys
at the keyboard of dm*@bcgroup.net (Dennis M. Straussfogel) wrote:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

which fails at this line with:

"CONTENT-TYPE" is not a reserved name


Huh? Whatever tool reported that as a "fail" is talking nonsense.

But Brian's followup makes some valid points you should note.

--
Nick Kew
Jul 20 '05 #4
On Sat, 17 Jan 2004 20:15:44 GMT, Brian
<us*****@julietremblay.com.invalid-remove-this-part> wrote:
Dennis M. Straussfogel wrote:
I'm trying to validate a page that begins with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.did>
a typo: loose.dtd (not loose.did)


I think that causes the later error.
The syntax is wrong. You should not have /> at the end (that' xhtml
syntax, but your document is html).


AFAIK, it should still validate as HTML 4 with the _/>.
Jul 20 '05 #5
Neal wrote:
AFAIK, it should still validate as HTML 4 with the _/>.


No, it shouldn't.

<link ... /> is equiv to <link ... >&gt;

While you can have characters in the <body> section of the document (thus
<br /> being valid HTML 4.01 that looks horrible if it does what is
_should_ do), you can't in the <head> section.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #6
On Sat, 17 Jan 2004, Neal wrote:
The syntax is wrong. You should not have /> at the end (that' xhtml
syntax, but your document is html).

Indeed.
AFAIK, it should still validate as HTML 4 with the _/>.


Please explain.
Jul 20 '05 #7
Many thanks to all of you. I've embarrassed enough people finding their
stupid typos, that it's only fair turn about for my face to be duely
reddened. Sorry.

BTW, the " />" at the end was added as a "grasping at straws" attempt of
solution. I guess I also overfocused on the statement flagged as the error
and didn't look closely enough at the one(s) preceding it. (Really. I do
know better!)

Another question: In attempting to solve the problem, I did add an
..htaccess file to my root directory with the directive

AddType "text/html; charset=iso-8859-1" html

which should specify the charset for files with the .html extension. Will
this also specify for .shtml extensions as well, or do I need a second
directive line with "shtml" at the end? TIA--again.

D.

Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant
Jul 20 '05 #8
dm*@bcgroup.net (Dennis M. Straussfogel) wrote:
Another question: In attempting to solve the problem, I did add an
.htaccess file to my root directory with the directive

AddType "text/html; charset=iso-8859-1" html

which should specify the charset for files with the .html extension. Will
this also specify for .shtml extensions as well,
No.
or do I need a second directive line with "shtml" at the end?


Or more simply just add shtml to the end of the line above.
AddType "text/html; charset=iso-8859-1" html shtml

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #9
In article <84********************************@4ax.com>, Steve Pugh
<st***@pugh.net> wrote:
dm*@bcgroup.net (Dennis M. Straussfogel) wrote:
Another question: In attempting to solve the problem, I did add an
.htaccess file to my root directory with the directive

AddType "text/html; charset=iso-8859-1" html

which should specify the charset for files with the .html extension. Will
this also specify for .shtml extensions as well,


No.
or do I need a second directive line with "shtml" at the end?


Or more simply just add shtml to the end of the line above.
AddType "text/html; charset=iso-8859-1" html shtml

Steve


Thanks, Steve. And finally (I promise) can I delete the META tag
altogether if the charset is specified in the .htaccess file?

Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant
Jul 20 '05 #10
It seems "Dennis M. Straussfogel" wrote in
comp.infosystems.www.authoring.html in article <dms-
17**************@news.abccom.bc.ca>:
Thanks, Steve. And finally (I promise) can I delete the META tag
altogether if the charset is specified in the .htaccess file?


I'm not Steve, but the answer is an emphatic "you can, and you
should".

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #11
On Sat, 17 Jan 2004 22:42:34 +0000, David Dorward <do*****@yahoo.com>
wrote:
Neal wrote:
AFAIK, it should still validate as HTML 4 with the _/>.


No, it shouldn't.

<link ... /> is equiv to <link ... >&gt;


Ya, you're right. I'll buy the donuts tomorrow.
Jul 20 '05 #12
Stan Brown:
It seems "Dennis M. Straussfogel" wrote in
comp.infosystems.www.authoring.html in article <dms-
17**************@news.abccom.bc.ca>:
Thanks, Steve. And finally (I promise) can I delete the META tag
altogether if the charset is specified in the .htaccess file?

I'm not Steve, but the answer is an emphatic "you can, and you
should".


Maybe. One should however be aware that if a user saves such a page to
his own disc, the info about content-type and encoding will no longer be
present. If the same info is also included in a "meta" element in the
page, that will help a browser that reads the same file from disc.

That's the reason why e.g. Yukka does include a "meta" element with
content-type and encoding in his pages, although his server (of course)
sends the same info in the http header.

If Yukka does it, it can't be all that wrong, can it?

--
Bertilo Wennergren <be******@gmx.net> <http://www.bertilow.com>
Jul 20 '05 #13
It seems "Dennis M. Straussfogel" wrote in
comp.infosystems.www.authoring.html in article <dms-
17**************@news.abccom.bc.ca>:
Thanks, Steve. And finally (I promise) can I delete the META tag
altogether if the charset is specified in the .htaccess file?
Stan Brown:
I'm not Steve, but the answer is an emphatic "you can, and you
should".

It seems "Bertilo Wennergren" wrote in
comp.infosystems.www.authoring.html in article
<bu*************@news.t-online.com>:Maybe. One should however be aware that if a user saves such a page to
his own disc, the info about content-type and encoding will no longer be
present. If the same info is also included in a "meta" element in the
page, that will help a browser that reads the same file from disc.
I stand corrected. I was thinking only about the published version.
That's the reason why e.g. Yukka does include a "meta" element with
content-type and encoding in his pages, although his server (of course)
sends the same info in the http header.

If Yukka does it, it can't be all that wrong, can it?


:-)

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #14

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

Similar topics

3
by: Headless | last post by:
Should linking generated content work? Example: span:before{content:"foobar"} <a href="foobar.htm"><span></span></a> I stumbled across this bit in the CSS2 spec: >Generated content does...
0
by: Jimmy Cerra | last post by:
I recently came up with a cool little stylesheet for definition lists. There is a small demostration for the impatient . I hope this helps someone. Here's how I did it. Definition lists are...
0
by: Scott Abel | last post by:
For immediate release: The Rockley Group Content Management Workshop Series Coming to Atlanta, Seattle, Vancouver, Chicago, Washington, DC, Toronto, and Research Triangle Park Learn more:...
14
by: j1c | last post by:
How can I remove the content in between tags? I have a page that has several custom tags: <!--tag:1--> Content 1 <!--/tag:1--> <br> <!--tag:2--> Content 2 <!--/tag:2--> <br> <!--tag:3--> Content 3...
1
by: Richard | last post by:
http://dynamicdrive.com/dynamicindex5/linkinfo.htm Using the above script, I have a plan whereby when the main link is active, two different content swaps take place. Column A shows the main...
7
by: Water Cooler v2 | last post by:
I know what it is, and yet the knowledge of what a CMS is, is so vague that I find myself asking this question every now and then. I've googled and read the resources too. However, the knowledge is...
0
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and...
1
by: dave8421 | last post by:
Hi, I'm trying to make sense of the definition for "Rendered Content" in current CR for CSS 2.1 Is rendered content what is displayed on the particular media or device? from the...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
5
by: jessy | last post by:
hi, i have an FreeRTE editor used in my site but whenever i enter something in the TextArea of the editor is not showing in the DB , can anyone tell me what's wrong with my that Piece of Code ...
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
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.