[closed] Re: p:string-replace clarification

/ James Fuller <james.fuller.2007@gmail.com> was heard to say:
| a few observations about p:string-replace;
|
|    *  what happens when the match is an attribute ?

The step is explicit in this case:

   If the expression given in the match option matches an attribute,
   the string value of the replace expression is used as the new value
   of the attribute in the output.

|    * shouldn't there be an dynamic error condition defined ?

I don't think so. We're handling attributes as a special case for the
convenience of the user.

|    * the name string-replace seems to be cross purposes with the
| following text in the editor draft spec;
|
|     -----------------
|      If the expression matches any other kind of node, the entire node
| (and not just its contents) is replaced by the string value of the
| replace expression.
|     -----------------
|
|     perhaps this behavior is controlled by an option which is off by
| default, so it is only strings we are interested in

The name string-replace is apt, I think, the matched content is
replaced by the string specified. (It is "string-replace", not
"replace-string" :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | certain: adj., insufficiently analyzed
http://nwalsh.com/            | 

Received on Monday, 11 February 2008 15:14:15 UTC