question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML5 navtitle text is doubled when both navtitle and topic are keyrefs

See original GitHub issue

Expected Behavior

Navtitle text is output one time—for example, Topic.

Actual Behavior

Navtitle text is repeated—for example, TopicTopic.

Possible Solution

Not sure at this time.

Steps to Reproduce

Build the following ditamap:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>Test</title>
    <topicref keyref="a" locktitle="yes">
        <topicmeta><navtitle><ph keyref="product-name"/></navtitle></topicmeta>
    </topicref>
    <keydef keys="a" href="a.dita"/>
    <keydef keys="product-name"><topicmeta><keywords><keyword>Topic</keyword></keywords></topicmeta></keydef>
</map>

Contents of a.dita don’t matter, but for example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="a">
    <title>Aardvarks are Awesome</title>
</concept>

Copy of the error message, log file or stack trace

No error in log. Output of index.html:

<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html lang="en">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta charset="UTF-8">
      <meta name="copyright" content="(C) Copyright 2020">
      <meta name="DC.rights.owner" content="(C) Copyright 2020">
      <meta name="DC.type" content="map">
      <meta name="DC.format" content="HTML5">
      <link rel="stylesheet" type="text/css" href="commonltr.css">
      <title>Test</title>
   </head>
   <body>
      <h1 class="title topictitle1">Test</h1>
      <nav xmlns:dita="http://dita-ot.sourceforge.net">
         <ul class="map">
            <li class="topicref"><a href="a.html">TopicTopic</a></li>
         </ul>
      </nav>
   </body>
</html>

Environment

  • DITA-OT version: 3.5.3 (was not present in 3.1.x; still present in 3.5.4 hotfix branch)
  • Operating system and version: macOS
  • How did you run DITA-OT? dita command
  • Transformation type: HTML5

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jelovirtcommented, Sep 12, 2020

Original issue seems to be cause by a bug in combining metadata during key processing.

0reactions
infotexturecommented, Sep 10, 2020

See https://github.com/dita-ot/docs/pull/304 for an example of this workaround in use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

navtitle - OASIS Open
The navigation title (navtitle) element is one of a set of alternate titles that can be included inside the titlealts element.
Read more >
navtitle - Oxygen XML Editor
The navigation title (navtitle) element is one of a set of alternate titles that can be included inside the titlealts element. This navigation...
Read more >
DITA Open Toolkit, version 1.8.M2 - Titania Delivery
Ant is a Java-based, open-source tool that is provided by the Apache Foundation. It can be used to declare a sequence of build...
Read more >
userguide_MERGED.xml - Saxonica
The toolkit uses Ant, XSLT, and Java to transform DITA content (maps and topics) into different deliverable formats. Processing structure Processing ...
Read more >
https://12324174198285656501.googlegroups.com/atta...
Language" content="en" /> <link rel="stylesheet" type="text/css" ... class="stentry">Missing navtitle attribute or element for peer topic "<var ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found