Grouping Nodes by hardcoding node values in XSLT

后端 未结 2 1647
渐次进展
渐次进展 2021-01-28 01:05

   
      1
      
A1 1000 <
2条回答
  •  广开言路
    2021-01-28 01:12

    If you have the option of using for-each-group, I'd definitely use that over Muenchian grouping...

    
      
      
    
      
        
          
            
              
            
            
              
            
          
        
      
      
    
    

    Fiddle: http://xsltfiddle.liberty-development.net/jxNakzX

    If you truly want to hard code the "A" -> A1, A2 and "B" -> B1, B2 mapping, you could use xsl:key and not group at all...

    
      
      
    
      
      
    
      
        
        
          
            
            
              
            
            
              
            
          
        
      
      
    
    

    Fiddle: http://xsltfiddle.liberty-development.net/jxNakzX/1

提交回复
热议问题