Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 19th, 2006, 11:15 AM
y-man
Guest
 
Posts: n/a
Default validation with w3c with 0 errors

Hi,

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://staff.science.uva.nl/~ygrange/bla/index.xml

thanks a lot

y.g.g.

  #2  
Old December 19th, 2006, 11:45 AM
Bjoern Hoehrmann
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors

* y-man wrote in comp.text.xml:
Quote:
>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.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
  #3  
Old December 19th, 2006, 12:05 PM
y-man
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


Bjoern Hoehrmann schreef:
Quote:
* y-man wrote in comp.text.xml:
Quote:
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.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld..de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
aha! Thank you, so what is a good validator for this type of XML then?

  #4  
Old December 19th, 2006, 12:15 PM
Johannes Koch
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors

y-man schrieb:
Quote:
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%3A%2F%2Fstaff.science.uva .nl%2F~ygrange%2Fbla%2Findex.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.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
  #5  
Old December 19th, 2006, 12:35 PM
Andy Dingley
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


y-man wrote:
Quote:
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 !

Quote:
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.

  #6  
Old December 19th, 2006, 01:25 PM
y-man
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


Andy Dingley schreef:
Quote:
y-man wrote:
>
Quote:
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.
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.

Quote:
>
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?
Quote:
>
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 !
>
>
Quote:
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.
>
I put it in the XML validator. This required me to make my own DTD and
I did so.
Quote:
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.

  #7  
Old December 19th, 2006, 03:25 PM
Myron Turner
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors

http://xmlcooktop.com/

y-man wrote:
Quote:
>
aha! Thank you, so what is a good validator for this type of XML then?
>

--

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/
  #8  
Old December 19th, 2006, 04:25 PM
Andy Dingley
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


y-man wrote:
Quote:
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.

Quote:
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)

  #9  
Old December 20th, 2006, 02:15 PM
y-man
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


Andy Dingley schreef:
Quote:
y-man wrote:
>
Quote:
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.
But I can not access the HTML generated code over te web, so how do I
validate then?
Quote:
>
>
Quote:
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)
Ah. will try that

  #10  
Old December 20th, 2006, 03:15 PM
Andy Dingley
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


y-man wrote:
Quote:
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).

  #11  
Old January 8th, 2007, 11:05 AM
y-man
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


Andy Dingley schreef:
Quote:
y-man wrote:
>
Quote:
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).
ah ok. Thank you a lot@

  #12  
Old January 8th, 2007, 11:55 AM
Andy Dingley
Guest
 
Posts: n/a
Default Re: validation with w3c with 0 errors


y-man wrote:
Quote:
Quote:
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@
Try the new (0.8) validator for Firefox. It used to be based on just
Tidy, but now it can run a full validator too.

http://users.skynet.be/mgueury/mozilla/

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles