<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<rect id="rectangle" fill="red" width="25" height="25">
<animate
attributeName="fill"
values="red;blue;green;red"
dur="1s"
repeatCount="indefinite"
/>
</rect>
</defs>
<!-- i want this to have both animations -->
<use id="rect1" href="#rectangle" >
<animate
attributeName="x"
values="0;50;0"
dur="1s"
repeatCount="indefinite"
/>
</use>
<!-- i want this one to inherit only the fill animation -->
<use id="rect2" href="#rectangle" y="50" />
</svg>