Comma separated string parsing XSLT to for-each node

后端 未结 3 1380
無奈伤痛
無奈伤痛 2021-02-07 12:59

I have an input string which has csv values. Eg., 1,2,3 I would need to separate each values and assign to target node in for-each loop.

I got this below template that s

3条回答
  •  太阳男子
    2021-02-07 13:14

    Here is a complete and short, true XSLT 1.0 solution:

    
     
     
    
     
      
        
      
     
    
     
      
      
      
    
        
         
    
          
           
          
    
          
            
            
            
          
        
     
    
    

    when applied on the provided XML document (corrected to be made well-formed):

    
        15/12/2011,16/12/2011,19/12/2011,20/12/2011,21/12/2011
    
    

    the wanted, correct result is produced:

    
       15/12/2011
       16/12/2011
       19/12/2011
       20/12/2011
       21/12/2011
    
    

提交回复
热议问题