473,698 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validation error

Ray
I've got a couple of webpages that I am trying to validate but I get this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F
of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be
able to validate this document. Sorry. Please make sure you specify the
character encoding in use.

What am I doing wrong? They are just simple html files typed up in Notepad.
Why can't it detect them? I have tried validating both the uploaded version
and the local version and I get the same error both ways.

Ray
Jul 20 '05 #1
4 1761
Ray wrote:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix
F of the XML 1.0 Recommendation. Why can't it detect them?


I would imagine that it is becuase the content type field in the http
header, XML declaration and <meta> data don't tell the validator what
character set to try.

http://www.htmlhelp.com/tools/validator/charset.html

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2
"Ray" <he*********@my way.com> wrote:
I've got a couple of webpages that I am trying to validate but I get this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F
of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be
able to validate this document. Sorry. Please make sure you specify the
character encoding in use.

What am I doing wrong?
You're not telling the validator (or any other user agent - such as
your visitors' browsers) what the character encoding used by your
pages is. That information is needed to validate the page (it's also
needed to render the page, but browsers have defaults/make guesses).
They are just simple html files typed up in Notepad.
Why can't it detect them?
It's detecting your pages just fine. It just can't validate them
without a bit more information.

You can provide this information in one of three ways, as the error
message says:
a.. The HTTP Content-Type field.
This is done by configuring your server. If at all possible this is
the preferred method.
b.. The XML Declaration.
This only applies to XHTML, goes before the doctype declaration right
at the start of your code and takes this form:
<?xml version="1.0" encoding="ISO-8859-1"?>
Replacing ISO-8859-1 with whatever character encoding you are using.
Note that including this declaration will cause IE to enter Quirks
mode regardless of the doctype, and thus this is often best avoided.
c.. The HTML "META" element.


The least preferred method, include the following in the head of your
page:
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
Again, replacing ISO-8859-1 with whatever character encoding you are
using.

If you are validating pages that will later move to a server which
sends out proper character encoding information then you can
temporarily emplouy and over ride by using teh validator's extended
interface: http://validator.w3.org/detailed.html and choosing your
encoding from the menu provided.

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
On Fri, 20 Feb 2004 11:51:14 -0600, Ray <he*********@my way.com> wrote:
I've got a couple of webpages that I am trying to validate but I get
this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in
Appendix F
of the XML 1.0 Recommendation.

Frustrating, isn't it? The other respondants are right on, but I'll add
that if you go to http://validator.w3.org/file-upload.html you can upload
files and specify the charset without including it in the HTML.
(http://validator.w3.org/detailed.html allows this option with uploaded
files.)
Jul 20 '05 #4
"Ray" <he*********@my way.com> wrote in message
news:10******** *****@corp.supe rnews.com...
I've got a couple of webpages that I am trying to validate but I get this error message when trying to validate them with the www.w3.org HTML
validator: <trimmed>
What am I doing wrong? They are just simple html files typed up in Notepad. Why can't it detect them? I have tried validating both the uploaded version and the local version and I get the same error both ways.


Hi Ray. Here's an analogy to your post: "Dear All, My doctor has said
I'm ill and has given me a prescription (enclosed), but I want a second
opinion, so what's wrong with me? Thanks. Bye." In other words we'll
need to see the patient - a link to the uploaded version of your
webpage! :o)

However, looking at the "prescripti on" your webpage has no associated
'meta' information describing what the content is, so check to see if
your webserver is setting a content-type as a header, or add a meta tag
to the <head> section of the page, possibly something like: <meta
http-equiv="content-type" content="text/html" /> if it's HTML or ending
/> instead of > if it's XHTML.
--
Andrew Urquhart
Reply: http://www.andrewu.co.uk/about/conta...ewsgroup_ciwah
Jul 20 '05 #5

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

Similar topics

2
9451
by: Shone | last post by:
I would like to perform a 2-pass XML reading from a stream. Once using the Validating reader, just to confirm the validity against the schema, and next time to do a reading to extract the data. Actually, second time I do a deserialization, the data from XML is fed directly to an object. The problem I am experiencing is the error at the second reading attempt, and error description implies that reader is winded to the end of the XML and...
2
10418
by: Doslil | last post by:
I am trying to validate the fields in my database.I have already validated the fields to check for not null.Here is what I have written for Numeric and text field. Private Function EENUM() On Error GoTo EENUMErr If IsNull(Me.EmployeesID) Or Me.EmployeesID = "" Or Me.EmployeesID < 0 Then MsgBox "Employee Number Cannot Be Left Blank", vbOKOnly, "Employee Number"
3
2337
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the items missing etc.all working fine... However, when the user logs in I fire off to a stored procedure, at this point, unless the login is successful I can return up to about 8 different error numbers in a string which I then split out into an...
14
6299
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2) show the error message next to the control. For example, if the text field is empty with RequiredField Validator control, it can show the value in ControlToValidate property in two ways as I mentioned. Please advise. Thanks!
2
3999
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the IIS Server of my Workstation (Win XP) with a text box, button and required field validator, this works fine. If I create the same page on the IIS6 Windows 2003 Server the validation control doesn't stop the post. I've tried different browsers and...
12
2258
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation errors show up in your error-list, you can disable this functionality by selecting the Tools->Options menu item in VS or Visual Web Developer. Select the TextEditor->Html->Validation tree option in the left-hand side of the
9
4173
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be honest I usually hire someone to do it for me, grab predone scripts and kind of hack out the parts that I need, or just do very minimal validation (e.g. this is numeric, this is alpha-numeric, etc.)
11
2994
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether certain fields match certain criteria, and inform the user in different ways when the data is wrong (offcourse, this will be checked on posting the data again, but that's something I've got a lot of experience with). Now, offcourse it's...
3
2752
by: teo | last post by:
Mozilla error on postback and validation ----------- A Button causes a Listbox to desappear. If no item has been selected on the Listbox, all is OK. If one or more items are selected,
7
3611
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
0
8675
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
8604
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
9029
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
8897
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,...
0
5860
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
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2331
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.