W3C home > Mailing lists > Public > www-style@w3.org > August 2007

Re: [css3-gcpm] Miscellaneous comments on WD-css3-gcpm-20070504

From: Håkon Wium Lie <howcome@opera.com>
Date: Sun, 19 Aug 2007 17:12:22 +0200
Message-ID: <18120.24022.652620.648079@gargle.gargle.HOWL>
To: Peter Moulder <Peter.Moulder@infotech.monash.edu.au>
Cc: www-style@w3.org

Peter Moulder wrote, on the topic of 'text-replace':

 > (If you must keep this facility, then note that it's
 > under-specified for the case when "from" strings overlap each
 > other,

You mean, like this?:

  body { text-replace: "a" "b" "a" "c" }
  
I don't think it's underspecified. The spec says:

  Text replacements are applied sequentially.

That is, the first pair of strings are applied (a->b) and then the
second (a->c). As there are no 'a' characters left after the first
pair, the second pair has no effect.

 > or when the "from" string is empty,

I suggest this text:

  If the first string in a pair is empty, no substitutions will occur
  for that pair. If the second string in a pair is empty, the effect of
  substitutions is that occurences of the first string are deleted.

 > or when a substitution creates an occurrence of the "from" string.

Again, this rule makes is non-ambigous:

  Text replacements are applied sequentially.

One of the examples following that sentence is:

  body { text-replace: "a" "b" "b" "c" }

So, I think it's covered.

Let me know if you disagree.

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Sunday, 19 August 2007 15:12:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:52 GMT