Arbortext 5.3 Customized Function Marking Arbitrary Text
I'm working with XML files (using the NLM journalpublishing 3.0 DTD) in Arbortext 5.3. I'm modifying a set of ACL functions that are used to find author/date in-text cross-references (<xref>) and match them to items in the reference list (<ref>s in the <ref-list>). This is code that we had been using for more than 10 years with SGML files. The functions find a untagged date-like string of numbers and then looks at the text to the left of the date-link string to see if it can match a combination of authors and date to an item in the reference list.
If I include a response() after finding each date-like string, then the functions correctly finds and tags most (130 tagged <xref>s of 180 dates in my test document; only 5 unmatched; the other 45 are not <xref>s). However, if I remove the response() then the functions get stuck with constantly a increasing selection (the longest I saw contained more than 10,000 words) so that no <xref> tags are inserted into the document. It seems as if there is some arbitary point being marked and saved that is causing the selection to keep growing and I can't figure out where, why, or how that marked point is being set.
I have attached a file which includes the set of functions that I am working on. I inherited this project from another programmer who no longer works here and who had a great deal more experience with ACL than I do.
Re: Arbortext 5.3 Customized Function Marking Arbitrary Text
Working someone else's code is always tough. (I pity the person who follows me!)
I highly suggest throwing this question to adepters, a mailing list run through PTC/User. Lots of Arbortext gurus hang out there and many of them are ill enough to enjoy working with someone else's code Sometimes that's more interesting than their day's legitimate problems. Info on how to join that list is here:
I can't remember how the list handles attachments ... you may need to post the code in a note or post just the part you suspect is relevant. Be absolutely sure to mention the line number of the "fixing" response() (or the line number where you'd insert it ... or insert it and flag it with a comment you report). Not knowing for sure where you changed the flow brought my scanning to a halt ...