Re: [xsl] text replacement with mixed content

Subject: Re: [xsl] text replacement with mixed content
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 31 Aug 2011 14:21:14 +0100
On 31 August 2011 13:09, Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx> wrote:
> At 13:30 31/08/2011, you wrote:
>> > <x>
>> > <p>my foo, zzz, my <bold>foo</bold>, zzz</p>
>> > <p>zzz my f-oo zzz m-y foo zzz</p>
>> > <p>zzz my foo zzz my <j>foo my foo</j> zzz</p>
>> > <p>zzz my<b> fjjj</b></p>
>> > <p>zzzzz<b>my </b><x> </x><b>foo zzz</b></p>
>> > </x>
>> ..but what's the required output?
> Hi Andrew, sorry, I was on the phone for a while...
> I hope I didn't make any mistakes :-)
> here is what I need
> <x>
>    <p><rep>your bar</rep>, zzz, <rep>your bar</rep>, zzz</p>
>    <p>zzz <rep>your bar</rep> zzz <rep>your bar</rep> zzz</p>
>    <p>zzz <rep>your bar</rep> zzz <rep>your bar</rep><rep>your bar</rep>
> zzz</p>
>    <p>zzz my<b> fjjj</b></p>
>    <p>zzzzz<b><rep>your bar</rep> zzz</b></p>
> </x>

Ok I've not totally convinced by that expected output, if you are
dropping that level of markup (such as the <j>) then you are heading
towards just stripping all the markup...

If possible do some actual real world example, with solid expected
results.  When the task is "non-trivial" like this one, you really
don't want mistakes in the expected results.

Andrew Welch

Current Thread