emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a string to valid XHTML id?


From: Lennart Borgman
Subject: Re: Converting a string to valid XHTML id?
Date: Thu, 2 Dec 2010 01:44:12 +0100

On Thu, Dec 2, 2010 at 1:12 AM, Davis Herring <address@hidden> wrote:
>>> And my function is injective.
>>
>> Do you mean that it always maps the same original input string to the
>> same unique output string?
>
> Yes -- injective gives you the "unique".  The "same" is because it's pure.
>
>> However I thought it would be easier reading the result with my
>> simpler mapping.
>
> Sure, unless this runs too many times.
>
>>>>     (when old
>>>>       (setq new-id (concat new-id "X"))))
>
> I don't know what's really easier; I just think that having it be
> stateless is a good thing.

I don't understand how your version is supposed to work. How can it be
unique if it does not keep track of if the id is already used? (Or did
you say that this case is not covered?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]