<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    xmlns:xalan="http://xml.apache.org/xslt" 
    xmlns:tns="http://www.w3.org/1999/xhtml">
    
	<xsl:output method="html" version="1" encoding="UTF-8" omit-xml-declaration="yes" standalone="yes" indent="yes" />

  <xsl:template match="/">
  	<html><body>

   	<h2>Employee Record</h2>
	<xsl:element name="form">
  	<xsl:attribute name="action">http://localhost:8080/DemoMyWebService/rest/Demo/updateEmp</xsl:attribute>
  	<xsl:attribute name="method">POST</xsl:attribute>

  
  	<table border="1">
  	<tr>
  	<th rowspan="12">  	  
  	   <img>
  	   	<xsl:attribute name="src">data:image/gif;base64,<xsl:value-of select="//row/PICTURE/text()"/></xsl:attribute>
  	   </img>
  	</th>
  	<td>EMPNO:</td>
  	<td>
        <xsl:value-of select="//row/EMPNO/text()"/>
        <xsl:element name="input">
        	<xsl:attribute name="value">
        	<xsl:value-of select="//row/EMPNO/text()"/></xsl:attribute>
        	<xsl:attribute name="type">hidden</xsl:attribute>
           	<xsl:attribute name="name">empno</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
  	<tr>
  	<td>FIRST NAME:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/FIRSTNME/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">firstnme</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>MIDDLE INITIAL:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/MIDINIT/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">midinit</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>LAST NAME:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/LASTNAME/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">lastname</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>WORK DEPARTMENT:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/WORKDEPT/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">workdept</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>PHONE NUMBER:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/PHONENO/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">phoneno</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>  
     
 	<tr>
  	<td>JOB:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/JOB/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">job</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>EDUCATION LEVEL:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/EDLEVEL/text()"/>
         </xsl:attribute>
         	<xsl:attribute name="name">edlevel</xsl:attribute>
       	</xsl:element>
    </td>
 	</tr>
 	
 	<tr>
  	<td>SEX:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/SEX/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">sex</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
    
 	<tr>
  	<td>SALARY:</td>
    <td>
      	<xsl:element name="input">
      	      <xsl:attribute name="value">
	              <xsl:value-of select="//row/SALARY/text()"/>
         	</xsl:attribute>
         	<xsl:attribute name="name">salary</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>   
     
 	<tr>
  	<td>BONUS:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/BONUS/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">bonus</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>    
    
 	<tr>
  	<td>COMMISSION:</td>
    <td>
    	<xsl:element name="input">
      	<xsl:attribute name="value">
        	<xsl:value-of select="//row/COMM/text()"/>
        </xsl:attribute>
         	<xsl:attribute name="name">comm</xsl:attribute>
       	</xsl:element>
    </td>
    </tr>
        
  	</table>
  	
  	<table cellspacing="20">
  	<tr>
  	<td>
  		<xsl:element name="input">
		<xsl:attribute name="type">submit</xsl:attribute>
		<xsl:attribute name="value">Submit</xsl:attribute>
		</xsl:element>
	</td>
	</tr>
	</table>
 	
 </xsl:element>

   
  	<h2>Resume:</h2>
  	<textarea name="Resume" rows="30" cols="80">
  	<xsl:value-of select="//row/RESUME/text()"/>
  	</textarea>
  	
  	</body></html>
  </xsl:template>
	
   <!-- Identity transformation template -->
  <xsl:template match="*|@*|comment()|processing-instruction()|text()">
    <xsl:copy>
      <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
    </xsl:copy>
  </xsl:template>
    
</xsl:stylesheet>