J
jjouett
I have XML that looks like the following:
<top>
<heart>
<user>bob</user>
<user>tim-o</user>
<user>joe-i</user>
<user>harvey</user>
</heart>
</top>
and I need to have it look like the following:
<top>
<heart>
<user>bob</user>
<user>tim-out</user>
<user>joe-in</user>
<user>harvey</user>
</heart>
</top>
In other words, I need to conditionally append text based on the data
value (append 'n' if it ends in '-i', append 'ut' if it ends in '-o,
otherwise do nothing). So far, I haven't come across an approach to
accomplish this, but I am pretty much an XSLT newbie. Does anyone have
suggestions on how to accomplish this?
Thanks in advance
<top>
<heart>
<user>bob</user>
<user>tim-o</user>
<user>joe-i</user>
<user>harvey</user>
</heart>
</top>
and I need to have it look like the following:
<top>
<heart>
<user>bob</user>
<user>tim-out</user>
<user>joe-in</user>
<user>harvey</user>
</heart>
</top>
In other words, I need to conditionally append text based on the data
value (append 'n' if it ends in '-i', append 'ut' if it ends in '-o,
otherwise do nothing). So far, I haven't come across an approach to
accomplish this, but I am pretty much an XSLT newbie. Does anyone have
suggestions on how to accomplish this?
Thanks in advance