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.
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:When applied to this XML:
The result is: