Re: [xsl] replace a string that is in between two specific chars in XSLT 1.0

Subject: Re: [xsl] replace a string that is in between two specific chars in XSLT 1.0
From: "Prady Prady prady.chin@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Oct 2021 10:24:57 -0000
Michael , To answer your previous question,  I can add another ";" at the
end like the below:

*From: *
q1#11.11.11.111;q2#22.22.22.22;

*To:*
q1;q2

2. Is it possible to write *another function* that gives me
*From: *

q1#11.11.11.111;q2#22.22.22.22;

*To:*
11.11.11.111;22.22.22.22;




From:
<IpsCollection xmlns="http://xmlns.oracle.com/aa";>
<Ips>
 * <Ip>q1#11.11.11.111;q2#22.22.22.22;</Ip>*
</Ips>
 </IpsCollection>
To:
* <v2:Ops xmlns:v2="http://xmlns.ieee.org/V2 <http://xmlns.ieee.org/V2>">*
<v2:nums>q1;q2</v2:nums>
 </v2:Ops>


On Thu, 14 Oct 2021 at 06:05, Prady Prady <prady.chin@xxxxxxxxx> wrote:

> Thank you for the response,  Michael!
>
> But Oracle BPEL 2.0 does not support XSLT 3.0. It only supports XSLT 1.0
>
> Any help using XSLT 1.0 is greatly appreciated
>
> On Wed, 13 Oct 2021 at 13:43, Michael MC<ller-Hillebrand mmh@xxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>> Hi Prady,
>>
>> Assuming you meant "string split by ;" I came up with this template doing
>> the work:
>>
>>   <xsl:template match="Ip">
>>     <xsl:variable name="entries" select="tokenize(text(), '\s*;\s*')"
>> as="xs:string*"/>
>>     <xsl:element name="nums" namespace="http://xmlns.ieee.org/V2";>
>>       <xsl:value-of select="($entries ! substring-before(., '#')) =>
>> string-join(';')" />
>>     </xsl:element>
>>   </xsl:template>
>>
>> It uses XSLT 3 features, because they are so great, and b frankly b I
am
>> not motivated to do this using XSLT1. This will most probably involve a
>> recursive template using substring-before and substring-after.
>>
>> - Michael
>>
>>
>> Am 13.10.2021 um 17:32 schrieb Prady Prady prady.chin@xxxxxxxxx <
>> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:
>>
>> Team,
>>
>>
>> Can somebody help me to replace string that is in between* # and ;* with
>> blank. I need to include this is oracle bpel which only supports xslt 1.0
>>
>> From:
>> <IpsCollection xmlns="http://xmlns.oracle.com/aa";>
>> <Ips>
>>  * <Ip>q1#11.11.11.111;q2#22.22.22.22</Ip>*
>> </Ips>
>>  </IpsCollection>
>> To:
>> * <v2:Ops xmlns:v2="http://xmlns.ieee.org/V2 <http://xmlns.ieee.org/V2>">*
>> <v2:nums>q1;q2</v2:nums>
>>  </v2:Ops>
>>
>>
>> Thank you very much for your help!
>>
>>
>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3397216> (by
>> email <>)

Current Thread