3 Replies Latest reply: Sep 25, 2014 1:58 PM by saprentice RSS

    Trouble with Cross-References

    ohnehosen Community Member

      FM11 / DITA 1.2

       

      What could cause a particular cross reference to consistently NOT work? I know that's vague. I'll try to give a more specific example:

       

      Let's say I have a collection of xrefs across several XML files in a DITA map. Some xrefs might even point to the same item (usually a <title> tag with an ID attribute). On output to a book with FM components, particular xrefs just will not work (they output as "unresolved"). I can fix it manually in the FM file, but I'd rather it work correctly in the first place, especially since I deal with translation in to several languages, and if I can't get an xref to just work, I have to fix it many, many times.

       

      I've tried deleting the xref and starting again; I've tried changing the ID attribute in case there was some kind of conflict...I still have trouble with that particular xref (and this happens with more than one xref). What else can I try?

       

      Again, I know this is vague. I'd be happy to elaborate on relevant points. I just don't currently have time to write a massive description and I want to get this question out.

       

      Thanks in advance.

        • 1. Re: Trouble with Cross-References
          saprentice Community Member

          Hi ohnehosen...

           

          Are you up to date on your FM11 patches? It's hard to say what could be causing this problem .. does sound strange.

           

          While this shouldn't be the problem, you might try linking your xref to the container "topic" element (topic, concept, task, whatever is the immediate parent of the title you're pointing at). While in theory you should be able to xref to a title, that's not really the intent, your cross-ref is referencing a "topic" not the title within the topic. The same goes for a figure or table, you reference the fig or table element not the title within those elements.

           

          I'd assume that the code in the FM-DITA plugin was designed to work by referencing the container ,it probably wasn't tested the way you're doing it, and there may be some flakiness that would cause this to not always work.

           

          Give it a try .. let us know how it goes.

           

          …scott

          • 2. Re: Trouble with Cross-References
            ohnehosen Community Member

            Hi Scott,

             

            I gave this a try on one of my "trouble" xrefs, and it seems to have worked. I can't remember exactly why I was linking to titles, but I seem to remember there was some reason for it...Anyway, this seems to be working for now. Thanks again for your help.

            • 3. Re: Trouble with Cross-References
              saprentice Community Member

              Great .. I'm glad that seems to be doing the trick. People often start by linking to titles, because that's what they think they need to do, but it's really not a good idea.

               

              Cheers!