xsl:for-each-group help needed

前端 未结 3 1045
醉梦人生
醉梦人生 2020-12-19 20:09

I went through XSLT Grouping Examples and Using for-each-group for high performance XSLT . I have a problem with for-each-group.

My XML



        
3条回答
  •  天命终不由人
    2020-12-19 20:25

    Here is an XSLT 2.0 stylesheet using for-each-group in a recursive function (I prefer that to a named template with XSLT 2.0):

    
    
    
    
    
    
    
    
      
      
      
        
          
            
          
          
            
              
              
            
          
        
      
    
    
    
      
        
      
    
    
    
      
        
      
    
    
    
    

    When I apply that stylesheet with Saxon 9 to the input

    
       

    Introduction

    XSLT and XQuery

    XSLT

    XSLT is used to write stylesheets.

    XQuery

    XQuery is used to query XML databases.

    XQuery and stylesheets

    XQuery is used to query XML databases.

    XSLT and XQuery

    XSLT

    I get the result

    
       

    Introduction

    XSLT and XQuery

    XSLT

    XSLT is used to write stylesheets.

    XQuery

    XQuery is used to query XML databases.

    XQuery and stylesheets

    XQuery is used to query XML databases.

    XSLT and XQuery

    XSLT

提交回复
热议问题