GNU bug report logs - #46764
Extra ">" sails right past XML validator

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 25 Feb 2021 06:42:01 UTC

Severity: minor

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #21 received at 46764 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46764 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#46764: Extra ">" sails right past XML validator
Date: Fri, 26 Feb 2021 11:28:23 +0100
26 feb. 2021 kl. 10.30 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:

>> ">" is not a special character at top level in XML; <M>></M> is well-formed.
>> 
>> I agree that it is an easy mistake to make and overlook. Perhaps an
>> optional warning would be helpful?
> 
> Well, if it is valid (and it is), then I don't really see how adding an
> optional warning here would be all that helpful, either -- it seems
> kinda beyond the remit of the validator here to teach XML syntax?

It's useful to prevent mistakes, not just following the standard to the letter. Given that the XML file is in an Emacs buffer there is a fair chance that it was hand-written, and then the extra ">" is likely to be unintended, especially since it can be somewhat hard to spot by a human.

Many other modes do similar things. For example, emacs-lisp-mode warns about useless backslashes in strings even though there is no actual syntax error. Think of it as a useful compiler warning.

> So I'm closing this bug report.

That's fine. Dan can reopen if he thinks nxml-mode really needs improvement.





This bug report was last modified 4 years and 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.