Hi Rich,
In DITA ID uniqueness checking should handle these two cases:
1) ID's set on the DITA <topic>, <task>, <concept> or <map> root elements (so IDs set on the DITA main type elements).
Indeed your quote applies to that:
The id attributes for topic and map elements are true XML IDs and therefore must be unique with respect to other XML IDs within the scope of the XML document that contains the topic or map element.
Because a new topic can be added to the end of an existing topic, their IDs must be unique in the context of the edited document. And Oxygen automatically checks this, either via "Validate and check for completness" or with automatic validation done when you are editing the topic or map.
2) IDs placed on sub-topic elements (<p>, <b>, <fig>, <section> etc). For these the specs states:
Thus, within a single XML document containing multiple peer or nested topics, the IDs of the non-topic elements only need to be unique within each topic
So these IDs need to be unique not in the entire document but in the context of the topic in which they appear.
For example in this case:
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="t1">
<title>a</title>
<body>
<p id="pid"></p>
</body>
<topic id="t2">
<title>b</title>
<body>
<p id="pid"></p>
</body>
</topic>
</topic>
The two paragraphs have the same ID but they appear in different topic contexts so the entire document is valid.
But in this case:
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="t1">
<title>a</title>
<body>
<p id="pid"></p>
<p id="pid"></p>
</body>
</topic>
the IDs of the paragraphs are no longer unique and Oxygen reports this as an error (either on automatic validation or when using the
Validate and check for completeness action in the DITA Maps Manager View).
Coming back to the original thread discussion, in the
Validate and check for completeness settings Oxygen had a checkbox which could disable this (2) case of uniqueness checking. We removed the checkbox and we always make this checking and report the error, so the checkbox can no longer be used to disable this validation checking.
Regards,
Radu