GNU bug report logs -
#8516
nxml-mode: pattern matching should be case-sensitive in validation
Previous Next
Reported by: Rob Browning <rlb <at> defaultvalue.org>
Date: Sun, 17 Apr 2011 19:10:03 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 8516 <at> debbugs.gnu.org (full text, mbox):
I think it's because string-match ignore case when case-fold-search is t
(which is the default), so greped a little on nxml dir and found the
following function may be the problem. But I haven't read the how the
whole file and don't know how nxml validation works, so some one more
knowledgeable should verify this is the right thing to do.
I tested on the test.xml and test.rnc and after this patch, capitalized
"Test" will result an invalid xml file.
Thanks,
Yuanle
--- /home/sylecn/fromsource/emacs-23.3/lisp/nxml/rng-xsd.el 2011-01-08 11:45:14.000000000 -0600
+++ /home/sylecn/fromsource/emacs/lisp/nxml/rng-xsd.el 2011-04-18 04:35:08.135816534 -0500
@@ -238,7 +238,7 @@
obj)))
(defun rng-xsd-check-pattern (str regexp convert &rest args)
- (and (string-match regexp str)
+ (and (let (case-fold-search) (string-match regexp str))
(apply convert (cons str args))))
This bug report was last modified 13 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.