XSLT StyleSheet XML

File: Data.xml

  
    Java Programmer
    
      
        Joe
        Brian
        Smith
      

      

        1 Drive
        Vancouver
        BC
        80210
      

      
        111-1111111
        222-222222
        303-4667357
      

      a@a.com
    
    2008-10-29
  

File: Transform.xslt

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
    
      
        Employee Data
      
      
        
          
            
            
            
            
            
            
          
          
            

              
              
              
              
              
              
            
          
        
NameHire DateAddressPhoneFaxEmail

                                  select="contact/name/name" />
                                  select="contact/name/middleName" />
                                  select="contact/name/lastName" />
              

                
              

                                  select="contact/address/street" />
                
                                  select="contact/address/city" />
                ,
                                  select="contact/address/state" />
                                  select="contact/address/zip" />
              

                WK:
                                  select="contact/phone/tel[@type=wk]" />
                
                HM:
                                  select="contact/phone/tel[@type=hm]" />
              

                                  select="contact/phone/fax" />
              

                
              

      
    
  

Output:

   
      
      Employee Data
   
   
      
         
            
            
            
            
            
            
         
         
            
            
            
            
            
            
         
      
NameHire DateAddressPhoneFaxEmail
BrianSmith2008-10-291 Drive
Vancouver
                               ,
                               BC
            

                               WK:
                               

                               HM:
                               
            
303-4667357a@a.com