OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] DocBook Assemblies, IDs, and a proposal

Hi Bob,

On Dienstag, 21. Juli 2020 18:39:44 CEST Bob Stayton wrote:
> [...] So if you use IDs on descendant elements of topics, we left
> that as an exercise for the reader.  8^)

Thank you for your detailed answer. It helps me to better understand this 

> [...]
> I think allowing the trans:* attributes to the assembly schema would
> provide useful hooks for doing that fixup process during assembly.

Thank you! Great to see that my proposal wasn't completely out of scope. 

> If you file an issue request on the DocBook Github site, then it will
> be considered by the DocBook Technical Committee.

Done, see https://github.com/docbook/docbook/issues/163

> Before proceeding, I wonder if anyone knows how DITA handles the issue
> of duplicate IDs?

I have no idea. However, after a little research, I found this:

  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.

  Within documents containing multiple topics, the IDs for all non-topic
  elements that have the same nearest ancestor topic element *should* be
  unique with respect to each other. The IDs for non-topic elements may be
  the same as non-topic elements with different nearest ancestor topic

  Note: 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 without regard to the IDs of elements within any
        ancestor or descendant topics.

  Source: https://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/id.html

In the oXygen forum they posted the following example (taken from https://

  <topic id="t1">
      <p id="pid"></p>
    <topic id="t2">
        <p id="pid"></p>

"The two paragraphs have the same ID but they appear in different topic 
contexts so the entire document is valid." If the second <p> element would be 
inside topic[@id='t1']/body, then the whole document wouldn't be valid 

As far as I understand it, only the @id attributes on topics are true ID type, 
other @id attributes on non-topic elements are of type NMTOKEN. See figure 1 
"ID requirements summary table" from the above OASIS document.

It seems, the id issue is then resolved/handled by the DITA Open Toolkit. I 
would assume, it will display any warnings or error messages. However, I 
haven't tested that yet.

Does that help?

  Thomas Schraitle

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]