Animate an attack while walking

I have a walking animation and a sword attack animation. How could I make my character attack while walking? I can make the attack animation play, but it completely overwrites the walking animation (legs stop moving).

Basically, I would like only the bones for the attack animation to be overwritten (which means the upper body only, and the legs would continue their walk cycle as usual). How can I do this?

Read the character animation section in the docs, especially the section on blending animations and using layers to weight them (ie, to determine which animations take precedence).