How to generate different headers in same transformation DITA to HTML5 output

Post here questions and problems related to editing and publishing DITA content.
tech_writer800
Posts: 3
Joined: Tue May 14, 2024 11:13 pm

How to generate different headers in same transformation DITA to HTML5 output

Post by tech_writer800 »

Hello,

We have the following deliverables that we output from DITA to HTML5 using Oxygen XML Editor 23.1 (soon to upgrade to 26.1):
  • Operator's Manual
  • Service Manual
  • Regulatory Manual
When you open the help from Service Mode in our product, the help viewer opens and displays just the Service Manual. When you open help from Operator Mode, help viewer displays only the Operator's Manual. However, the Regulatory Manual must also be displayed in both instances.

I can add an anchor to the OM and SM to pull the RM into the HTML5 output, but each manual requires a different header. Is there any way to specify a header for the first manual (OM or SM) and a second header for the RM that's anchored into those maps? I'm not hopeful on this one, but I do have a manual workaround that will hold me for now. This is an in-house created help viewer, so ideally, a developer would fix it, but they haven't gotten to it yet and I'm not sure when they will.

Oxygen XML Editor 23, soon to upgrade to Oxygen XML Editor 26.1

Thanks.
Radu
Posts: 9116
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to generate different headers in same transformation DITA to HTML5 output

Post by Radu »

Hi,
Just to make this clear, you are publishing DITA to plain HTML5 output. So you are not publishing DITA to WebHelp Responsive output using our special Oxygen publishing plugins.
Please see some answers below:
can add an anchor to the OM and SM to pull the RM into the HTML5 output, but each manual requires a different header.
What do you mean by "anchor", do you plan to maybe refer directly from the OM DITA Map with a mapref to the RM dita map? So that when you publish the OM publication it contains inside the topics from the RM publication?
Or just publish each of these 3 publications individually and add some external links between them?
Is there any way to specify a header for the first manual (OM or SM) and a second header for the RM that's anchored into those maps? I'm not hopeful on this one, but I do have a manual workaround that will hold me for now. This is an in-house created help viewer, so ideally, a developer would fix it, but they haven't gotten to it yet and I'm not sure when they will.
How do you add these headers in the published HTML output?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tech_writer800
Posts: 3
Joined: Tue May 14, 2024 11:13 pm

Re: How to generate different headers in same transformation DITA to HTML5 output

Post by tech_writer800 »

Hi, thanks for getting back to me. I don't think I mentioned, we are using the DITA-OT 3.x.
Here are some answers:
  • Yes, we publish DITA to plain HTML5 because we have our own help viewer. I should mention that the software I'm documenting is used in a medical setting and Javascript is not enabled on the computers where our software is used.
  • Yes, I'm saying that I can add a mapref or an anchorref element to the Operator and Service maps to pull the RM navigation into the output TOC. The problem is that the headers for the topics in the RM manual will say, "Operator's Manual" or "Service Manual" when they need to say, "Regulatory and Safety Manual."
  • The headers are added through the transformation property args.hdr. Unless there's a way to associate one header file with the main ditamap and another with the RM ditamap in a single transformation, I'll have to run the RM separately and replace the files generated from the OM and SM ditamaps. So, I'm hoping there's a more elegant solution.
Thanks for your help.
Radu
Posts: 9116
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to generate different headers in same transformation DITA to HTML5 output

Post by Radu »

Hi,
Some remarks below:
Yes, we publish DITA to plain HTML5 because we have our own help viewer. I should mention that the software I'm documenting is used in a medical setting and Javascript is not enabled on the computers where our software is used.
Ok, this question does not seem related to the Oxygen application and its publishing capabilities itself. Maybe in such cases you can also start a public discussion on the DITA OT discussions list, see what the community has to say: https://github.com/orgs/dita-ot/discussions
Yes, I'm saying that I can add a mapref or an anchorref element to the Operator and Service maps to pull the RM navigation into the output TOC. The problem is that the headers for the topics in the RM manual will say, "Operator's Manual" or "Service Manual" when they need to say, "Regulatory and Safety Manual."
Mapref and anchorref are totally different in behavior. From what I remember anchorref is not implemented by default in the plain XHTML output, do you have publishing customizations which handle anchorref in any way?
https://www.oxygenxml.com/dita/1.3/spec ... orref.html

So I assume you are actually using mapref, meaning you are actually creating a single large publication containing also the entire set of HTML resources from the Regulatory and Safety Manual." DITA Map.
The headers are added through the transformation property args.hdr. Unless there's a way to associate one header file with the main ditamap and another with the RM ditamap in a single transformation, I'll have to run the RM separately and replace the files generated from the OM and SM ditamaps. So, I'm hoping there's a more elegant solution.
Right now I do not have a good idea about how in a single published DITA Map output folder you could have one set of HTML resources with a certain header, and one set of HTML resources with another. Possibly some sort of custom DITA OT publishing plugin could be implemented to inject distinct header content in the generated HTML topics depending on their subfolder placement...

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tech_writer800
Posts: 3
Joined: Tue May 14, 2024 11:13 pm

Re: How to generate different headers in same transformation DITA to HTML5 output

Post by tech_writer800 »

Thanks for looking into this for us, Radhu. It is what I expected. I have found a workaround.
Post Reply