<?xml version="1.0"?>

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 400 400">
  <defs>
    <path id="p" d="M 0 300 s 50 -20 100 0 s 50 20 100 0 s 50 -20 100 0 s 50 20 100 0"/>
  </defs>
  <circle cx="50" cy="50" r="20" fill="yellow" stroke="black" stroke-width="2">
    <animate attributeType="XML" attributeName="cx" begin="0s" dur="5s" repeatCount="indefinite" from="50" to="350"/>
  </circle>
  <rect x="100" y="200" width="200" height="50" fill="red" stroke="black" stroke-width="2">
    <animateColor attributeType="XML" attributeName="fill" begin="0s" dur="5s" from="red" to="blue" repeatCount="indefinite"/>
  </rect>
  <use xlink:href="#p" stroke="red" stroke-width="1" fill="none"/>
  <text font-family="sans-serif" font-size="16pt" fill="black">
    <textPath xlink:href="#p" beginOffset="0%">
      Choo choo
      <animate attributeType="XML" attributeName="startOffset" begin="0s" dur="10s" from="0%" to="100%" repeatCount="indefinite"/>
    </textPath>
  </text>
</svg>

