DITA ID attributes and their scopes are specified in Serna document templates:
Serna document template section with DITA ID specifications
<id-scope-defs>
<id-scope-def>
<pattern>*[@class="- topic/topic "]</pattern>
<attr-name>id</attr-name>
<id-def>
<pattern>*</pattern>
<attr-name>id</attr-name>
</id-def>
</id-scope-def>
</id-scope-defs>
List of DITA ID scope definitions
<id-scope-defs> <!-- Content: (id-scope-def*) --> </id-scope-defs>
id-scope-defs - the list of DITA ID scope definitions.
id-scope-def - DITA ID scope definition (optional).
DITA ID scope definition
<id-scope-def>
<!-- Content: ( pattern,
attr-name,
id-def*,
idref-def*
) -->
</id-scope-def>
pattern - XSLT pattern specifies the scoping element - element in the scope of which DITA ID attributes must be unique (required).
attr-name - QName specifies the name of the DITA ID attribute of the scoping element (required).
id-def - DITA ID definition (optional).
idref-def - IDREF definition (optional).
DITA ID definition
<id-def>
<!-- Content: ( pattern,
attr-name ) -->
</id-def>
pattern - XSLT pattern specifies the element which may have the DITA ID attribute (required).
attr-name - QName specifies the name of the DITA ID attribute of the above-mentioned element (required).
IDREF definition
<idref-def>
<!-- Content: ( pattern,
attr-name ) -->
</idref-def>
pattern - XSLT pattern specifies the element which may have the IDREF attribute (required).
attr-name - QName specifies the name of the IDREF attribute of the above-mentioned element (required).
idref-def is used to validate references to elements with DITA IDs.
If you have your own DITA specialization, you can specify DITA ID attributes and their scopes in a document template. As an example, see DITA ID specifications at: sernaInstallationPath/plugins/dita/dita-scope-defs.ent:
<t:id-scope-defs>
<t:id-scope-def>
<t:pattern>*[contains(@class, ' topic/topic ') or
contains(@class, ' map/map ')]</t:pattern>
<t:attr-name>id</t:attr-name>
<t:id-def>
<t:pattern>*</t:pattern>
<t:attr-name>id</t:attr-name>
</t:id-def>
<t:idref-def>
<t:pattern>*[contains(@class, ' topic/xref ')
or contains(@class, ' topic/link ')]</t:pattern>
<t:attr-name>href</t:attr-name>
</t:idref-def>
<t:idref-def>
<t:pattern>*[@conref != '']</t:pattern>
<t:attr-name>conref</t:attr-name>
</t:idref-def>
</t:id-scope-def>
</t:id-scope-defs>