Re: Can't link into conref? unstable ids


Stuart Norton
 

Thank you very much for pointing out the issue.

 

Somewhat surprisingly, I am not the same as the person who reported the problem there – good to know I'm not alone I guess. :-)

 

We will follow up further in GitHub.

 

Best regards,

Stuart

 

 

Juniper Business Use Only

From: main@dita-users.groups.io <main@dita-users.groups.io> On Behalf Of Radu Coravu
Sent: Wednesday, April 28, 2021 12:18 AM
To: main@dita-users.groups.io; dita-users@groups.io
Subject: Re: [dita-users] Can't link into conref? unstable ids

 

[External Email. Be cautious of content]

 

Hi Stuart,

About your questions:

  1. What if we overrode the id attribute generation to avoid the auto-generated unique values, and we occasionally had a duplicate id? Are there some dangers of having duplicate ids that I am missing – e.g. perhaps it could break the TOC?

From what I remember such problems do not break the publishing.

  1. Are there any other options that we have - other than reorganizing all of our content so we don't ever need to link to locations inside of conrefs?

I answered you here, I assume you added this issue to the DITA OT issues list:

https://github.com/dita-ot/dita-ot/issues/3736#issuecomment-828209386

Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 4/28/21 00:50, Stuart Norton via groups.io wrote:

Dear DITA users,

 

We've discovered a behavior in DITA OT processing that looks like it's going to cause us big problems. We would really appreciate your advice.

 

The problem that we are seeing is that when we publish a document containing a conref (to HTML), the content inside that conref has its id attributes rewritten with more-or-less random values that can change unpredictably when the document is updated. For example:

id="request-system-reboot-command__d5358e39"

(the d### characters in bold are the ones that update randomly).

 

We have many external links that point into conrefed content. As a result of this behavior, those links are often breaking when we republish the documents.

 

It looks like this behavior is by design, and it happens in this step: https://www.dita-ot.org/dev/reference/preprocess-conref.html.  That step is intended to "ensure that the values of the id attribute within the referencing topic remain unique." But in our experience so far, I would say that the potential danger of having a duplicate id on an HTML page seem *much* more acceptable than having many external links break when we republish a document.

 

Questions:

  1. What if we overrode the id attribute generation to avoid the auto-generated unique values, and we occasionally had a duplicate id? Are there some dangers of having duplicate ids that I am missing – e.g. perhaps it could break the TOC?
  2. Are there any other options that we have - other than reorganizing all of our content so we don't ever need to link to locations inside of conrefs?

 

Thanks in advance for your thoughts/assistance.

 

Best regards,

Stuart

 

 

Juniper Business Use Only

 

Join main@dita-users.groups.io to automatically receive all group messages.