XSL numbering using two different sets simultaneously

前端 未结 1 639
南方客
南方客 2021-01-28 15:30

Following on from my previous question and the given solution XSL numbering at different levels ....

The previous question dealt with inserting \'footnote\' numbers into

1条回答
  •  深忆病人
    2021-01-28 16:06

    If you want to solve that with three different steps then you need to make sure the second step uses the result of the first step as the input and not the original input, that is, you have to make sure you use the variables a bit differently:

    
    
    
      
    
      
    
      
    
      
          
      
    
      
          
      
    
      
          
          
      
    
        
          
          
      
    
      
          
      
    
    
          
              
          
      
    
      
          
              
          
      
    
    
    

    http://xsltfiddle.liberty-development.net/948Fn5a/7

    I would think however that you don't need three modes respectively three steps, you could simply add your template creating the appnotes to the first step/mode:

    
    
    
      
    
      
    
      
          
      
    
      
          
          
      
    
      
          
          
      
    
      
          
      
    
    
          
              
          
      
    
      
          
              
          
      
    
    
    

    http://xsltfiddle.liberty-development.net/948Fn5a/8

    As a variation on that approach, as you only want to transform the deposition elements and only need to number the other elements in that subtree, it might be easier and more efficient to not use global variables with the whole tree transformed but to only transform the deposition contents:

    
    
    
        
    
        
    
        
            
                
            
            
                           
                 
        
    
        
            
            
        
    
        
            
            
        
    
        
            
                
            
        
    
        
            
                
            
        
    
    
    

    http://xsltfiddle.liberty-development.net/948Fn5a/9

    0 讨论(0)
提交回复
热议问题