Add tag in title based on condition

Posts: 8
Joined: Wed Nov 02, 2016 1:48 am

Add tag in title based on condition

Post by cfurlin » Tue Nov 06, 2018 7:01 pm

Here's my problem:

I build two webhelp doc sets from the same source, one called 'staging' and one called 'production'. Production is my live help and staging goes on an internal server for review. Production is a subset of the staging content.

What I'd like to do is add a tag in the topic title that says "In Development" for all draft topics. I've been able to do this by adding an output class and CSS in the topic file, but I'd prefer not to tag the topic directly with an output class or condtion, but the map entry using a condition.

More simply: I set a condition on a topic in the map and when I publish, the topic title has a tag prepended to it that says "In Developement"

Is this possible?


Posts: 384
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova

Re: Add tag in title based on condition

Post by radu_pisoi » Fri Nov 16, 2018 3:47 pm


I'm afraid there is no simple solution to modify the topic title at publishing time depending on a condition set in DITA map.

A solution would be develop a DITA-OT XSLT extension plugin that overrides the generation of the topic's title element. The template that generates the topic title is located in:

Code: Select all

Open the file and search for template:

Code: Select all

<xsl:template match="*[contains(@class, ' topic/topic ')]/*[contains(@class, ' topic/title ')]">
If you like this solution, please contact us on email address to give you more details.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Post Reply