XSL combining values of siblings if values of an attribute is same

后端 未结 2 1101
没有蜡笔的小新
没有蜡笔的小新 2021-01-16 18:16

This is how my XML looks like







  &         


        
2条回答
  •  囚心锁ツ
    2021-01-16 19:02

    Here's a solution based on my answer to question #825783:

    Stylesheet

    
      
      
    
      
    
      
      
        
          
        
      
    
      
      
        
          
          
          
        
      
    
      
        
        
        
          , 
        
      
    
      
      
    
    
    

    Input

    Using the input provided by JLRishe:

    
      
    
        
    
        
          
             "555" 
             "666" 
             "555" 
             "565" 
             "575" 
             "595" 
          
        
      
    
    

    Output

    This is different from JLRishe's output because I understood the requirement differently:

    
    
      
        
        
          
             "555" ,  "666" ,  "595" 
             "555" ,  "565" ,  "575" 
          
        
      
    
    

提交回复
热议问题