From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Converting a string to valid XHTML id? Date: Wed, 01 Dec 2010 19:37:31 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291257476 6674 80.91.229.12 (2 Dec 2010 02:37:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Dec 2010 02:37:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 02 03:37:51 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 1PNz3P-0008Br-8i for ged-emacs-devel@m.gmane.org; Thu, 02 Dec 2010 03:37:51 +0100 Original-Received: from localhost ([127.0.0.1]:40536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNz3O-0004km-Lz for ged-emacs-devel@m.gmane.org; Wed, 01 Dec 2010 21:37:50 -0500 Original-Received: from [140.186.70.92] (port=56593 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNz3J-0004gO-9y for emacs-devel@gnu.org; Wed, 01 Dec 2010 21:37:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNz3I-00066J-5J for emacs-devel@gnu.org; Wed, 01 Dec 2010 21:37:45 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:34539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNz3H-00066D-Um for emacs-devel@gnu.org; Wed, 01 Dec 2010 21:37:44 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PNz3F-0008AR-Nc for emacs-devel@gnu.org; Thu, 02 Dec 2010 03:37:41 +0100 Original-Received: from c-24-8-96-241.hsd1.co.comcast.net ([24.8.96.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Dec 2010 03:37:41 +0100 Original-Received: from kevin.d.rodgers by c-24-8-96-241.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Dec 2010 03:37:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-24-8-96-241.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:133298 Archived-At: On 12/1/10 12:51 PM, Lennart Borgman wrote: > On Wed, Dec 1, 2010 at 4:51 PM, Stefan Monnier wrote: >>>> collapsing two different strings to the same ID, resulting in >>>> invalid html. >> >> I have no idea what those ids are for, but wouldn't a cryptographic hash >> work as well? > > It is just the value of the id attribute, for example like this: > > Is the point of your function to create a syntactically valid XHTML id from a string that is assumed to be unique within the context of the current document, or is it to generate a syntactically valid, unique XHTML id every time it is called (even when called multiple times with the same string)? -- Kevin Rodgers Denver, Colorado, USA