Re: A good use for p:string-replace?

Hi Roger,

I've used it for a few things in an upconversion pipeline:

<!-- Remove brackets that surround "deleted" text in StickenText tags -->
<p:string-replace
match="text()[following-sibling::node()[1][self::StrickenText]]"
replace="replace(., '\[$', '')"/>
<p:string-replace
match="text()[preceding-sibling::node()[1][self::StrickenText]]"
replace="replace(., '^\]', '')"/>

<!-- Replace AutoNum elements with actual numbers -->
p:string-replace match="AutoNum" replace="count(preceding::AutoNum) + 1"/>

<!-- Replace SoftSp elements with actual spaces -->
<p:string-replace match="SoftSp" replace="' '"/>

Hope this helps,

-James


On Fri, Jul 3, 2009 at 8:19 AM, Costello, Roger L.<costello@mitre.org> wrote:
>
> Hi Folks,
>
>   Has anyone found a good use for p:string-replace?
>
>   If so, would you give an example please?
>
> /Roger
>

Received on Friday, 3 July 2009 14:12:36 UTC