If the oath is to uphold the laws of the republic, and a law is regularly made (that is, in accordance with the law for enacting laws), one cannot legitimately refuse to uphold the law, regardless of whether one thinks individually (in accordance with the tenets of religion X) the law is evil, and at the same time remain in the office of trust.
When a ruler passes a law in a state where the majority are known to disagree with it or to be members of a religion that disagrees with it - and incidentally, in Spain, Orthodox Jews and Muslims also disagree with this law - he is trying to provoke an attack on the faith of the people, and the people have a duty to resist him.
For example, early Christian converts who worked for the Roman government often did have to leave their jobs, because they realized the existing demands (offering incense to the emperor, for example) were incompatible with their new beliefs.
However, in the case of Spain, you have a radicalized Socialist government that is suddenly trying to impose a change on the traditional basis of a society. Catholics should be allowed a conscience clause. If not, they are not only permitted to resist, but have the duty to do so. And this was what the Spanish bishops conference proclaimed today.
Simply not true. Use the analogy of a soldier above. Laws that are unconstitutional, for example, can be refused. Laws that are intrinsically EVIL can be as well. This is BASIC to our moral code. I will add this, get used to militant and activist Christianity. Secularism has pushed way beyond acceptable limits and the Soldiers of Christ are on the march.