Hello Frank,

Please see some answers below:


I understand that a topic ID must be unique within the scope of the root ditamap used for publishing the content.
Your understanding is incorrect, the topic ID must be unique inside the same topic file. So for example if in the "topic.dita" you have two inner topics, all topics existing inside the "topic.dita" must not have duplicate IDs. But if you have "topic1.dita" and "topic2.dita", the <topic> elements in both files can have the same ID, the DITA standard does not impose a uniqueness restriction for the topic IDs in the context of the entire project.


DITA 1.3 specs:

https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/uri-based-addressing.html


This addressing model makes it possible to reliably address elements that have values for the |@id| attribute that are unique within a single DITA topic, but which might not be unique within a larger XML document that contains multiple DITA topics.

But it is true that Oxygen and other tools attempt to create by default unique IDs for a created topic file in the context of the entire project, some CMSs may need them, sometimes the publishing (for example Oxygen's DITA to WebHelp output) may use these unique IDs for certain features.


So there is an arbitrary combination of only 9 characters, mostly letters. But perhaps sufficient for ensuring uniqueness...
Indeed the ${id} ID value we generate has about 9-10 unique letter-digit combinations. We consider this to be enough. The number of unique combinations is about 36 (26 letters in the English alphabet + 10 digits) to the power 9, it's 1 followed by about 14 digits. We consider this to be enough for a value which is not intended to be unique by the DITA specification anyway.

By the way we also have a longer "${uuid}" editor variable which can be used and expanded, a unique sequence of 32 hexadecimal digits if you want something even more unique.

https://www.oxygenxml.com/doc/versions/25.1/ug-editor/topics/editor-variables.html


However, when I use the "DITA > Insert > Insert New DITA Resource" command, oXygen does not honor the "ID Option" setting, but creates IDs which are identical to the file name.
Usually an ID derived from the title or from the file name is more user friendly when for example inserting references to elements inside a topic.

We would do the same by default when using the "File->New" wizard dialog to create the topic but the topic is not yet saved on disk so we do not yet know its file name or its title so we use the random value instead.


In the Oxygen Preferences->"DITA / Topics" page there is an "Use the filename as the value.. of the root element id" which you can uncheck if you want.


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 3/27/23 11:43, Frank Dissinger wrote:

Hi all,


I understand that a topic ID must be unique within the scope of the root ditamap used for publishing the content.


FrameMaker, which I used previously, creates IDs of the type


id172OC0C03J7


So there is an arbitrary combination of 11 digits and letters.


In oXygen I have set the "DITA > ID Option" as follows:


${localName}_${id}


Which creates IDs of the following type:


task_rf2_vcg_ywb


So there is an arbitrary combination of only 9 characters, mostly letters. But perhaps sufficient for ensuring uniqueness...


However, when I use the "DITA > Insert > Insert New DITA Resource" command, oXygen does not honor the "ID Option" setting, but creates IDs which are identical to the file name.

This is not what I want and surely not suitable for ensuring uniqueness.


How can I get oXygen to honor the "ID Option" setting or make it otherwise generate IDs with arbitrary characters which are likely to be unique?


Regards,

Frank

--

*Frank Dissinger*

Documentation Manager

....................................................................

*CGS Publishing Technologies International GmbH*

*Email *frank.dissin...@cgs-oris.com | *Web* www.cgs-oris.com <http://www.cgs-oris.com/>

*Address* Kettelerstr. 24 | D-63512 Hainburg | Germany

*Phone* +49 6182 9626-27 | *Fax* +49 6182 9626-99

*Commercial register* Offenbach, HRB no. 21495

*Managing directors* Bernd Rückert, Christoph Thommessen


https://www.cgs-oris.com/Signatur.png <https://www.cgs-oris.com/signatur>

_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to