To use combat expertise/fight defensively you need to make an attack. To parry (as the Duelist PrC feature) you need to make a full attack and choose not to take one of your iterative attacks.
Say you're beset by a spring attacking shadow, but you've managed to get your touch AC high enough that it needs a 20 to hit you (assuming you can fight defensively and use combat expertise), but after every attack it simply moves through a wall.
You've got nothing else to target for a full attack for these bonuses. Nor can you parry.
It is possible to swing at a square in hopes that an invisible creature is there to hit.
1) Can you make a full-round attack at a likely empty square to gain these defensive bonuses.
If 1 is yes, you give up your largest attack to parry the shadow if he hits. Say you have a ghost touch weapon. Parry has you compare attack rolls to see which is greater (before the target rolls his). He had to roll a 20 to hit and does. You roll a 19. Your attack bonus+19 is greater than his+20. But these are attack rolls...
2) Can you parry a natural 20 on an attack roll with anything less than a natural 20 of your own?
My instincts say yes to both. For 1, I can't see people being allowed to randomly attack squares hunting an invisible creature and not letting them attack squares. For 2, you compare the results of attack rolls, not to AC, but to each other. I'm not sure, though. Any thoughts?
For reference: