XSLT, XML: Grouping by attribute value

后端 未结 1 1868
长情又很酷
长情又很酷 2021-01-21 14:40

Which is the best way to group Elements based on attribute value using XSLT? Would it be better to use XSLT 2.0 or higher?

Many thank in advance for your help

Th

1条回答
  •  臣服心动
    2021-01-21 15:06

    In XSLT 2.0, you can use xsl:for-each-group, but if you are going to do then you must be positioned on the transaction record at that point.

    Additionally, you will need to make use of current-group to get all the record elements within the group.

    Try this XSLT

    
    
    
    
     
        
             
                
                    
                
            
        
     
    
     
         
             
         
     
     
    

    0 讨论(0)
提交回复
热议问题