Skip an element when copying the whole node in xslt
问题 Is it possible to skip an element from a node? For example we have node as Test and it has child elements x , y , z . I want to copy the whole Test node but don't want z element in the final result. Can we use not() in copy-of select ? I tried but it didn't work. Thanks. 回答1: No, <xsl:copy-of> gives you no control over what happens inside what you are copying. That's what an identity template with selective omissions is for: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL