XSLT StyleSheet XML Tutorial

File: Data.xml



  title 1
  item 1
  item 2
  item 3
  item 4
  item 5
  item 6
  item 7

File: Transform.xslt

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  
    
      
        <br/>          <xsl:value-of select="list/title"/><br/>        
      
      
        
          
        
                  style="font-weight: bold;">
          
            
              
                
                  
                    
                      background: yellow; color: black;
                    
                    
                      background: blue;
                    
                    
                      background: white; color: black;
                    
                    
                      background: black;
                    

                  

                
                
              
            
          
        
      
    
  

Output:

   
      
      title 1
   
   
      title 1
      
         
            item 1
         
         
            item 2
         
         
            item 3
         
         
            item 4
         
         
            item 5
         
         
            item 6
         
         
            item 7