XSLT StyleSheet XML

File: Data.xml


  
    chart 1
    title1
    
      
        a
        b
        
          
            c
            d
          

          
            e
            f
          

        

      

      
        S
        M
      

      
        S
        I
      

    

  


 
File: Transform.xslt
  version="1.0">
  Management Structure
  
  
    
      
        <br/>          <xsl:value-of select="$title" /><br/>        
      
      
        


          
        


        


          The following responsibilies were announced on
          
          :
        


        
          
            Name
            Role
            Reporting to
          
          
            
              
                
              
              
                
              
              
                                  select="ancestor::person[1]/name" />
              
            
          
        
        
      
    
  

Output:

   
      
      Management Structure
   
   
      

Management Structure


      


                   The following responsibilies were announced on
                   28 March 2001
                   :
                 
      


      
         
            Name
            Role
            Reporting to
         
         
            chart 1
            title1
            
         
         
            a
            b
            chart 1
         
         
            c
            d
            a
         
         
            e
            f
            a
         
         
            S
            M
            chart 1
         
         
            S
            I
            chart 1