Skip to main content
hadih26673991
Inspiring
Jul 1, 2020 7:39 AM UTC
Question

xref does not show correct chapter number in DITA xml

I use FM 2020 to set up my DITA books in which I use bookmaps to organize individual chapters and ditamaps to create the map for each chapter and xml file format in order to store content.

Now, if I set the style of the figure.title to f:Figure <$chapnum>.<n+>: \sn via the paragraph designer, the numbering of figure captions correctly reflects the corresponding combination: chapter number.figure number, such as Figure x.y which means figure number y in chapter x. However, cross-referencing to these figures is not correcly done: that is the value for chapter number (x) is always 1 in every chapter.

Is that something I can fix or it is rather a bug?

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

Participating Frequently
Oct 22, 2020 4:38 PM UTC

Just in case, open DITA options (Esc D O) and make sure that "Autoload Xrefs On File Open" is ticked.

Translate
Wanda Jane
Inspiring
Oct 22, 2020 5:13 PM UTC

Done that, thanks. Still have the same problem. I think it's an FM 2020 issue.

Translate
Wanda Jane
Inspiring
Oct 5, 2020 6:42 PM UTC

I am having a very similar problem in that my chapter and figure numbers do not process correctly. I am not using as complex a system, I simply have ditamaps with topics in a hierarchy. I hope someone posts an answer soon.

Translate
hadih26673991
Inspiring
Oct 6, 2020 6:56 AM UTC

Hi check here for an answer.

Translate
Wanda Jane
Inspiring
Oct 22, 2020 3:37 PM UTC

Hi I checked the other reply and didn't see how it applied to my situation. I believe what's happening is that the xrefs are resolved before the chapter numbering is completed. Does anyone else have misnumbered figure and topic references?

My figure references are defined using the cross-reference format Figure with Number (i.e. Figure 1) which is defined as: <link.xref>Figure <$elemparanumonly>

The figures are auto-numbered using the following definition: f:Figure <$chapnum>-<n+>:\t

 

Wanda

Translate