- From: Florian Rivoal <florianr@opera.com>
- Date: Fri, 02 Dec 2011 17:12:05 +0100
- To: www-style@w3.org
On Fri, 02 Dec 2011 16:53:29 +0100, Brad Kemper <brad.kemper@gmail.com> wrote: > Good start, Florian. I like your Asterix example. I though it was a good example to write: funny, actually used in existing material and definitely not something the WG would want to create a predefined keyword for. > Have you considered some limited form of regex? As I heard some people thinking that having regex would take us into complex situations we don't want to get into, I'm trying to see how far I can go without using them. I think we can get quite far. > A boundary indicator would help with your long S case, so that it > wouldn't transform at the end of a word (and would also finally allow us > to transform to a basic title case). Well the transform I proposed turned long s into short s, and that doesn't need any boundary check. If you want to do the opposite transform, you would need something like that. If we want to stay out of regexp, maybe we can think of some way to use the 'applies-to' descriptor I mention in an issue in the proposal. > Regex could also indicate ranges without using a separate property name > in the @rule. They could. But if having several property names is not something people like, there are other ways out of that. I think my proposal could easily be changed to merge the 3 converters into 1: ** one-liner version ** [[ <string> [':' <string> ]? to <string> [':' <string]] | ident] [, [[ <string> [':' <string> ]? to <string> [':' <string]] | ident]]* ** Broken down version ** <conversion> [, <conversion>]* <conversion> = [<char-list> to <char-list>] | ident <char-list> = <enumeration> | <range> <enumeration> = <string> <range> = <string> ':' <string> example usage: @text-transform uppercase-with-georgian { convert: uppercase, "ა":"ჵ" to "Ⴀ":"Ⴥ"; } For various reasons, I am starting to prefer this variant, actually. - Florian
Received on Friday, 2 December 2011 16:12:44 UTC