Yes.. I take your point, oldplumber! Caution!
I've used this method several times and it's always worked and nothing has been broken, but as a precaution I would advise starting off with gentle rubber mallet blows - then gradually building up the force.
Also - although most taps will rotate slightly in a basin when hit - if the tap appears to be rigidly fixed in the ceramic, it would be wise to slacken off the tap backnut before this treatment to allow it to move. This is very rare, though, I would think (?) but best to be cautious.