Xpath XML Tutorial

File: Data.xml


    
      
      
    
    
      
      
      
        
      
      
        
      
    
  
  
File: Transform.xslt

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


        
        
        
      


      
        
          full
          abbreviated
        
        
          
            parent::*/attribute::id
          
          
            ../@id
          
        
        
          
            
          
          
            
          
        
      
    

Output:

    
      

BBBb1

fullabbreviatedparent::*/attribute::id../@ida1a1
      

BBBb2

fullabbreviatedparent::*/attribute::id../@ida1a1
    
      

BBBb3

fullabbreviatedparent::*/attribute::id../@ida2a2
      

BBBb4

fullabbreviatedparent::*/attribute::id../@ida2a2
      
        
      
      

BBBb5

fullabbreviatedparent::*/attribute::id../@ida2a2