XSLT to generate another XSLT script

后端 未结 3 1662
感动是毒
感动是毒 2021-02-20 13:51

In this thread I refer to my last thread: Convert XML to CSV using XSLT - dynamic columns.

The XSLT script in the refered thread works fine but with a large

3条回答
  •  星月不相逢
    2021-02-20 14:16

    Rather than a two-external-phase solution (meaning a style-sheet that writes a style-sheet that gets executed), I think you would be better served by a version of Tim's solution that performs better at scale. Please measure the performance of this solution with your 'large XML document' as input.

    This XSLT 1.0 style-sheet...

    
    
    
      
    
    
    
      
      
        
        
          
          
      
      
      
    
    
    
      
      
      
        
        
        
          
          
      
      
    
    
    
    

    ...will transform this input (or others efficiently at scale) ...

    
    
        John
        
            
                Lisa
                Sister
            
            
                Tom
                Brother
            
        
    
    
        Daniel
        
            
                Peter
                Father
            
        
    
    
    

    ... and yield text...

    Name;Sister;Brother;Father
    John;Lisa;Tom;
    Daniel;;;Peter
    

提交回复
热议问题