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

Duplicate IDs not invalid?

Expand Messages
  • elhrana
    nxml-mode version 20041004 running on GNU Emacs 21.3.1 under Debian GNU/Linux does not report the following XHTML document as invalid, despite the use of the
    Message 1 of 3 , Jan 21, 2005
      nxml-mode version 20041004 running on GNU Emacs 21.3.1 under Debian
      GNU/Linux does not report the following XHTML document as invalid,
      despite the use of the same ID on two elements:

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title></title>
      </head>
      <body>
      <div id="a">
      </div>
      <div id="a">
      </div>
      </body>
      </html>

      Validation against the DTD does show that the document is invalid.
      I've noticed the same behaviour for documents using other RNG schemas.

      Jamie
    • Norman Walsh
      ... From the nxml-mode TODO file: ** ID/IDREF support. In short, I don t believe nxml-mode attempts to check the uniqueness of IDs. Be seeing you, norm --
      Message 2 of 3 , Jan 22, 2005
        / "elhrana" <jnorrish@...> was heard to say:
        | nxml-mode version 20041004 running on GNU Emacs 21.3.1 under Debian
        | GNU/Linux does not report the following XHTML document as invalid,
        | despite the use of the same ID on two elements:

        From the nxml-mode TODO file:

        ** ID/IDREF support.

        In short, I don't believe nxml-mode attempts to check the uniqueness
        of IDs.

        Be seeing you,
        norm

        --
        Norman Walsh <normyahoo@...> | Language is by its very nature a
        http://nwalsh.com/ | communal thing; that is, it
        | expresses never the exact thing
        | but a compromise--that which is
        | common to you, me, and
        | everybody.--T. E. Hulme
      • ChristopherBalz
        Testing this, it appears that it does not support the uniqueness constraint with ID . Also, it doesn t seem to support uniqueness constraints as defined by
        Message 3 of 3 , Oct 10, 2007
          Testing this, it appears that it does not support the uniqueness
          constraint with 'ID'. Also, it doesn't seem to support uniqueness
          constraints as defined by the 'xs:unique' tag.

          Would be cool if it did. Any ideas on how to add the feature?


          --- In emacs-nxml-mode@yahoogroups.com, Norman Walsh <normyahoo@...>
          wrote:
          >
          > / "elhrana" <jnorrish@...> was heard to say:
          > | nxml-mode version 20041004 running on GNU Emacs 21.3.1 under Debian
          > | GNU/Linux does not report the following XHTML document as invalid,
          > | despite the use of the same ID on two elements:
          >
          > From the nxml-mode TODO file:
          >
          > ** ID/IDREF support.
          >
          > In short, I don't believe nxml-mode attempts to check the uniqueness
          > of IDs.
          >
          > Be seeing you,
          > norm
          >
          > --
          > Norman Walsh <normyahoo@...> | Language is by its very nature a
          > http://nwalsh.com/ | communal thing; that is, it
          > | expresses never the exact thing
          > | but a compromise--that which is
          > | common to you, me, and
          > | everybody.--T. E. Hulme
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.