Hi My Input is something like this.
9837
You have a template in your XSLT that ignores PartPosition
Therefore, when you do in your copy template, because you are positioned on a DamagePosition at this point, the above template will match the child PartPosition and simply ignore it.
Perhaps you should be ignoring DamageSeqNumber instead of PartPosition at this point?
Also, you probably don't really need the copy template at all. Instead, change the call to it, to simply get all the child elements of the key, and then let the identity template take care of it.
Try this XSLT
This doesn't quite give the output you show in your question, because you show two OperationPosition elements in your output, although there is only one in your input.
EDIT: If you wanted OperationPosition elements before PartPosition elements, you could replace the existing with these two lines instead: