Re: Semantics of p:string-replace

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Norman Walsh writes:

> 5.
>
>   <p:string-replace>
>     <p:option name="match" value="p/node()"/>
>     <p:option name="replace" value="concat('[',.,']')"/>
>   </px:string-replace>
>
> produces
>
>   <div>
>     <p class="value1 value2">[
>       Some
>       ][<a href="http://example.com/">linked</a>][
>       text.
>     ]</p>
>   </div>

Surely that's 

  <div>
    <p class="value1 value2">[
      Some
      ][linked][
      text.
    ]</p>
  </div>


> I don't think there's any way to produce the result:
>
>   <div>
>     <p class="value1 value2">[
>       Some
>       linked
>       text.
>     ]</p>
>   </div>

Agreed.

> unless we add an explicit option to preserve the wrapper:
>
>   <p:string-replace>
>     <p:option name="match" value="p"/>
>     <p:option name="replace" value="concat('[',.,']')"/>
>     <p:option name="preserve-element-wrapper" value="yes"/>
>   </px:string-replace>
>
> Which I'm not opposed to. But nor do I feel strongly about.

See previous message -- you can do this with XSLT, it's a marginal
case, let's not go there.

Although, Richard, does lxreplace support this case, and if so, how?

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFGMOUIkjnJixAXWBoRAkc6AJ48/+z3VgicddhVwt8G3XiuPg2++wCfc5Sc
9c9xfAz7eSt5UAuC2frCqkY=
=ErVo
-----END PGP SIGNATURE-----

Received on Thursday, 26 April 2007 17:45:24 UTC