Add ditamap title to gen-user-header

pault
Posts: 64

Add ditamap title to gen-user-header

Wed Sep 11, 2013 7:22 am

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
Radu
Posts: 5759

Re: Add ditamap title to gen-user-header

Wed Sep 11, 2013 11:03 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rgmetap
Posts: 12
Location: Pune , India

Re: Add ditamap title to gen-user-header

Wed Mar 08, 2017 11:30 am

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
Rohit Ghosh
Jr. Software Developer
Radu
Posts: 5759

Re: Add ditamap title to gen-user-header

Thu Mar 09, 2017 10:12 am

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/18.1/ug-editor/topics/dita_pdf_header_footer_customization-x-predefined3.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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
rgmetap
Posts: 12
Location: Pune , India

Re: Add ditamap title to gen-user-header

Fri Mar 10, 2017 7:37 am

Hi Radu Sir,

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

Regards
Rohit
Rohit Ghosh
Jr. Software Developer

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest