Retrieving XML node from a path specified in an attribute value of another node

后端 未结 3 706
甜味超标
甜味超标 2021-01-03 09:11

From this XML source :



  
    

        
3条回答
  •  难免孤独
    2021-01-03 09:53

    Here is a pure XSLT 1.0 solution that doesn't use any extensions:

    
     
    
     
      
        
          Test
        
        
          
            
          

    when this transformation is applied on the provided XML document:

    
      
        
        
      
    
      
        
          testFizz
          
            testBar
            testLib
          
        
        
          testFizz2
          
            testBar2
            testLib2
          
        
      
    
    

    the wanted, correct result is produced:

    
        
            Test
        
        
            
    Foo Bar Fizz
    testBar testFizz
    testBar2 testFizz2

提交回复
热议问题