Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi Gareth,
I'm not sure if you need to retrieve the FOSI variable itself or if you can afford to create the cross-reference text entirely in ACL. If it's the latter situation, then this may be helpful. When I've had to build really sophisticated cross-references, I've used ACL functions called by system-loc and have found the following code:
$idref = oid_attr($oid,'idref');
if (oid_find_child_attrs(oid_null(), $oids, 'id', $idref, 16)) {
$targetOid = $oids[1];
}
to be very efficient even in large documents especially if you specify the ID attribute bitmask. You can process the target however you want and supply an error message if an appopriate target isn't found.
I've used it to determine if an id is present in the open document and have the FOSI automatically create a cross-reference or an external link based on the result and it was able to handle some pretty large documents; if you're just constructing text for a cross-reference it should work efficiently enugh for you.
Cheers,
Dugald