How to use attribute values from another XML file as an element value selection in the current XML

前端 未结 3 1137
北恋
北恋 2021-01-07 08:40

I have two XML files. One is the main XML file and the other one is used as a lookup table. Here is the main XML:


      
                   


        
3条回答
  •  执笔经年
    2021-01-07 09:16

    I would do it like this (assuming XSLT 2.0):

    
    
      
      
    
      
    
      
    
      
        
          
        
      
    
      
        
          
        
      
    
      
        
          
        
      
    
    
    

    [edit] Here is an XSLT 1.0 rewrite of the above XSLT 2.0 stylesheet:

    
    
      
      
    
      
    
      
    
      
        
          
        
      
    
      
        
          
        
      
    
      
        
        
          
            
          
        
        
          
        
      
    
    
    

提交回复
热议问题