Loading ...
Sorry, an error occurred while loading the content.

nxml says it is ok, but w3 validator says it is wrong

Expand Messages
  • Lennart Borgman
    I have a file that looks ok in nxml-mode, but that http://validator.w3.org/ says is wrong. The page is at http://ourcomments.org/Emacs/w32-build-emacs.html The
    Message 1 of 8 , Apr 16, 2006
    • 0 Attachment
      I have a file that looks ok in nxml-mode, but that
      http://validator.w3.org/ says is wrong. The page is at

      http://ourcomments.org/Emacs/w32-build-emacs.html

      The file begins with:

      <?xml version="1.0"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">

      The validator at w3 complains that

      http://ourcomments.org/Emacs/xhtml11.dtd
      <http://ourcomments.org/Emacs/xhtml11.dtd>
      What to do: *The link is broken. Fix it NOW!*
      Response status code: 404
      Response message: Not Found
      Line: 2

      What is wrong here?
    • Dominic Mitchell
      ... That DOCTYPE line is incorrect. The xhtml11.dtd bit is called the system identifier and is an URL where the DTD can be found. So it means that you have
      Message 2 of 8 , Apr 16, 2006
      • 0 Attachment
        Lennart Borgman wrote:
        > I have a file that looks ok in nxml-mode, but that
        > http://validator.w3.org/ says is wrong. The page is at
        >
        > http://ourcomments.org/Emacs/w32-build-emacs.html
        >
        > The file begins with:
        >
        > <?xml version="1.0"?>
        > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">

        That DOCTYPE line is incorrect. The "xhtml11.dtd" bit is called the
        system identifier and is an URL where the DTD can be found. So it means
        that you have to have the DTD lying around in the same directory for
        that to be a valid DOCTYPE.

        > <html xmlns="http://www.w3.org/1999/xhtml">
        >
        > The validator at w3 complains that
        >
        > http://ourcomments.org/Emacs/xhtml11.dtd
        > <http://ourcomments.org/Emacs/xhtml11.dtd>
        > What to do: *The link is broken. Fix it NOW!*
        > Response status code: 404
        > Response message: Not Found
        > Line: 2
        >
        > What is wrong here?

        It's saying that it can't find the DTD in the location you specified.

        According to <http://www.w3.org/TR/xhtml11/>, a correct declaration
        which works anywhere will be:

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

        The reason that nxml-mode doesn't complain about this is that it ignores
        DOCTYPE lines (other than checking them for syntactic validity).

        -Dom
      • Lennart Borgman
        ... Thanks. I believed it was resolved to a public location somewhere. ... Thanks for giving me this! ... But what does nxml-mode look for to decide that it
        Message 3 of 8 , Apr 16, 2006
        • 0 Attachment
          Dominic Mitchell wrote:
          > Lennart Borgman wrote:
          >
          >> I have a file that looks ok in nxml-mode, but that
          >> http://validator.w3.org/ says is wrong. The page is at
          >>
          >> http://ourcomments.org/Emacs/w32-build-emacs.html
          >>
          >> The file begins with:
          >>
          >> <?xml version="1.0"?>
          >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
          >>
          >
          > That DOCTYPE line is incorrect. The "xhtml11.dtd" bit is called the
          > system identifier and is an URL where the DTD can be found. So it means
          > that you have to have the DTD lying around in the same directory for
          > that to be a valid DOCTYPE.
          >
          Thanks. I believed it was resolved to a public location somewhere.

          >
          >> <html xmlns="http://www.w3.org/1999/xhtml">
          >>
          >> The validator at w3 complains that
          >>
          >> http://ourcomments.org/Emacs/xhtml11.dtd
          >> <http://ourcomments.org/Emacs/xhtml11.dtd>
          >> What to do: *The link is broken. Fix it NOW!*
          >> Response status code: 404
          >> Response message: Not Found
          >> Line: 2
          >>
          >> What is wrong here?
          >>
          >
          > It's saying that it can't find the DTD in the location you specified.
          >
          > According to <http://www.w3.org/TR/xhtml11/>, a correct declaration
          > which works anywhere will be:
          >
          > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
          > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
          >
          Thanks for giving me this!
          > The reason that nxml-mode doesn't complain about this is that it ignores
          > DOCTYPE lines (other than checking them for syntactic validity).
          >
          But what does nxml-mode look for to decide that it should use xhtml.rng?
          > -Dom
          >
          -- lennart
        • Chris Chiasson
          schemas.xml ... -- http://chris.chiasson.name/
          Message 4 of 8 , Apr 16, 2006
          • 0 Attachment
            schemas.xml

            On 4/16/06, Lennart Borgman <lennart.borgman.073@...> wrote:
            > Dominic Mitchell wrote:
            > > Lennart Borgman wrote:
            > >
            > >> I have a file that looks ok in nxml-mode, but that
            > >> http://validator.w3.org/ says is wrong. The page is at
            > >>
            > >> http://ourcomments.org/Emacs/w32-build-emacs.html
            > >>
            > >> The file begins with:
            > >>
            > >> <?xml version="1.0"?>
            > >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
            > >>
            > >
            > > That DOCTYPE line is incorrect. The "xhtml11.dtd" bit is called the
            > > system identifier and is an URL where the DTD can be found. So it means
            > > that you have to have the DTD lying around in the same directory for
            > > that to be a valid DOCTYPE.
            > >
            > Thanks. I believed it was resolved to a public location somewhere.
            >
            > >
            > >> <html xmlns="http://www.w3.org/1999/xhtml">
            > >>
            > >> The validator at w3 complains that
            > >>
            > >> http://ourcomments.org/Emacs/xhtml11.dtd
            > >> <http://ourcomments.org/Emacs/xhtml11.dtd>
            > >> What to do: *The link is broken. Fix it NOW!*
            > >> Response status code: 404
            > >> Response message: Not Found
            > >> Line: 2
            > >>
            > >> What is wrong here?
            > >>
            > >
            > > It's saying that it can't find the DTD in the location you specified.
            > >
            > > According to <http://www.w3.org/TR/xhtml11/>, a correct declaration
            > > which works anywhere will be:
            > >
            > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
            > > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
            > >
            > Thanks for giving me this!
            > > The reason that nxml-mode doesn't complain about this is that it ignores
            > > DOCTYPE lines (other than checking them for syntactic validity).
            > >
            > But what does nxml-mode look for to decide that it should use xhtml.rng?
            > > -Dom
            > >
            > -- lennart
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >


            --
            http://chris.chiasson.name/
          • Lennart Borgman
            Thanks Chris. If I do some guesses from just looking at that file it looks like 1) nxml-mode is trying to get typeId : a) First it looks at the URI extension
            Message 5 of 8 , Apr 16, 2006
            • 0 Attachment
              Thanks Chris. If I do some guesses from just looking at that file it
              looks like

              1) nxml-mode is trying to get "typeId":
              a) First it looks at the URI extension
              b) Then namespace (xmlns)
              c) Then "localName" (which I do not know where to find)
              2) From the typeId it chooses the .rnc file.


              Chris Chiasson wrote:
              > schemas.xml
              >
              > On 4/16/06, Lennart Borgman <lennart.borgman.073@...> wrote:
              >
              >>> The reason that nxml-mode doesn't complain about this is that it ignores
              >>> DOCTYPE lines (other than checking them for syntactic validity).
              >>>
              >>>
              >> But what does nxml-mode look for to decide that it should use xhtml.rng?
              >>
            • Chris Chiasson
              Somewhere there is detailed documentation on the behavior of dtd/schema/grammar loading, but i don t remember off hand. I am sure Google will hold you in good
              Message 6 of 8 , Apr 16, 2006
              • 0 Attachment
                Somewhere there is detailed documentation on the behavior of
                dtd/schema/grammar loading, but i don't remember off hand. I am sure
                Google will hold you in good stead. Maybe it is in the documentation
                that comes with nxml? Maybe it is in the FAQ?
                ??

                On 4/16/06, Lennart Borgman <lennart.borgman.073@...> wrote:
                > Thanks Chris. If I do some guesses from just looking at that file it
                > looks like
                >
                > 1) nxml-mode is trying to get "typeId":
                > a) First it looks at the URI extension
                > b) Then namespace (xmlns)
                > c) Then "localName" (which I do not know where to find)
                > 2) From the typeId it chooses the .rnc file.
                >
                >
                > Chris Chiasson wrote:
                > > schemas.xml
                > >
                > > On 4/16/06, Lennart Borgman <lennart.borgman.073@...> wrote:
                > >
                > >>> The reason that nxml-mode doesn't complain about this is that it ignores
                > >>> DOCTYPE lines (other than checking them for syntactic validity).
                > >>>
                > >>>
                > >> But what does nxml-mode look for to decide that it should use xhtml.rng?
                > >>
                >
                >
                >
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
                >


                --
                http://chris.chiasson.name/
              • Dominic Mitchell
                ... Yes, I think that the documentation that comes with it has more information (nxml-mode.xml#Locating a schema). There s also something on it here:
                Message 7 of 8 , Apr 17, 2006
                • 0 Attachment
                  Chris Chiasson wrote:
                  > Somewhere there is detailed documentation on the behavior of
                  > dtd/schema/grammar loading, but i don't remember off hand. I am sure
                  > Google will hold you in good stead. Maybe it is in the documentation
                  > that comes with nxml? Maybe it is in the FAQ?

                  Yes, I think that the documentation that comes with it has more
                  information (nxml-mode.xml#Locating a schema). There's also something
                  on it here:

                  http://infohost.nmt.edu/tcc/help/pubs/nxml/how-find.html

                  -Dom
                • Dave Pawson
                  ... Look for nxml-mode.xml in the nxml distribution. There is a whole section on locating a schema! regards -- Dave Pawson XSLT XSL-FO FAQ.
                  Message 8 of 8 , Apr 17, 2006
                  • 0 Attachment
                    On 17/04/06, Dominic Mitchell <dom+nxml-mode@...> wrote:

                    > Yes, I think that the documentation that comes with it has more
                    > information (nxml-mode.xml#Locating a schema). There's also something
                    > on it here:
                    >
                    > http://infohost.nmt.edu/tcc/help/pubs/nxml/how-find.html
                    >

                    Look for nxml-mode.xml in the nxml distribution.


                    There is a whole section on locating a schema!


                    regards
                    --
                    Dave Pawson
                    XSLT XSL-FO FAQ.
                    http://www.dpawson.co.uk
                  Your message has been successfully submitted and would be delivered to recipients shortly.