Re: Override Topic title with @navtitle #XSLT


Kristen James Eberlein
 

Add lock title=“yes” to the <topicref> element. Be aware that the @alt attribute has been deprecated since 2010; you should be using <alt>.

Kris


On Mar 31, 2021, at 7:34 AM, Shaurabh via groups.io <shaurabh.prakash-ext@...> wrote:

I have a scenario where i need to override Topic title with navtitle value in frontmatter using xslt. Being new to DITA, i am unaware of any approach to achieve it. Below is the sample given.
Title in the output file should be "Story Book"(given in navtitle) instead of title(Poem) given in dita file. Please help.

#Main.ditamap

<bookmap rev="3" dms_docid="xyz123" id="xyz123" doc_type="Story book">
    <booktitle>
        <mainbooktitle>Stories</mainbooktitle>
    </booktitle>
    <frontmatter class="- map/topicref bookmap/frontmatter ">
        <topicref navtitle="Story Book" format="dita" href="ab12_Story.dita" type="concept"
            class="- map/topicref "/>
    </frontmatter>
    <chapter navtitle="Detailed Story" locktitle="yes">
        <topicref href="UserStory1.dita"/>
    </chapter>
    <backmatter class="- map/topicref bookmap/backmatter ">
        <amendments format="dita" href="xyz123_history.dita" type="concept"
            class="- map/topicref bookmap/amendments "/>
    </backmatter>
</bookmap>


#UserStory1.dita
 
<concept id="concept_123">
    <title>Poem</title>
    <conbody>
        <section id="section_567">
            <p>This Book contains children stories aged between 5 - 8 years.</p>
        </section>
    </conbody>
</concept>

Join main@dita-users.groups.io to automatically receive all group messages.