<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>In addition to what Eliot said, for the Oxygen user's guide we
also have this rule of the topic ID equal to the file name.</p>
<p>We impose it with a Schematron check along with a quick fix to
change the ID if necessary, search for <span class="pl-c"><span
class="pl-c">"</span>Topic ID must be equal to file name<span
class="pl-c">"</span></span>:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/oxygenxml/userguide/blob/master/DITA/rules/rulesAdvanced.sch">https://github.com/oxygenxml/userguide/blob/master/DITA/rules/rulesAdvanced.sch</a></p>
<p>Regards,</p>
<p>Radu</p>
<pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
<p></p>
<div class="moz-cite-prefix">On 4/2/23 18:42, <a class="moz-txt-link-abbreviated" href="mailto:ekimber@contrext.com">ekimber@contrext.com</a>
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BBC23EA2-559B-A744-AC59-A382E3D02A2A@hxcore.ol">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
shape {behavior:url(#default#VML);}
</style><![endif]-->
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">As Radu points out, the DITA specification
does not require that topic IDs be unique beyond the scope of
the XML document that contains them. In general, especially
when using keys and with the addition of the “same topic”
fragment identifier (‘#./some-element-id’), topic IDs are of
little practical value because you almost never need to refer
to them unless you nest topics within a single XML document.
If you are using keys for all references to things outside of
topics and you only have a single topic in each DITA source
file, there is never a reason to refer to topic IDs in your
DITA source.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I used to go out of my way to make the ID
of every topic that is the root of its XML document “topicid”
just to make the point that they don’t need to be unique.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, as Radu also points out, many
tools assume that DITA topic IDs are useful (they are not) and
therefore make assumptions or impose requirements on them.
These assumptions are unfounded and the requirements are
misguided. Nevertheless, it is the case that many tools do
this and it’s just not worth the effort to fight it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">At ServiceNow we use the practice of making
the topic ID the same as the topic filename, because we also
impose a filename uniqueness requirement on our content.
Filename uniqueness is also not required by the DITA standard
but it turns out to be really useful in practice, especially
if you are using the “keyname == filename” practice for
assigning keys to topics and images when you add them to maps,
something Oxygen makes very easy to do.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">One reason to make the topic ID the same as
(or reflect, as you show in your template) the topic filename
is that it makes correlating error messages that reflect the
topic ID to the source topic easier—many DITA processes
involve combining or modifying topics in a way that might
change their organization into files, meaning that the
original filename may be lost even though the original ID is
retained (i.e., chunking as implemented in newer Open Toolkit
versions, which only changes topic IDs when necessary to make
the chunked result have unique topic IDs).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So as much as it pains me to say so, the
practical implication for most of users of DITA content is
that topic IDs should be unique across your content set.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note, however, that this is still not
sufficient for determining the anchors used in generated
outputs—as long as there is reuse the output processor may
need to generate new unique anchor values (i.e., HTML file
names, PDF anchors, contextual help context IDs, etc.), in
which case the original topic filename or ID cannot be
preserved—at best it becomes the basis for the generated value
(i.e., the way Open Toolkit adds “-1” to topic filenames when
a topic is used as both a resource-only topic and a
normal-role topic in the same root map context).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When you are using keys, those become a
natural basis for generating output anchors and may be
completely different from the topic’s filename or ID. Keys are
necessarily unique within a root map and therefore serve as a
reliable basis for output anchors when uniqueness of anchors
within the deliverable is needed (which it usually is).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Another option is to use the
<resourceid> element to provide hints for deliverable
anchors. For DITA 2.0 we’ve extended the semantics of
<resourceid> to make this explicit and you can
anticipate that in a DITA 1.3 context by implementing your own
handling of <resourceid> to determine output anchors.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And of course the ditavalref facility, with
the ability to define key and filename prefix and suffix
values, makes it possible to re-use topics in different parts
of a map and ensure unique keys and filenames in the effective
input to an output process.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">E.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;color:black">From: </span></b><span
style="font-size:12.0pt;color:black">oXygen-user
<a class="moz-txt-link-rfc2396E" href="mailto:oxygen-user-bounces@oxygenxml.com"><oxygen-user-bounces@oxygenxml.com></a> on behalf of
Frank Dissinger <a class="moz-txt-link-rfc2396E" href="mailto:frank.dissinger@cgs-oris.com"><frank.dissinger@cgs-oris.com></a><br>
<b>Date: </b>Monday, March 27, 2023 at 3:44 AM<br>
<b>To: </b>Oxygen User Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:oxygen-user@oxygenxml.com"><oxygen-user@oxygenxml.com></a><br>
<b>Subject: </b>[oXygen-user] IDs for new DITA topics<o:p></o:p></span></p>
</div>
<p>Hi all,<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>I understand that a topic ID must be unique within the scope
of the root ditamap used for publishing the content. <o:p></o:p></p>
<p><o:p> </o:p></p>
<p>FrameMaker, which I used previously, creates IDs of the type<o:p></o:p></p>
<p><o:p> </o:p></p>
<p><span style="font-size:13.5pt;font-family:"Courier
New"">id172OC0C03J7</span><o:p></o:p></p>
<p><o:p> </o:p></p>
<p>So there is an arbitrary combination of 11 digits and
letters.<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>In oXygen I have set the "DITA > ID Option" as follows:<o:p></o:p></p>
<p><o:p> </o:p></p>
<p><span style="font-size:13.5pt;font-family:"Courier
New"">${localName}_${id}</span><o:p></o:p></p>
<p><o:p> </o:p></p>
<p>Which creates IDs of the following type:<o:p></o:p></p>
<p><o:p> </o:p></p>
<p><span style="font-size:13.5pt;font-family:"Courier
New"">task_rf2_vcg_ywb</span><o:p></o:p></p>
<p><o:p> </o:p></p>
<p>So there is an arbitrary combination of only 9 characters,
mostly letters. But perhaps sufficient for ensuring
uniqueness...<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>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.
<o:p></o:p></p>
<p>This is not what I want and surely not suitable for ensuring
uniqueness.<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>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?<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>Regards,<o:p></o:p></p>
<p>Frank<o:p></o:p></p>
<div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Frank
Dissinger</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D"><o:p></o:p></span></p>
<p><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Documentation
Manager<o:p></o:p></span></p>
<p><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">....................................................................<o:p></o:p></span></p>
</div>
<div>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">CGS
Publishing Technologies International GmbH</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D"><o:p></o:p></span></p>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Email
</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D"><a
href="mailto:frank.dissinger@cgs-oris.com"
moz-do-not-send="true"
class="moz-txt-link-freetext">frank.dissinger@cgs-oris.com</a>
| <strong><span
style="font-family:"Verdana",sans-serif">Web</span></strong>
<a href="http://www.cgs-oris.com/"
moz-do-not-send="true">www.cgs-oris.com</a><o:p></o:p></span></p>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Address</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">
Kettelerstr. 24 | D-63512 Hainburg | Germany<o:p></o:p></span></p>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Phone</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">
+49 6182 9626-27 | <strong><span
style="font-family:"Verdana",sans-serif">Fax</span></strong>
+49 6182 9626-99<o:p></o:p></span></p>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Commercial
register</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">
Offenbach, HRB no. 21495<o:p></o:p></span></p>
<p><strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">Managing
directors</span></strong><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D">
Bernd Rückert, Christoph Thommessen<o:p></o:p></span></p>
<p><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#7F8C8D"><a
href="https://www.cgs-oris.com/signatur"
moz-do-not-send="true"><span
style="color:#7F8C8D;text-decoration:none"><span
style="color:blue;border:solid windowtext
1.0pt;padding:0in"><img
style="width:4.1041in;height:2.0833in"
id="_x0000_i1025" src="cid:~WRD0000jpg"
moz-do-not-send="true" width="394"
height="200" border="0"></span></span></a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>