Ah, I finally see the cause of your confusion:
All cross references are hyperlinks.
But: all hyperlinks are not cross references.
What you need to do is look at each hyperlink, determine if it is a cross reference and if it is of the kind you're interested in, and if so, change it in the way you want.
That's an outline of how your script should operate.
Dave