Hi,
I am trying to convert the below xml part,
<contact-info charset="isoLatin">
<prefix>Mr</prefix>
<first-name>Baskar</first-name>
</contact-info>
<contact-info charset="unicode">
<prefix>Mr</prefix>
<first-name>Sikkayan</first-name>
</contact-info>
to,
<contact-info charset="isoLatin">
<prefix>Mr</prefix>
<first-name>Baskar</first-name>
</contact-info>
<contactUnicode>
<suffix>Mr</suffix>
<firstName>Sikkayan</firstName>
</contactUnicode>
I use for each action,
for each contactInfo in <XPATH to contact-info node>
Have declared index variable(as contactIndex) and count variable.
Have if action inside the for each to check if the charset is unicode.
If the charset is unicode, doing the replacement using the replace action.
Inside the replace action, I am trying to use the contactIndex value in the XPATH but compiler returns error(contactIndex is not declared).
I tried xs:int[$contactIndex], but still the same error.
Could you please assist me on how to use this indexVariable inside the Repalce XPATH.
Thanks,
Baskar.S