<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink">
<title>The square should be green.</title>
<linearGradient id="gradient2">
<stop stop-color="green" stop-offset="0"/>
<stop stop-color="green" stop-offset="1"/>
</linearGradient>
<linearGradient xl:href="#gradient2" id="gradient1"/>
<rect fill="red" width="200" height="200"/>
<rect fill="url(#gradient1)" width="200" height="200"/>
</svg>