We need to remove @NotBefore attribute from saml2:SubjectConfirmationData element and add a new attribute @Recipient. I have the code to add new attribute to specific element but not able to remove attribute from that element
Right now you have a template which simply ignores all instances of an attribute, which ensures that no instances of the attribute are written to the output. If you want a template that copies only some instances of an attribute, then you'll have to write that template.
It appears you want to write all instances of that attribute except if the parent of the attribute is... something? Then write that code. I'm sure you already know how to do that, I suspect your confusion is how to code the "... something" part. Am I right? If so then you'll have to describe more clearly what that part is.
subject: How to remove an attribute from a specific Element