Creating XSLT transform to flatten multiRef encoded SOAP message

前端 未结 2 1261
夕颜
夕颜 2021-01-03 16:18

Input is a mutliRef encoded SOAP message/document. How do you use XSLT to flatten multiRefs. Multiref nodes can be referenced used multiple times, and themselves recursive

2条回答
  •  抹茶落季
    2021-01-03 17:02

    Alex, I'm not matching your output completely but here is how you can resolve your document by hrefs.

    This stylesheet:

    
    
        
    
        
            
                
            
        
    
        
            
                
            
        
    
        
    
        
            
                
            
        
    
    

    Given this input:

    
    
        
            
                
            
            
                
                
                
                
                
                
            
            
                0
            
        
    
    

    Produces the following result:

    
    
        
            
                
                    
                        0
                    
                    
                    
                    
                    
                    
                
            
    
    
        
    
    

    I think that this apporach could be easily customized to fit your needs. I would like to outline that the provided stylesheet operates on @hrefs and does not take in account any element names. Therefore it can be used flexibly without paying attention to the referring element names. However all the reference should be named multiRefs but this can be easily customized too.

提交回复
热议问题