Complex Grouping using XSLT 1.0

前端 未结 2 1288
无人共我
无人共我 2021-01-28 08:13

I\'ve revised the data file and added a Grouping column. I could not figure out a logic for grouping otherwise.

The data contains information for a stamp collection.

2条回答
  •  别那么骄傲
    2021-01-28 08:34

    If you want to have only unique Scott values within each Group, and only unique Minor values within each Scott subgroup, then yes, you will need three keys.

    And if the values by which you want to subgroup are not unique to each parent group, then the keys will have to be concatenated in order to narrow the key down to matching items from the current parent group only.

    XSLT 1.0

    
    
    
    
    
    
    
    
    
        
            
                
                    
                        
                    
                
            
        
    
    
    
        
            
            
        
    
    
    
    

    Edit:

    If you're not creating anything for the group by Scott, then you can skip the secondary grouping and its associated key, and go directly to the tertiary grouping:

    
    
    
    
    
    
    
    
        
            
                
                    
                
            
        
    
    
    
        
            
            
        
    
    
    
    

提交回复
热议问题