XSL transformation - XML data to HTML table

前端 未结 1 875
小蘑菇
小蘑菇 2020-12-22 08:15

Is there way how to create a XSL stylesheet for this type a XML document for output like HTML table on the picture below? The problem is, that generated datas are stored ran

1条回答
  •  太阳男子
    2020-12-22 08:48

    You should be able to do this pretty easily by:

    1. Grouping by track (using xsl:for-each-group).
    2. Keeping track of what columns need to be output.

    Example...

    XSLT 2.0

    
      
      
    
      
      
        
        
          
        
      
    
      
        
          
            
                    
                  
                  
                      
    Time (%)

    Output

    
       
          
    Time CPU 0 (%) CPU 1 (%) CPU 2 (%)
    1 28 21 4
    14 22 52 6

    See fiddle here: http://xsltfiddle.liberty-development.net/eiQZDbp

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