The only compliant way is to create a node without the attribute in question. I regularly use this approach:
<div>
<!-- This opening div tag replaces the one above.
<div my-attribute="my-value"> -->
div contents here...
</div>
The comment to clarify what the commented-out open tag is depends on your need (co-workers using this code, etc.).
Then, when you need to shift things around, simply change it to:
<!-- <div>
This opening div tag replaces the one below. -->
<div my-attribute="my-value">
div contents here...
</div>
Again, your need for commenting will change with each case.
It's simple and allows you to do copy/paste to comment/uncomment as you would in "normal" coding.