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

Re: False-positive validation errors

Expand Messages
  • Steinar Bang
    ... FWIW I do all my schema editing in the RNC notation. When attempting a move to XML schemas, I got too annoyed with the verbosity and noise cluttering up
    Message 1 of 22 , Aug 13, 2008
    • 0 Attachment
      >>>>> Steinar Bang <sb@...>:

      >>>>> "Lucas Gonze" <lucas.gonze@...>:
      >> ... Can you help me understand the difference between .rnc and .rng?

      > RNC and RNG are two different syntaxes for the Relax-NG schemas. RNG is
      > an XML representation of the schemas. RNC (aka "the Relax-NG compact
      > notation") is an, as it says, compact, and also very human-readable
      > format for the Relax-NG schemas.

      FWIW I do all my schema editing in the RNC notation. When attempting a
      move to XML schemas, I got too annoyed with the verbosity and "noise"
      cluttering up the logic. The response to my complaints have been "it's
      supposed to be edited using GUI tools, one should not attempt hand
      editing these schemas".

      The XML notation of Relax-NG is far less cluttered than XSD, but it's
      still far harder to read than the same schema in the compact notation.
    • Florent Georges
      ... I don t know if nXML can be considered a GUI tool, but I do edit XSDL schemas by hand, with nXML ;-) --drkm
      Message 2 of 22 , Aug 13, 2008
      • 0 Attachment
        Steinar Bang wrote:

        > The response to my complaints have been "it's
        > supposed to be edited using GUI tools, one should not
        > attempt hand editing these schemas".

        I don't know if nXML can be considered a GUI tool, but I do edit XSDL
        schemas by hand, with nXML ;-)

        --drkm





















        _____________________________________________________________________________
        Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
      • Lucas Gonze
        ... On Wed, Aug 13, 2008 at 2:42 AM, Lennart Borgman (gmail) ... I have created an rnc file from http://www.thaiopensource.com/relaxng/xhtml/xhtml.rng and done
        Message 3 of 22 , Aug 13, 2008
        • 0 Attachment
          >> So what's needed is a Relax NG schema for XHTML 1.0 Transitional?

          On Wed, Aug 13, 2008 at 2:42 AM, Lennart Borgman (gmail)
          <lennart.borgman@...> wrote:
          > Yes, exactly. It would be very nice if you wrote this.

          I have created an rnc file from
          http://www.thaiopensource.com/relaxng/xhtml/xhtml.rng and done a
          little testing to confirm that it doesn't completely fail. See
          xhtml-transitional-in-nxml.tgz at
          http://tech.groups.yahoo.com/group/emacs-nxml-mode/files/
        • Lucas Gonze
          On Wed, Aug 13, 2008 at 2:44 AM, Lennart Borgman (gmail) ... That is one way to fix it. But that doesn t address the larger issue that failing silently when
          Message 4 of 22 , Aug 13, 2008
          • 0 Attachment
            On Wed, Aug 13, 2008 at 2:44 AM, Lennart Borgman (gmail)
            <lennart.borgman@...> wrote:
            > I think everyone is aware of that, but no one has had time to fix this.
            > Or, rather, that it handles your transitional files at all is a fix.

            That is one way to fix it. But that doesn't address the larger issue
            that failing silently when there is no schema is a bug. I have spent
            a lot of time figuring out that the problem in my HTML is actually in
            the validator. I then found a place to report the error to XHTML-mode
            owners. They told me it was a problem in nxml-mode. I reported the
            problem on the nxml-mode wiki. No answer there. I waited a couple
            weeks to be sure that was not a usable way to reach the maintainers of
            nxml-mode. Then I looked for another potential home for maintainers,
            found this group and reported the error. All that work was caused by
            the error happening silently rather than being explicit.

            If nxml-mode doesn't have a schema to validate a file, it should
            disable validation and report the lack of a schema to the user.
          • lucas_gonze
            ... Sample schemas.xml for loading this schema:
            Message 5 of 22 , Aug 13, 2008
            • 0 Attachment
              --- In emacs-nxml-mode@yahoogroups.com, "Lucas Gonze"
              <lucas.gonze@...> wrote:
              >
              > >> So what's needed is a Relax NG schema for XHTML 1.0 Transitional?
              >
              > On Wed, Aug 13, 2008 at 2:42 AM, Lennart Borgman (gmail)
              > <lennart.borgman@...> wrote:
              > > Yes, exactly. It would be very nice if you wrote this.
              >
              > I have created an rnc file from
              > http://www.thaiopensource.com/relaxng/xhtml/xhtml.rng and done a
              > little testing to confirm that it doesn't completely fail. See
              > xhtml-transitional-in-nxml.tgz at
              > http://tech.groups.yahoo.com/group/emacs-nxml-mode/files/

              Sample schemas.xml for loading this schema:

              <?xml version="1.0"?>
              <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
              <doctypePublicId publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
              uri="rnc/xhtml-transitional-frameset.rnc"/>
              </locatingRules>

              Sample .emacs for loading schemas.xml:

              ;; use custom validator for xhtml transitional in nxml-mode and
              nxhtml-mode
              (setq rng-schema-locating-files
              (append rng-schema-locating-files-default
              '("~/.emacs.d/xhtml-transitional-in-nxml/schemas.xml")))

              I am posting these notes for the benefit of future web searchers
              working on the same issue.
            • Lennart Borgman (gmail)
              Hi Lucas It is very nice to see that you actually wrote this .rnc file! I think the best way to use it would be to add it to Emacs itself since nxml-mode will
              Message 6 of 22 , Aug 13, 2008
              • 0 Attachment
                Hi Lucas

                It is very nice to see that you actually wrote this .rnc file!

                I think the best way to use it would be to add it to Emacs itself since
                nxml-mode will be a part of Emacs 23. Do you want that?
              • Lennart Borgman (gmail)
                ... Thank you for your patience and endurance. I have put a note at the top of the nxml-mode page on Emacs Wiki to avoid such situations in the future. I think
                Message 7 of 22 , Aug 13, 2008
                • 0 Attachment
                  Lucas Gonze wrote:
                  > On Wed, Aug 13, 2008 at 2:44 AM, Lennart Borgman (gmail)
                  > <lennart.borgman@... <mailto:lennart.borgman%40gmail.com>> wrote:
                  > > I think everyone is aware of that, but no one has had time to fix this.
                  > > Or, rather, that it handles your transitional files at all is a fix.
                  >
                  > That is one way to fix it. But that doesn't address the larger issue
                  > that failing silently when there is no schema is a bug. I have spent
                  > a lot of time figuring out that the problem in my HTML is actually in
                  > the validator. I then found a place to report the error to XHTML-mode
                  > owners. They told me it was a problem in nxml-mode. I reported the
                  > problem on the nxml-mode wiki. No answer there. I waited a couple
                  > weeks to be sure that was not a usable way to reach the maintainers of
                  > nxml-mode.

                  Thank you for your patience and endurance.

                  I have put a note at the top of the nxml-mode page on Emacs Wiki to
                  avoid such situations in the future.

                  I think the lesson you have learned this hard way is worth attention. It
                  is quite hard to avoid this confusion with software maintained the way
                  Emacs libraries are. Lack of time and understanding of the complexities
                  that can arise are two difficulties (but I am sure there are more).

                  Perhaps you want to give some suggestions to the Emacs Wiki maintainers?


                  Then I looked for another potential home for maintainers,
                  > found this group and reported the error. All that work was caused by
                  > the error happening silently rather than being explicit.
                  >
                  > If nxml-mode doesn't have a schema to validate a file, it should
                  > disable validation and report the lack of a schema to the user.
                • Lucas Gonze
                  On Wed, Aug 13, 2008 at 12:40 PM, Lennart Borgman (gmail) ... That s a good idea. Easy and effective. -L
                  Message 8 of 22 , Aug 13, 2008
                  • 0 Attachment
                    On Wed, Aug 13, 2008 at 12:40 PM, Lennart Borgman (gmail)
                    <lennart.borgman@...> wrote:
                    > I have put a note at the top of the nxml-mode page on Emacs Wiki to
                    > avoid such situations in the future.

                    That's a good idea. Easy and effective.

                    -L
                  • Lucas Gonze
                    On Wed, Aug 13, 2008 at 12:23 PM, Lennart Borgman (gmail) ... That s a good thing and I m for it. Do you know what the steps are in packaging it up? What do
                    Message 9 of 22 , Aug 13, 2008
                    • 0 Attachment
                      On Wed, Aug 13, 2008 at 12:23 PM, Lennart Borgman (gmail)
                      <lennart.borgman@...> wrote:
                      > I think the best way to use it would be to add it to Emacs itself since
                      > nxml-mode will be a part of Emacs 23. Do you want that?

                      That's a good thing and I'm for it.

                      Do you know what the steps are in packaging it up? What do other
                      schemas look like in CVS?
                    • Lennart Borgman (gmail)
                      ... If you do not want to checkout the sources you can browse them on the web here: http://cvs.savannah.gnu.org/viewvc/emacs/etc/schema/?root=emacs Patches use
                      Message 10 of 22 , Aug 13, 2008
                      • 0 Attachment
                        Lucas Gonze wrote:
                        >
                        >
                        > On Wed, Aug 13, 2008 at 12:23 PM, Lennart Borgman (gmail)
                        > <lennart.borgman@... <mailto:lennart.borgman%40gmail.com>> wrote:
                        > > I think the best way to use it would be to add it to Emacs itself since
                        > > nxml-mode will be a part of Emacs 23. Do you want that?
                        >
                        > That's a good thing and I'm for it.
                        >
                        > Do you know what the steps are in packaging it up? What do other
                        > schemas look like in CVS?


                        If you do not want to checkout the sources you can browse them on the
                        web here:

                        http://cvs.savannah.gnu.org/viewvc/emacs/etc/schema/?root=emacs

                        Patches use to be the preffered way to send changes if existing files
                        are changed. I believe the new files could just be sent as attachment.
                      • Lucas Gonze
                        We ll need the source RNG files from James Clark to be put under the GPL by him. Is he still on this list?
                        Message 11 of 22 , Aug 13, 2008
                        • 0 Attachment
                          We'll need the source RNG files from James Clark to be put under the GPL by him.

                          Is he still on this list?
                        • Lucas Gonze
                          I have emailed James Clark about his putting his RNG sources under the GPL.
                          Message 12 of 22 , Aug 13, 2008
                          • 0 Attachment
                            I have emailed James Clark about his putting his RNG sources under the GPL.

                            On Wed, Aug 13, 2008 at 4:28 PM, Lucas Gonze <lucas.gonze@...> wrote:
                            > We'll need the source RNG files from James Clark to be put under the GPL by him.
                            >
                            > Is he still on this list?
                            >
                          • Edward O'Connor
                            ... Correct me if I m wrong, but I think nxml is correct: the above is invalid HTML 4.01. requires block children; your form needs a , , or
                            Message 13 of 22 , Aug 19, 2008
                            • 0 Attachment
                              lucas gonze wrote:

                              > Labels and inputs in forms are incorrectly flagged as invalid. In this
                              > valid sample document, the label and input will be considered errors
                              > and will cause nxml-mode to do stop doing useful validation:
                              >
                              > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                              > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                              > <html xmlns="http://www.w3.org/1999/xhtml">
                              > <head><title></title></head>
                              > <body>
                              > <form action="" method="get">
                              > <label for="inputname">Label for field: </label>
                              > <input type="text" name="inputname" id="inputname" />
                              > </form>
                              > </body>
                              > </html>

                              Correct me if I'm wrong, but I think nxml is correct: the above is
                              invalid HTML 4.01. <form> requires block children; your form needs a
                              <p>, <div>, or (better yet) a <fieldset> to contain your <label> and
                              <input>.


                              Ted
                            • Lucas Gonze
                              ... This is XHTML 1.0 Transitional, though. The W3C validator does flag the missing block element if the form is part of an HTML 4.01 document, but doesn t
                              Message 14 of 22 , Aug 19, 2008
                              • 0 Attachment
                                On Tue, Aug 19, 2008 at 6:27 PM, Edward O'Connor <hober0@...> wrote:
                                > Correct me if I'm wrong, but I think nxml is correct: the above is
                                > invalid HTML 4.01. <form> requires block children; your form needs a
                                > <p>, <div>, or (better yet) a <fieldset> to contain your <label> and
                                > <input>.

                                This is XHTML 1.0 Transitional, though.

                                The W3C validator does flag the missing block element if the form is
                                part of an HTML 4.01 document, but doesn't flag it in an XHTML 1.0
                                Transitional document. To check whether this is an error in the
                                validator I looked up the DTD and didn't find the same requirement as
                                HTML 4.01, and I didn't see this requirement documented in the spec.
                                It's possible that I missed it.

                                > lucas gonze wrote:
                                >
                                >> Labels and inputs in forms are incorrectly flagged as invalid. In this
                                >> valid sample document, the label and input will be considered errors
                                >> and will cause nxml-mode to do stop doing useful validation:
                                >>
                                >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                                >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                                >> <html xmlns="http://www.w3.org/1999/xhtml">
                                >> <head><title></title></head>
                                >> <body>
                                >> <form action="" method="get">
                                >> <label for="inputname">Label for field: </label>
                                >> <input type="text" name="inputname" id="inputname" />
                                >> </form>
                                >> </body>
                                >> </html>
                                >
                                > Correct me if I'm wrong, but I think nxml is correct: the above is
                                > invalid HTML 4.01. <form> requires block children; your form needs a
                                > <p>, <div>, or (better yet) a <fieldset> to contain your <label> and
                                > <input>.
                                >
                                >
                                > Ted
                                >
                                >
                                > ------------------------------------
                                >
                                > Yahoo! Groups Links
                                >
                                >
                                >
                                >
                              Your message has been successfully submitted and would be delivered to recipients shortly.