Ambiguous rule match in replacing style= attributes in XHTML via XSLT

后端 未结 2 896
隐瞒了意图╮
隐瞒了意图╮ 2021-01-20 19:18

This is a followup to this question.

I have several tags in a document with several semicolon separated style attributes. Right now I have

2条回答
  •  执笔经年
    2021-01-20 19:46

    Here is an XSLT 1.0 solution using the str-split-to-words template/function of FXSL:

    
      
      
    
      
        
        
        
      
    
      
    
       
           
             
              
              
             
           
    
           
    
           
            
              
            
            
              
               
               
                 
                  
                  ;
                 
               
    
               
                 
               
              
            
           
        
    
        
         
         
    
         
         
          
         
         
          
            
             
            
          
    
          
           
           
          
         
         
        
    
    

    when this transformation is applied on the provided XML document:

    some text
    

    the wanted, correct result is produced:

    
       
          some text
       
    
    

提交回复
热议问题