conref in title not in WebHelp book title
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 72
- Joined: Tue Oct 21, 2014 10:01 pm
conref in title not in WebHelp book title
I have a ditabase topic that is a topicref in the frontmatter in my bookmap. The title of this topic contains a conref to a product name, followed by text. The purpose of course is to make this title the book title in my WebHelp output.
In the WebHelp output, only the text displays in the top banner that displays the book title. Can you tell my how to get the full title to show up in the top banner and not just the text?
What's strange is that this topic title shows up correctly in the TOC and the HTML output for that page looks OK.
In the WebHelp output, only the text displays in the top banner that displays the book title. Can you tell my how to get the full title to show up in the top banner and not just the text?
What's strange is that this topic title shows up correctly in the TOC and the HTML output for that page looks OK.
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: conref in title not in WebHelp book title
Hi,
I don't quite understand your entire setup. The top banner in the default WebHelp output displays the value of the bookmap <mainbooktitle> element, so it is not connected to the title of the first topic referenced in the map frontmatter.
The title of each topic should be displayed in the TOC and in the right part of the frameset. From what I tested (WebHelp produced with Oxygen 17.0), it gets properly displayed.
If you still have problems with this, please try to give us more details, maybe send a small DITA project which exhibits the problem to our email address support at oxygenxml dot com.
Also, what Oxygen version are you using? Have you customized the WebHelp output in any way?
Regards,
Radu
I don't quite understand your entire setup. The top banner in the default WebHelp output displays the value of the bookmap <mainbooktitle> element, so it is not connected to the title of the first topic referenced in the map frontmatter.
The title of each topic should be displayed in the TOC and in the right part of the frameset. From what I tested (WebHelp produced with Oxygen 17.0), it gets properly displayed.
If you still have problems with this, please try to give us more details, maybe send a small DITA project which exhibits the problem to our email address support at oxygenxml dot com.
Also, what Oxygen version are you using? Have you customized the WebHelp output in any way?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 72
- Joined: Tue Oct 21, 2014 10:01 pm
Re: conref in title not in WebHelp book title
Sorry about that. Yes, that portion of the plugin (v15) was customized. I set the code back to the default and it works as you describe. However, I do need to figure out how to use the topic title of the first topicref instead here.
On a side note, can you explain this code that resides in the default com.oxygenxml.webhelp/xsl/createMainFiles.xsl, line 91:
I can't figure out how the plugin knows that selecting can pick up the /bookmap/booktitle/mainbooktitle. I've never seen /toc:title XPath before. An explanation would be helpful to me in my understanding of this plugin.
Thanks
On a side note, can you explain this code that resides in the default com.oxygenxml.webhelp/xsl/createMainFiles.xsl, line 91:
Code: Select all
<xsl:when test="$toc/toc:title">
<xsl:apply-templates select="$toc/toc:title/node()" mode="copy-xhtml"/>
</xsl:when>
Code: Select all
$toc/toc:title/node()
Thanks
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: conref in title not in WebHelp book title
Hi,
The way that the TOC processing works is that first an XSLT stylesheet called:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\tocDita.xsl
which is applied over the merged DITA Map and then creates a custom TOC XML document. You can look in that XSLT at the template:
to see how the TOC title gets computed.
On that custom TOC XML document the createMainFiles.xsl is applied to create the XHTML TOC equivalent.
Regards,
Radu
The way that the TOC processing works is that first an XSLT stylesheet called:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\dita\tocDita.xsl
which is applied over the merged DITA Map and then creates a custom TOC XML document. You can look in that XSLT at the template:
Code: Select all
<xsl:template match="/">
On that custom TOC XML document the createMainFiles.xsl is applied to create the XHTML TOC equivalent.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 72
- Joined: Tue Oct 21, 2014 10:01 pm
Re: conref in title not in WebHelp book title
Thanks for the explanation.
Unfortunately, I still can't figure out how to get the title of the first topic title to display in the top banner of the output. Can you help with this?
Unfortunately, I still can't figure out how to get the title of the first topic title to display in the top banner of the output. Can you help with this?
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: conref in title not in WebHelp book title
Hi,
So in the tocDita.xsl I previously mentioned there is a template:
in which there is an xsl:choose element. You can comment that out and instead of it use:
You can change the select value of the firstTopicref variable to match your specific case.
Regards,
Radu
So in the tocDita.xsl I previously mentioned there is a template:
Code: Select all
<xsl:template match="/">
.........
Code: Select all
<xsl:variable name="firstTopicref" select="(//*[contains(@class, ' map/topicref ')][@href])[1]"/>
<xsl:choose>
<xsl:when test="$firstTopicref/*[contains(@class, ' map/topicmeta ')]/*[contains(@class, ' topic/navtitle ')]">
<xsl:apply-templates
select="$firstTopicref/*[contains(@class, ' map/topicmeta ')]/*[contains(@class, ' topic/navtitle ')]"
mode="toc-title"/>
</xsl:when>
<xsl:when test="$firstTopicref/@navtitle">
<xsl:value-of select="$firstTopicref/@navtitle"/>
</xsl:when>
</xsl:choose>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 72
- Joined: Tue Oct 21, 2014 10:01 pm
Re: conref in title not in WebHelp book title
I've implemented this update, but how to I test for a specific $transtype? I'd like to restrict this change to only webhelp-mobile transtypes.
I've tried adding <xsl:param name="TRANSTYPE"/> to the tocDita.xsl file, but it doesn't seem to work. For example,
What am I doing wrong?
I've tried adding <xsl:param name="TRANSTYPE"/> to the tocDita.xsl file, but it doesn't seem to work. For example,
Code: Select all
<xsl:choose>
<xsl:when test="$TRANSTYPE = 'webhelp-mobile'">
.... do whatever
</xsl:when>
<xsl:otherwise>
..... do something else
</xsl:otherwise>
</xsl:choose>
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: conref in title not in WebHelp book title
Hi,
After you defined the:
parameter in the XSLT stylesheet you need to pass the proper value to it from the build file.
In your case, if you open the build file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\build_dita.xml
at some point it has an XLST task like:
to which you can add an extra parameter like:
So what you are actually doing is to pass the parameter value from the ANT build files (where it is already defined) to the XSLT stylesheet where you can use it in the templates.
Regards,
Radu
After you defined the:
Code: Select all
<xsl:param name="TRANSTYPE"/>
In your case, if you open the build file:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\build_dita.xml
at some point it has an XLST task like:
Code: Select all
<xslt processor="trax"
in="${dita.temp.dir}/${user.input.file}"
out="${output.dir}/toc.xml"
style="${dita.dir}/plugins/com.oxygenxml.webhelp/xsl/dita/tocDita.xsl"
force="yes"
classpathref="dost.class.path">
Code: Select all
<param name="TRANSTYPE" expression="${transtype}"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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