I need to perform an XML XSLT conversion. I am new to this and have read a lot of tutorials but have come across one that is a bit challenging for me and hoping someone can point me in the right direction.
I have two elements, for example:
<linum class="topic/linum secondAtt/secondVal">Blah</linum>
<linum class="topic/linum">Blah</linum>
If the linum class attribute has a second value, i must add another attribute to that element using the second value of that attribute. If it only has one then I leave it as is.
So the output for the above two the output would be:
<linum class="topic/linum secondAtt/secondVal" newAttribute="secondVal">Blah</linum>
<linum class="topic/linum">Blah</linum>
I hope I have explained this well, if not hopefully my output is clear as only the first element is transformed by adding a new attribute with the second value.
I appreciate any help I am given!