Attacking is, IMO, going for winners as much as possible, regardless of the manner chosen.
Neither Nadal, nor Djokovic fit that description.
I think that's called "yolo" these days.
Seriously, I think people can have different opinions on what "attacking" means; some people may think of "attacking the net" which you can't really accuse Djokovic of doing
but you can also play an aggressive baseline game.
In the end, I personally wouldn't necessarily call him attacking, but I wouldn't call him defensive either. His amazing defence allows him to stay in points and then turn defence into attack when he is in a better position in a rally. Certainly he has hit no shortage of spectacular winners over time.
Moreover, we should remember that Fed also reigned in his attacking instincts and played the percentages, when he was at the height of his powers and his baseline game was enough to beat anyone pretty much every day. (Ok, almost everyone, with the exception of one guy with a vicious spinny lefty forehand, and then that was mostly on clay.)
Even then, I would say that Federer had the more aggressive game. But you could see with Djokovic e.g. in _those_ USO semis that he was quite willing to take the risk and go for the winner.