Skip to main content
September 17, 2009
Question

Problem with xrefs and <$elemtextonly>

  • September 17, 2009
  • 1 reply
  • 2037 views

I'm working with a user manual our team has created entirely in FM9. We have some sections that have prefixes attached to the heading based on an attribute value in the element. I'm running into an issue with the <$elemtextonly> tag when making a cross reference to a section with a prefix on the header. My understanding is that the <$elemtextonly> tag should strip out the header prefix, but I can't seem to get this to work. I've tried pointing at both the header and the section elements and the prefix is still included as if I had used the <$elemtext> tag instead. However, the <$elemtextonly> tag is behaving in the expected way in my table of contents, so I'm somewhat confused as to why the same tag isn't working in my cross references. Is there something I'm doing wrong here?

This topic has been closed for replies.

1 reply

Van Kurtz
Inspiring
September 17, 2009

I use version 9 and use <$elemtextonly> in several cross-references, and they work correctly. Of course, my targets do not have prefixes, but they do have autonumbers.

On another note, maybe related, we used to put <$elemtextonly> inside custom markers and used them to generate an index of the contents of the elements containing those markers (an index of warnings). The warning paragraphs DID contain a prefix (Warning and a line break); and the prefixes were stripped out correctly in the generated index. HOWEVER, in version FrameMaker 9, this did not work. I had to replace <$elemtextonly> with <$paratext> and redesign the structure so that there was NO prefix in the paragraphs. So, maybe something weird is also happening with <$elemtextonly> and prefixes in cross-references.

It ticked me off that this wonderful feature that my life easy broke in a newer version. I wrote an email to a FrameMaker engineer and got nothing in return.

Unless you can figure out what you are doing wrong, if anything, I suggest submitting a bug report. This feature should at least work as adverised.

Van

September 17, 2009

Autonumbers are correctly being removed by <$elemtextonly>. In cases where an item contains both a prefix and an autonumber the number is gone, but the prefix is still in the cross reference. We're using an element attribute to be able to filter sections at various levels, and the value of that attribute also determines the prefix. We generally only need the prefix attached to the copy when it appears in the body text (i.e. not the TOC or xrefs), but I'm not certain how we should restructure this to not use a prefix. Since we have a relatively small number of cross references our workaround has been to add an attribute containing the name we want to appear in cross references and use <$attribute> instead, but this feels clunky and probably isn't a good long-term solution.

Van Kurtz
Inspiring
September 17, 2009

The solution I used was to make the prefix a separate element. This means having to add two elements instead of one. The EDD would create the content for the "prefix" element in the same way as you do now to create the prefix. This is also clunky but at least you do not have to add special content to an attribute for each instance of the element. My guess is that the use of <$elemtextonly> in cross-references to elements with prefixes got broke in the upgrade to version 9 and either not yet fixed or not yet noticed. That is why I suggest sending in a bug report.