Thanks for assist, David. Since there are a couple of ways a user can insert an xref, I decided to check them all at validation time instead, and modify the the href if needed. Here is what I came up with, which seems to work on all my tests so far:
<MACRO name="On_Application_Before_Document_Validate" lang="JScript" hide="false">
<![CDATA[
var xrefs = ActiveDocument.getNodesByXPath("//xref/@href");
for (var i = 0; i < xrefs.length; ++i) {
var href = xrefs.item(i).nodeValue;
var split = href.indexOf("#")
var fname = href.substr(0, split);
if (fname == ActiveDocument.name) {
xrefs.item(i).nodeValue = href.substr(split);
}
}
]]></MACRO>