<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:template match="/">
	<html xmlns="http://www.w3.org/1999/xhtml">
		<head> 
			<title>Taidekokoelma</title> 
		</head> 
		<body> 
			<h1> Taideteos jonka piirsi 
				<xsl:value-of select="taidekokoelma/teos/artisti/nimi"/>
			</h1> 
			<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" version="1.1"> 
				<xsl:for-each select="taidekokoelma/teos/ympyra">
					<xsl:variable name= "x" select= "x"/>
					<xsl:variable name= "y" select= "y"/>	
					<xsl:variable name= "sade" select= "sade"/>
					<xsl:variable name= "vari" select= "vari"/>
					<circle r="{$sade}" cx="{$x}" cy="{$y}" fill="{$vari}"/>
				</xsl:for-each> 
				<xsl:for-each select="taidekokoelma/teos/viiva">
					<xsl:variable name= "x" select= "x"/>
					<xsl:variable name= "y" select= "y"/>	
					<xsl:variable name= "loppux" select= "loppux"/>
					<xsl:variable name= "loppuy" select= "loppuy"/>
					<xsl:variable name= "vari" select= "vari"/>
					<line x1="{$x}" y1="{$y}" x2="{$loppux}" y2="{$loppuy}" stroke="{$vari}"/>
				</xsl:for-each> 
				<xsl:for-each select="taidekokoelma/teos/nelikulmio">
					<xsl:variable name= "x" select= "x"/>
					<xsl:variable name= "y" select= "y"/>	
					<xsl:variable name= "pituus" select= "pituus"/>
					<xsl:variable name= "leveys" select= "leveys"/>
					<xsl:variable name= "vari" select= "vari"/>
					<rect width="{$leveys}" height="{$pituus}" x="{$x}" y="{$y}" vari="{$vari}"/>
				</xsl:for-each> 
			</svg> 
		</body> 
	</html> 
</xsl:template>
</xsl:stylesheet>

