文字列には多くの 16 進値が含まれており、いくつかの条件に基づいて置換を適用する必要があるため、文字列を独特の方法で変換する必要があります。
文字列に 16 進値が含まれています。
文字列の長さは常に 18 の倍数になります。文字列には 1*18 から 5000*18 回 (1 グループから 5000 グループ) を含めることができます。
今私の出力は、以下の条件に基づいて変換された文字列です
1) Check if the groups 13th character is 4e(13th and 14th character)
Then, change such a way that starting from 7th to 10th character(4 chars) of the string, from whatever the value is to '4040'
Also change starting from 11th till 16th(6 chars) to '4ef0f0'
The 17th and 18th to be '4040'
The whole group to be changed based on the above
2) If the check fails, no change for the group
入力文字列が 1 つのグループで、12 番目と 13 番目が「4e」の場合の例
<xsl:variable name="inputstringhex"
select="'005f6f7e8f914e7175'"/>
に変換する必要があります
'005f6f40404ef0f04040'
私は xslt1.0 を使用しており、(再帰が使用されている場合) 分割統治法のみを使用できます。これは、末尾再帰法が大量に使用されると xslt プロセッサがエラーになるためです。