Given the following example:
<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"
/>
<animate
attributeName="x"
values="0;50;0"
dur="1s"
repeatCount="indefinite"
/>
</rect>
</defs>
<!-- i want this to have both animations -->
<use id="rect1" href="#rectangle" />
<!-- i want this one to inherit only the fill animation -->
<use id="rect2" href="#rectangle" y="50" />
</svg>
How can I make it so that "rect2" only inherits the "fill" animation?
OBS: What I didn't wanted to do was to create an intermediate "use" element inside the defs, so the main rect would have the fill animation and the intermediate use element would reference the main rect, and also declare the "x" animation. And of course, use differente "hrefs" on the external elements.
<use>instance. So element specific attributes or animations shouldn't be included in the definition of a reusable element