Microphone capture mechanism
The piano has a very wide frequency range, so you might want microphones with a wide and accurate frequency response. I say "might" because it depends on what sound you are looking for. If you need a more opaque sound (with less highs) then using a microphone that rolls off the higher end of the spectrum could be a good idea.
If you are looking for an accurate capture, then dynamic microphones (do not confuse dynamic mics
with dynamic range
, like you did in your question, they are not the same thing) are out of the question as they tend to have a not-so-good frequency response in the highs (again, which could be good if you are going for that sound, but not very good for accurate recording).
Instead you should look for condenser microphones, or ribbon microphones (the later only if you know what you are doing, ribbon mics are very delicate). Both tend to have better frequency response than dynamic mics, and also tend to have a flatter frequency response in general.
Polar pattern
Depending on the room and piano type, you'll get different results with different polar patterns. Omnidirectional mics will capture more of the room's reverberance, which can be good or bad depending on your scenario. Cardioid mics will capture less reverberance, and they are also prone to the proximity effect, which is important to consider if you are going for close miking (and again, could be good or bad depending on what you are looking for).
If you are not recording in a professional scenario (in a studio with good sound treatment), then the safer bet is the cardioid mic. You can also get a mic with switchable polar patterns, that way you can test which one you like the most.
Number of microphones
The piano also has a wide stereo range. Highs come from one side, the lows come from the opposite side, the mids come from the center. If you want to capture this, you'll need more than one mic to implement stereo recording. To do this accurately you need two identical mics (same model).
Would recording directly from a digital piano give me a better quality (although with less dynamics possibilities)?
It depends. If you don't know what you are doing and you are not recording in a professional scenario and/or with the help of a professional, then using a digital piano (or any good sampler) will most likely bring better results.
But you still need to be very careful. Not all digital pianos (and samples) have good quality sound. Not all keyboards can accurately capture a performance, and not all keyboards have the same key feel (weighted, semi-weighted, etc).
You want a good keyboard, with a good sound engine (on-board sound engine, or using a plug-in instrument). For a sample-based solution, I really like Native Instrument's Definitive Piano Collection. For a physical-modeling solution, I like 4front's True Pianos. There are many other great options out there, but be careful since it's very easy to get a not-so-good one.