XSLT 1.0 : Iterate over characters in a string

前端 未结 4 1140
庸人自扰
庸人自扰 2021-01-04 02:12

I need to iterate over the characters in a string to build an XML structure.

Currently, I am doing this :


          


        
4条回答
  •  心在旅途
    2021-01-04 02:41

    An XSLT 2.0 Solution:

    
     
    
     
    
     
        
          
        
     
    
    

    For those of you, learning XSLT 2.0 /XPath 2.0, do note:

    1. The use of the standard XPath 2.0 functions string-to-codepoints() and codepoints-to-string().

    2. In XSLT 2.0 the value of the select attribute of may be a sequence of any items, not only nodes.

提交回复
热议问题