Transform an integer value to a repeated character

前端 未结 3 1037
攒了一身酷
攒了一身酷 2021-01-18 10:00

When my XSL stylesheets encounters this node:


...it should transform it into this node:



        
3条回答
  •  花落未央
    2021-01-18 10:45

    Adding to the two nice answers of @AakashM and @Tomalak, this is done naturally in XSLT 2.0:

    This XSLT 2.0 transformation:

    
        
    
     
         
           
         
     
    
     
       
         
           
         
       
     
    
    

    when applied on the provided XML document:

    
    

    produces the wanted result:

    
    

    Do note how the XPath 2.0 to operator is used in the instruction.

提交回复
热议问题