<topicset> output query

Post here questions and problems related to editing and publishing DITA content.
Stacey
Posts: 63
Joined: Tue Mar 14, 2017 12:36 am

<topicset> output query

Post by Stacey »

Hi There:
I'm using <topicset> to group topic containing similar instructions together. So, "Update from A", "Update from B". I'm being asked to add "Option 1:", "Option 2:, etc. at the front of the <topicref>s. Right now, I'm adding it in manually, but if we want to reorder the Options, this is going to be a lot of work/introduce room for error. Is there a way to have oXygen automatically add it in the output (like when it adds the step numbers, or the info labels, etc.).
This would be for webhelp output.
I'm open to using something other then <topicset> to group these things if there's a better way.
Thanks,
Stacey
Posts: 63
Joined: Tue Mar 14, 2017 12:36 am

Re: <topicset> output query

Post by Stacey »

Added question: I can't seem to use <topicset>s as links in reltables or cross-references. Is there a workaround for this?
julien_lacour
Posts: 621
Joined: Wed Oct 16, 2019 3:47 pm

Re: <topicset> output query

Post by julien_lacour »

Hi Stacey,

If you don't want to hardcode the options order you still can add them into a CSS specific rule using a ::before pseudo-element, a counter and the content property, something like:

Code: Select all

.wh_tiles {
  counter-reset: option;
}
.wh_tile {
  counter-increment: option;
}
.wh_tile_title::before {
  content: "Option " counter(option) ":";
}
Regards,
Julien
julien_lacour
Posts: 621
Joined: Wed Oct 16, 2019 3:47 pm

Re: <topicset> output query

Post by julien_lacour »

Hello,

For the reltable you can use a topicref with the @conref attribute:

Code: Select all

<topicset id="update">
    <topicref href="update_a.dita"/>
    <topicref href="update_b.dita"/>
</topicset>
<reltable>
    <relrow>
        <relcell>
            <topicref conref="#update"/>
        </relcell>
    </relrow>
</reltable>
For the cross reference, it is not possible to create a link to a topicref (topicset inherits from map/topicref) but only to a topic.

Regards,
Julien
Post Reply