From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuanle Song Newsgroups: gmane.emacs.bugs Subject: bug#8516: nxml-mode: pattern matching should be case-sensitive in validation Date: Mon, 18 Apr 2011 05:00:16 -0500 Message-ID: References: <87ipucoftf.fsf@raven.defaultvalue.org> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1303146199 5208 80.91.229.12 (18 Apr 2011 17:03:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Apr 2011 17:03:19 +0000 (UTC) To: 8516@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 18 19:03:15 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QBrqy-0005qX-Kr for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Apr 2011 19:03:12 +0200 Original-Received: from localhost ([::1]:37419 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBrqx-00020O-Ct for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Apr 2011 13:03:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBrS3-0006A3-K0 for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2011 12:37:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBrS2-0000sP-O9 for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2011 12:37:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBrS2-0000sK-LL for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2011 12:37:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QBr3R-0004OD-J5; Mon, 18 Apr 2011 12:12:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ipucoftf.fsf@raven.defaultvalue.org> Resent-From: Yuanle Song Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2011 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8516 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8516-submit@debbugs.gnu.org id=B8516.130314307516817 (code B ref 8516); Mon, 18 Apr 2011 16:12:01 +0000 Original-Received: (at 8516) by debbugs.gnu.org; 18 Apr 2011 16:11:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QBr2g-0004NB-63 for submit@debbugs.gnu.org; Mon, 18 Apr 2011 12:11:15 -0400 Original-Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QBlFt-0003fy-5v for 8516@debbugs.gnu.org; Mon, 18 Apr 2011 06:00:29 -0400 Original-Received: by ywi6 with SMTP id 6so1233670ywi.3 for <8516@debbugs.gnu.org>; Mon, 18 Apr 2011 03:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:message-id:from:to:subject; bh=RXyyQH0Hiu8aqzxCkVoY0H2bgWUbwZBgbVv/pYV5Va8=; b=HKLYc/xAtYCZk7YvRzxK0Mo7viqhAKMbmW2ZxG2NTmmHShD2JhqL2uKHmW41mrkk05 m5mqY4g/r5eqkK+lLD7ceQA/htt8uFu7YxHt/g16Doi3tuKl8Ku9UKPlyHD/N2Vqgi48 nw7CStDNAL60KJVADTgZK8d66C21MU2SkYYk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject; b=hXDbb2OZKVHDkCItlXVv+DtR1YT4Sa+trVUs1iYa9uwCjBkfbS7y3CESyKEJyBdljE x8oAAoYP+9DNtm7mO2RaPn8sc3TIhiOhH0fPYkNTQVz/i9642zSC8j0EZ1sRcT08DlQI HWXzw0kDaH5+rGDc862D0MpITHEltcgdtudfQ= Original-Received: by 10.236.78.199 with SMTP id g47mr3541305yhe.290.1303120823746; Mon, 18 Apr 2011 03:00:23 -0700 (PDT) Original-Received: from sylecn (cpe-70-112-211-195.austin.res.rr.com [70.112.211.195]) by mx.google.com with ESMTPS id f50sm2210163yhc.79.2011.04.18.03.00.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2011 03:00:22 -0700 (PDT) Original-Received: from sylecn by sylecn with local (Exim 4.72) (envelope-from ) id 1QBlFg-00015y-RY for 8516@debbugs.gnu.org; Mon, 18 Apr 2011 05:00:16 -0500 X-Mailman-Approved-At: Mon, 18 Apr 2011 12:11:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 18 Apr 2011 12:12:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Mon, 18 Apr 2011 13:03:09 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45859 Archived-At: 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))))