Generate the map title with additional metadata
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 105
- Joined: Thu Jan 20, 2022 12:36 pm
Generate the map title with additional metadata
Hello, everyone!
I have a bookmap that includes plenty of information in its metadata.
For instance, I have prodname or vrm version.
In my situation, I would like to adapt the HTML5 output to concatenate the mainbooktitle with the prodname.
I analyzed the map2html5-coverImpl.xsl in the plugin org.dita.html5 and I didn't see where I could apply this change.
The only place where I can find the class mainbooktitle is in the template generateChapterTitle and it seems to apply at the chapter level, or I could find it in the parent template but I think it generates the main title for the topics.
So, where would you advise me to look to change the title of the main map?
I have a bookmap that includes plenty of information in its metadata.
For instance, I have prodname or vrm version.
In my situation, I would like to adapt the HTML5 output to concatenate the mainbooktitle with the prodname.
I analyzed the map2html5-coverImpl.xsl in the plugin org.dita.html5 and I didn't see where I could apply this change.
The only place where I can find the class mainbooktitle is in the template generateChapterTitle and it seems to apply at the chapter level, or I could find it in the parent template but I think it generates the main title for the topics.
Code: Select all
<xsl:template match="*[contains(@class,' bookmap/bookmap ')]/*[contains(@class,' bookmap/booktitle ')]" priority="10">
<h1 class="title topictitle1">
<xsl:call-template name="gen-user-panel-title-pfx"/>
<xsl:apply-templates select="*[contains(@class, ' bookmap/mainbooktitle ')]/node()"/>
</h1>
</xsl:template>
------
Gaspard
Gaspard
-
- Posts: 105
- Joined: Thu Jan 20, 2022 12:36 pm
Re: Generate the map title with additional metadata
I eventually found that I could use the template and succeeded in applying the modification in topic.xsl and map2htmltocImpl.xsl
Code: Select all
gen-user-panel-title-pfx

Code: Select all
<xsl:template name="gen-user-panel-title-pfx">
<xsl:apply-templates select="." mode="gen-user-panel-title-pfx"/>
</xsl:template>
<xsl:template match="/|node()|@*" mode="gen-user-panel-title-pfx">
<xsl:value-of select="/*[contains(@class,' bookmap/bookmap ')]/*[contains(@class,' bookmap/booktitle ')]/*[contains(@class, ' bookmap/booklibrary ')]"/>
<xsl:if test="/bookmap/bookmeta/prodinfo/vrmlist/vrm/@version">
<b> - </b>
<xsl:text> v</xsl:text>
<xsl:value-of select="/bookmap/bookmeta/prodinfo/vrmlist/vrm/@version"/>
<xsl:text>. </xsl:text>
</xsl:if>
</xsl:template>
------
Gaspard
Gaspard
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service