Regular Expressions in xsl:template match attribute

后端 未结 2 2022
长发绾君心
长发绾君心 2020-12-10 06:53

I just want to know if it\'s possible to use regular expressions in the match attribute of the xsl:template element. For example, suppose I have th

2条回答
  •  -上瘾入骨i
    2020-12-10 07:26

    In XSLT 1.0 (and 2.0, too), for your example (it's not a regex, though):

    
      
    
    

    and to achieve an end-of-string match:

    
      
    
    

    In XSLT 2.0 you can of course use the matches() function in place of contains().

提交回复
热议问题