How to do a second transform on the output of an XSLT template

前端 未结 2 1307
醉梦人生
醉梦人生 2020-12-02 21:12

I have only basic XSLT skills so apologies if this is either basic or impossible.

I have a paginator template which is used everywhere on the site I\'m looking at. T

2条回答
  •  星月不相逢
    2020-12-02 21:50

    Here is a complete example how multi-pass processing can be done with XSLT 1.0:

    
     
     
    
     
         
           
         
     
    
      
         
           
         
     
    
     
      
       
      
    
      
     
    
     
      
     
    
     
      
        
        
      
     
    
     
      
     
    
    

    when this transformation is applied on the following XML document:

    
      01
      02
      03
      04
      05
      06
      07
      08
      09
      10
    
    

    the wanted result (each num is multiplied by 2 and in the next pass 3 is added to each num) is produced:

    
       5
       7
       9
       11
       13
       15
       17
       19
       21
       23
    
    

提交回复
热议问题