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

前端 未结 2 1306
醉梦人生
醉梦人生 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 22:03

    It's possible in XSLT 2; you can store data in a variable and call apply-templates on that.

    Basic example:

    
        
    
    
    

    And somewhere in your stylesheet have a template that matches Elem. You can also use a separate mode to keep a clear distinction between the two phases (building the variable and processing it), especially when both phases use templates that match the same nodes.

提交回复
热议问题