From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Converting a string to valid XHTML id? Date: Wed, 1 Dec 2010 14:32:30 -0800 (PST) Message-ID: <54241.130.55.118.19.1291242750.squirrel@webmail.lanl.gov> References: <40291.130.55.118.19.1291217640.squirrel@webmail.lanl.gov> <20101201155858.GB12842@seid-online.de> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1291242773 16944 80.91.229.12 (1 Dec 2010 22:32:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 22:32:53 +0000 (UTC) Cc: Ralf Mattes , Lennart Borgman , emacs-devel@gnu.org To: rm@tuxteam.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 01 23:32:49 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNvEG-0000fO-SM for ged-emacs-devel@m.gmane.org; Wed, 01 Dec 2010 23:32:49 +0100 Original-Received: from localhost ([127.0.0.1]:35573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNvEG-00027I-8r for ged-emacs-devel@m.gmane.org; Wed, 01 Dec 2010 17:32:48 -0500 Original-Received: from [140.186.70.92] (port=38074 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNvE3-00024d-NR for emacs-devel@gnu.org; Wed, 01 Dec 2010 17:32:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNvE2-00015B-JB for emacs-devel@gnu.org; Wed, 01 Dec 2010 17:32:35 -0500 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:54569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNvE2-00014s-AE for emacs-devel@gnu.org; Wed, 01 Dec 2010 17:32:34 -0500 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id oB1NbSdM017934; Wed, 1 Dec 2010 16:37:28 -0700 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id CD46E1512F6; Wed, 1 Dec 2010 15:32:30 -0700 (MST) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id B95981512F4; Wed, 1 Dec 2010 15:32:30 -0700 (MST) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id B75A11CA827C; Wed, 1 Dec 2010 15:32:30 -0700 (MST) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 1 Dec 2010 14:32:30 -0800 (PST) In-Reply-To: <20101201155858.GB12842@seid-online.de> User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2010-12-01_11:2010-12-01, 2010-12-01, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133284 Archived-At: > That sounds tempting but is wrong :-/ Percent-encoding doesn't produce > valid ID values. From the html 4 specs: > > 6.2 SGML basic types > > .... > > ID and NAME tokens must begin with a letter ([A-Za-z]) and may be > followed by any number of letters, digits ([0-9]), hyphens ("-"), > underscores ("_"), colons (":"), and periods ("."). If you're referring to the leading letter, you're right -- I forgot about it. Easy enough to fix: also use Lennart's "ANON-" prefix when the string begins with a non-letter or with the string "ANON-". Or is there something more fundamental that I'm missing? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.