Page 1 of 1

Add ditamap title to gen-user-header

Posted: Wed Sep 11, 2013 7:22 am
by pault
I have created an XSL file that adds a header (gen-user-header) to each page generated by the DITA MAP XHTML scenario. I would like to add the title of the ditamap to this header. It seems like there should be a simple way to do this. How do you do this?

Thanks,

Paul

Re: Add ditamap title to gen-user-header

Posted: Wed Sep 11, 2013 11:03 am
by Radu
Hi Paul,

Tough one because when DITA content gets published to XHTML using the DITA to XHTML transformation by default each individual topic gets converted to an HTML file so when the XSLT is applied on a DITA topic you have no context information related to the DITA Map which linked to this topic. So I do not have a good idea for this one.

By the way, if you edit the DITA XHTML transformation scenario, in the Parameters list there is a parameter called args.hdr which you could possibly use to add static content to each topic's header instead of making an XSLT customization.

Have you tried the DITA Map WebHelp transformation? It should show the DITA Map like a TOC in the left part of the browser and thus present the title of the DITA Map at all times.

Regards,
Radu

Re: Add ditamap title to gen-user-header

Posted: Wed Mar 08, 2017 11:30 am
by rgmetap
Hi Radu Sir,


I got the same scenario , instead I need to show the ditamap title on body header in PDF generation. How can I do that ? My TOC , cover page etc are disabled. I need to work only in body pages. So the ditamap title will be shown on each header body pages.

Regards
Rohit

Re: Add ditamap title to gen-user-header

Posted: Thu Mar 09, 2017 10:12 am
by Radu
Hi Rohit,

We have a small topic in our user's guide which mentions the two XSLT templates where you need to make changes:

https://www.oxygenxml.com/doc/versions/ ... ined3.html

so if you override those XSLT templates in your PDF customization you can probably use an XPath expression to match the DITA Map title and use it in the header.

Regards,
Radu

Re: Add ditamap title to gen-user-header

Posted: Fri Mar 10, 2017 7:37 am
by rgmetap
Hi Radu Sir,

Thank You for your valuable suggestions . I managed to show it

Regards
Rohit