XSL That Returns the XML unchanged

后端 未结 3 2067
猫巷女王i
猫巷女王i 2020-12-13 10:29

I am looking for a XSL snippet that simply returns the XML unaltered. It sounds trivial but I can\'t seem to find an example anywhere on the web. Any help out there?

3条回答
  •  孤街浪徒
    2020-12-13 10:49

    This is a common problem and the answer is called an identity transform. The following template will copy the existing XML correctly. You then add extra templates to modify the behaviour (eg removing certain elements, renaming elements or attributes, etc).

    
       
          
       
    
    

提交回复
热议问题