You wrote, "It says in Matthew 1:24-25 That Joseph married Mary, but had no union with her until after she gave birth to her son." 

"However, in 1889 Pope Leo XIII wrote in his Encyclical "Quamquam Pluries" "that virgins can look to him [Joseph] for their pattern and as the guardian of virginal integrity."" That statement infers, I think, that Joseph did not consumate the marriage. Many Christians, believe Joseph was a virgin. There is not any proof text in scriptue tha Mary did not remain a virgin after giving birth to Jesus. Christians believe Mary was a virgin all her life. That is the basis of the doctrine. It comes down to the belief that that Jesus was conceived in the womb by the Holy Spirit, consequently he and Mary were without sin.

Yet in the verse quoted above there is this statement, "but had no union with her until after..." That can be understood in a straighforward way or not; it can be understood that they sex without intercourse.