validation with w3c with 0 errors

B

Bjoern Hoehrmann

* y-man wrote in comp.text.xml:
I am trying to get a working XML website. I tried to validate it
through the w3c validator and removed all errors it returned. Now it
just says that my code is not valid and that there are 0 errors. Could
anyone tell me what is wrong with it?

The W3C Markup Validator is not currently suited for your needs, you
should pick some other tool to check your XML documents. Presumably
the issue here is that the Validator does not know the DTD you are
using.
 
Y

y-man

Bjoern Hoehrmann schreef:
* y-man wrote in comp.text.xml:

The W3C Markup Validator is not currently suited for your needs, you
should pick some other tool to check your XML documents. Presumably
the issue here is that the Validator does not know the DTD you are
using.

aha! Thank you, so what is a good validator for this type of XML then?
 
J

Johannes Koch

y-man said:
I am trying to get a working XML website. I tried to validate it
through the w3c validator and removed all errors it returned. Now it
just says that my code is not valid and that there are 0 errors. Could
anyone tell me what is wrong with it?

<http://validator.w3.org/check?verbose=1&uri=http://staff.science.uva.nl/~ygrange/bla/index.xml>:

Missing "charset" attribute for "text/xml" document.

The HTTP Content-Type header (text/xml) sent by your web server
(Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.8d PHP/4.4.4) did not
contain a "charset" parameter, but the Content-Type was one of the XML
text/* sub-types.

The relevant specification (RFC 3023) specifies a strong default of
"us-ascii" for such documents so we will use this value regardless of
any encoding you may have indicated elsewhere.

If you would like to use a different encoding, you should arrange to
have your server send this new encoding information.
 
A

Andy Dingley

y-man said:
I am trying to get a working XML website.

Why? What's an "XML website" anyway? The web runs on HTML, not XML
(and not even XHTML). If you're doing "web publishing", then do it in
HTML. (Read c.i.w.a.h for the interminable debate over Appendix C)

If you're using some internal XML format for an internal CMS task and
transcoding it into HTML on output, then that's OK. I'd question why
you're using DTD here though, rather than XML Schema or even Relax NG.

As to the benefit of an "XML website" in this incarnation, then I'd
also suggest that your DTD is both idiosyncratic and no more use than
plain HTML would have been. Re-inventing wheels is always bad enough,
but don't do it unless the existing wheel is square and yours is so
much better as to be frictionless!


As an implementation issue of your current page, then the encoding and
its description is dubious. You've tried to specify this in the XML
prolog inside the file itself, but that's really only intended for use
with files, not HTTP documents. You should really specifiy this
explicitly with a HTTP content-type header in the web server's
response.

If you don't specifiy this clearly through HTTP then there's a whole
bunch of rules as to the precedence between the ISO-8859 you've
specified and what various sniffing algorithms try and make of the
document. Chances are that they won't give the answer you expect and it
gets horribly confusing - so set that HTTP header !

I tried to validate it through the w3c validator

Which one? There used to be a W3C XML validator, but I haven't seen it
in years and don't know if it's still there. If you throw your page
into their _HTML_ validator at validator.w3.og then anything could
happen - it's not intended for general XML use and isn't particularly
good at it.

By the looks of things, your file is valid but the encoding isn't
clearly specified and that's itself enough to make the validator choke
on it as a usable web document.
 
Y

y-man

Andy Dingley schreef:
Why? What's an "XML website" anyway? The web runs on HTML, not XML
(and not even XHTML). If you're doing "web publishing", then do it in
HTML. (Read c.i.w.a.h for the interminable debate over Appendix C)

If you're using some internal XML format for an internal CMS task and
transcoding it into HTML on output, then that's OK. I'd question why
you're using DTD here though, rather than XML Schema or even Relax NG.
I use a DTD because I wanted to get the outputted website to be
validated correctly. The original website validated correctly, but the
markup was rather complex (actually it is another website than the one
I show you because I do not have access to that one for the moment; but
the idea is the same) so I really wanted to chane it to an xml form (as
an internal CMS task as you say). But then there is no way of finding
out if the code which is spitted out is valid or not and it is an
integral part of the website that it should be validated when changed.
But there is no way I can see to access the created HTML output with
the validator.

As to the benefit of an "XML website" in this incarnation, then I'd
also suggest that your DTD is both idiosyncratic and no more use than
plain HTML would have been. Re-inventing wheels is always bad enough,
but don't do it unless the existing wheel is square and yours is so
much better as to be frictionless!


As an implementation issue of your current page, then the encoding and
its description is dubious. You've tried to specify this in the XML
prolog inside the file itself, but that's really only intended for use
with files, not HTTP documents. You should really specifiy this
explicitly with a HTTP content-type header in the web server's
response.
I do not have any possibilities to edit the web servers response. This
seemed a good alternative. Or could I set it without any rights?
If you don't specifiy this clearly through HTTP then there's a whole
bunch of rules as to the precedence between the ISO-8859 you've
specified and what various sniffing algorithms try and make of the
document. Chances are that they won't give the answer you expect and it
gets horribly confusing - so set that HTTP header !



Which one? There used to be a W3C XML validator, but I haven't seen it
in years and don't know if it's still there. If you throw your page
into their _HTML_ validator at validator.w3.og then anything could
happen - it's not intended for general XML use and isn't particularly
good at it.
I put it in the XML validator. This required me to make my own DTD and
I did so.
By the looks of things, your file is valid but the encoding isn't
clearly specified and that's itself enough to make the validator choke
on it as a usable web document.
ok.
 
A

Andy Dingley

y-man said:
I use a DTD because I wanted to get the outputted website to be
validated correctly.

First of all, you just can't make a website in XML Use HTML. Don't put
XML on the web and expect anything to work!

You can validate with anything. Just use an appropriate combination of
the language to specifiy the structure in (DTD / Schema / Relax) and
the relevant validator. You can almost certainly find an open source
validator that you can download and use locally, without needing to use
an on-line validatior such as the W3C.

I do not have any possibilities to edit the web servers response. This
seemed a good alternative. Or could I set it without any rights?

You're running Apache, so you can usually set this through .htaccess
(unless the central admins have disabled this)
 
Y

y-man

Andy Dingley schreef:
First of all, you just can't make a website in XML Use HTML. Don't put
XML on the web and expect anything to work!

You can validate with anything. Just use an appropriate combination of
the language to specifiy the structure in (DTD / Schema / Relax) and
the relevant validator. You can almost certainly find an open source
validator that you can download and use locally, without needing to use
an on-line validatior such as the W3C.
But I can not access the HTML generated code over te web, so how do I
validate then?
You're running Apache, so you can usually set this through .htaccess
(unless the central admins have disabled this)
Ah. will try that
 
A

Andy Dingley

y-man said:
But I can not access the HTML generated code over te web, so how do I
validate then?

Download a validator and use it locally, on local files. You can do
this to your XML, or to the HTML you transform it into (presumably by
XSLT).
 
Y

y-man

Andy Dingley schreef:
Download a validator and use it locally, on local files. You can do
this to your XML, or to the HTML you transform it into (presumably by
XSLT).

ah ok. Thank you a lot@
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

W3C validation error 11
Help with code 0
W3C 7
Help with my responsive home page 2
Even McMahon fails validation 21
validation 1
POST local storage - angular 0
problem with w3c validation 4

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top