Topic Headings in DITA map file don't appear in the XHTML output

Here should go questions about transforming XML with XSLT and FOP.
OxUser
Posts: 18
Joined: Tue Mar 12, 2013 1:39 am

Topic Headings in DITA map file don't appear in the XHTML output

Post by OxUser »

The Topic Headings that I insert into my DITA map file, do not come across as heading 1 (or at all) in the XHTML output. They DO come across as heading 1 in the PDF.

Is there some way to have each Topic Headings come across to the output XHTML as heading 1? And also, is there some way to have the subheadings under Topic Headings come across as heading 2 (instead of heading 1 as they are now doing - they must get promoted when the actual heading 1 does not show)?

Here's a simplified view of my DITA map file:

Topic 1
Topic Heading 1
-subheading
-subheading
Topic 2
Topic Heading 2
Topic 3

In the example above, every TOPIC is output to the XHTML as a heading, but none of the TOPIC HEADINGS are output at all (but I want them to be, as heading 1). Moreover, the subheadings below the TOPIC HEADINGS are now promoted to heading 1 (where they should be heading 2, as they are under the topic heading)

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

Re: Topic Headings in DITA map file don't appear in the XHTML output

Post by Radu »

Hi,

Please give me a more detailed example, a small DITA Map XML content fragment.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
OxUser
Posts: 18
Joined: Tue Mar 12, 2013 1:39 am

Re: Topic Headings in DITA map file don't appear in the XHTML output

Post by OxUser »

I posted a copy of the map file below. Thanks.

When output as XHTML, the topichead does not display at all. The topics demoted beneath the topichead appear in the XHTML as heading 1, rather than the heading 2 they should be, were the topichead showing up as the heading 1.

Example of topichead in the mapfile below:
<topichead navtitle="Material Requirements" type="concept" format="dita">

Example of topic in the mapfile below:
<topicref href="TEMPLATE_FRTMATTER_COPYRIGHT_C.dita"/>

Here is my map file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<?xml-stylesheet type="text/css" href="out/xhtml/MY_CUSTOM_CSS_AG_commonltr.css"?>
<map chunk="to-content">
<title>GMI Template Document</title>
<topicref href="TEMPLATE_FRTMATTER_COPYRIGHT_C.dita"/>
<topichead navtitle="General Information" type="concept" format="dita">
<topicref href="TEMPLATE_1.1_Desc_C.dita"/>
<topicref href="TEMPLATE_1.2_Seq_C.dita"/>
<topicref href="TEMPLATE_1.3_Reason_C.dita"/>
</topichead>
<topicref href="TEMPLATE_2.1_Req_Docs_C.dita"/>
<topichead navtitle="Material Requirements" type="concept" format="dita">
<topicref href="TEMPLATE_2.2_Tool_Tests_Set_C.dita"/>
<topicref href="TEMPLATE_2.3_Supplies_C.dita"/>
<topicref href="TEMPLATE_2.4_Material_Info_C.dita"/>
<topicref href="TEMPLATE_2.5_SW_C.dita"/>
<topicref href="TEMPLATE_2.6_Forms_C.dita"/>
</topichead>
<topichead navtitle="Precautions and Peparations" type="topic" format="dita">
<topicref href="TEMPLATE_3.1_Precaution_C.dita"/>
<topicref href="TEMPLATE_3.2_Preparation_C.dita"/>
</topichead>
<topicref href="Template_4.1_Procedure_Overvw_C.dita"/>
<topichead navtitle="Procedure" type="concept" format="dita">
<topicref href="TEMPLATE_4.2.1.1_Procedure_TBL2_C.dita"/>
</topichead>
</map>
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Topic Headings in DITA map file don't appear in the XHTML output

Post by Radu »

Hi,

I used Oxygen 14.2 with no other customizations to publish the map to XHTML using the transformation scenario DITA Map XHTML and the output contained the topic head entries on the first level (it showed in the TOC the entries General Information, Material Requirements, Precautions and Peparations and Procedure). Maybe you should look in the HTML generated for the TOC. Did you make any XSLT or CSS customizations?

As a side note, you should remove the attributes format and type from the topichead entries because they serve no purpose.
You should also remove the xml-stylesheet declaration because that CSS will not be used for publishing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
OxUser
Posts: 18
Joined: Tue Mar 12, 2013 1:39 am

Re: Topic Headings in DITA map file don't appear in the XHTML output

Post by OxUser »

Thanks for doing that.

To be more specific, of the two pages that are output (I set the map file to chunk content, so I get 2 pages from an XHTML output - an Index and another page with all of the content), I CAN see the topichead ONLY on the index.html page, but NOT on the other page that the index page links you to. I noticed that the topichead did not appear as a link on the index page, which makes sense because the topichead does not appear on the other page (and therefore has nothing on the other page to link to).

I would like to get the topichead to appear on both pages - the index page, and the other page with all the content from the topic files. And I hope that getting the topichead to appear on the webpage as a heading 1 will demote the topics under it in the map file to heading 2.

I am linking to a customized CSS to change the formatting of fonts, etc. That's the only change I made in the transformation. That, and setting the map file to chunk content.
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Topic Headings in DITA map file don't appear in the XHTML output

Post by Radu »

Hi,
I CAN see the topichead ONLY on the index.html page, but NOT on the other page that the index page links you to.
Now I understand. I do not think this is possible, the page with all the content is made up from the content referenced by the topicrefs, but the topichead references no content.
An alternative for you would be not to use <topichead> at all, just reference small topics (usual topicrefs) which have a small description about the child topics.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply