<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="contract">

	<HTML>
	
	<STYLE>
		body { margin: 0in;}
		
		input { font-size: .10in; height: .12in; border: 1px solid gray; background-color: #EEEEFF;}
		
		@media print { 
			/*img { display: none;}*/
			input { border: none; background: none;}	
		}
		
	</STYLE>	
		
	<BODY>
		
	<xsl:variable name="background" select="@background"/>
	
	<IMG src='{$background}' style='width:8.5in'/>
	
	<FORM>
	
	<xsl:for-each select="field">
		
		<xsl:apply-templates select="."/>
				
	</xsl:for-each>
		
	</FORM>
	
	</BODY>
	
	</HTML>
	
</xsl:template>

<xsl:template match="field">

	<xsl:variable name="x" select="@x"/>
	<xsl:variable name="y" select="@y"/>
	<xsl:variable name="width" select="@width"/>
	<xsl:variable name="value" select="value"/>
	
	<DIV style='position:absolute; top:{$y}in; left:{$x}in'>
		<INPUT type='text' value='{$value}' style='width:{$width}in'/>
	</DIV>

</xsl:template>

</xsl:stylesheet>
