XPATH / XSLT: Selecting a node where the parent node's attribute matches the attribute of another node

前端 未结 4 2049
野趣味
野趣味 2021-01-06 04:08

I\'m trying to apply a transformation to the below XML using XPath and XSLT.


  
    J         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-06 04:58

    Keys are the right tool for cross references. This stylesheet:

    
        
        
        
            
                
            
        
        
            
                
                    
                
                
            
        
        
        
            
                
            
        
    
    

    Output:

    
        
            John Smith
            Some Org
        
        
            Bill Atkins
            Another Org
        
    
    

提交回复
热议问题