validation with w3c with 0 errors

Discussion in 'XML' started by y-man, Dec 19, 2006.

  1. y-man

    y-man Guest

    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.
    y-man, Dec 19, 2006
    #1
    1. Advertising

  2. * 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.
    --
    Björn Höhrmann · mailto: · 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/
    Bjoern Hoehrmann, Dec 19, 2006
    #2
    1. Advertising

  3. y-man

    y-man Guest

    Bjoern Hoehrmann schreef:

    > * 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.
    > --
    > Björn Höhrmann · mailto: · 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?
    y-man, Dec 19, 2006
    #3
  4. y-man schrieb:
    > 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.)
    Johannes Koch, Dec 19, 2006
    #4
  5. y-man

    Andy Dingley Guest

    y-man wrote:

    > 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.
    Andy Dingley, Dec 19, 2006
    #5
  6. y-man

    y-man Guest

    Andy Dingley schreef:

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


    >
    > 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 !
    >
    >
    > > 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.

    > 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.
    y-man, Dec 19, 2006
    #6
  7. y-man

    Myron Turner Guest

    Myron Turner, Dec 19, 2006
    #7
  8. y-man

    Andy Dingley Guest

    y-man wrote:

    > 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)
    Andy Dingley, Dec 19, 2006
    #8
  9. y-man

    y-man Guest

    Andy Dingley schreef:

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

    >
    >
    > > 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
    y-man, Dec 20, 2006
    #9
  10. y-man

    Andy Dingley Guest

    y-man wrote:

    > 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).
    Andy Dingley, Dec 20, 2006
    #10
  11. y-man

    y-man Guest

    Andy Dingley schreef:

    > y-man wrote:
    >
    > > 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@
    y-man, Jan 8, 2007
    #11
  12. y-man

    Andy Dingley Guest

    y-man wrote:

    > > 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/
    Andy Dingley, Jan 8, 2007
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    920
    Mark Goldin
    Jan 17, 2004
  2. Frank
    Replies:
    9
    Views:
    1,541
    David Dorward
    May 3, 2004
  3. richard

    Re: W3C Validator Errors

    richard, Mar 29, 2009, in forum: HTML
    Replies:
    1
    Views:
    308
    richard
    Mar 29, 2009
  4. Andy Dingley

    Re: W3C Validator Errors

    Andy Dingley, Mar 29, 2009, in forum: HTML
    Replies:
    2
    Views:
    355
    Neredbojias
    Mar 30, 2009
  5. Jukka K. Korpela

    Re: W3C Validator Errors

    Jukka K. Korpela, Mar 29, 2009, in forum: HTML
    Replies:
    2
    Views:
    746
Loading...

Share This Page