Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OSB - using index value from for each inside replace action xpath

user592662Jun 11 2013 — edited Jun 12 2013

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2013
Added on Jun 11 2013
2 comments
1,181 views