Reputation: 2402
I have a DITA topic that includes an imagemap
.
When published to HTML (responsive webhelp) two HTML components are generated, an img
and a map
. These must be connected via an id
field, for which DITA_OT freshly generates a unique one each time.
This triggers unnecessary changes in our version control system.
Is there a way of specifying the ID value to be used to link the two HTML components?
Upvotes: 0
Views: 44
Reputation: 1924
Taking a step back, here's an alternative answer:
Deliverables produced by the publishing process (PDFs, EPUBs, HTML+CSS+JS files) should not be kept in a version control system as they are never manually edited by the end user.
The version control system should keep the input files (DITA XML, Markdown, etc) and the publishing system should use SSH to connect to a certain folder on the HTTP server and upload the final deliverables (PDF, HTML, etc) there.
Because we used to do this for our own web site, keep the XML files and the HTML files in the same version controlled project which ended up being bloated without any real benefit.
Upvotes: 1
Reputation: 1924
The unique IDs are generated in the XSLT stylesheet "DITA-OT/plugins/org.dita.html5/xsl/ut-d.xsl" in the template:
<xsl:template match="*[contains(@class,' ut-d/imagemap ')]" name="topic.ut-d.imagemap">
using the generate-id() function. From what I know and what I tested I assume that if the processed DITA content remains exactly the same, the generated IDs should not change. Can you perform a similar test? Publish the same DITA Map twice to two output folders, then check if this generated ID is different in the two folders.
But you could also try to take control over the IDs by creating a DITA OT plugin which overrides this entire xsl template and lets you take control over the ID value.
Upvotes: 1