W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > February 2008

[closed] Re: p:string-replace clarification

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 11 Feb 2008 10:13:53 -0500
To: public-xml-processing-model-comments@w3.org
Message-ID: <m2prv3jzke.fsf@nwalsh.com>
/ 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,

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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:28:25 UTC