Testing the input map name
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 16
- Joined: Tue Feb 03, 2015 3:23 am
Testing the input map name
Hi,
I'd like to add a link to the top of the webhelp TOC. If my input map is called foo.ditamap, I want the link to point to the output of bar.html. If my input map is called bar.ditamap, I want the link to point to the output of foo.html. So far I have this, but I'm not sure what I am able to test:
Can I access from within the Webhelp transform? If so, then I can test based on that. I have looked in the transform and I can't see where you parse it at all.
I'd like to add a link to the top of the webhelp TOC. If my input map is called foo.ditamap, I want the link to point to the output of bar.html. If my input map is called bar.ditamap, I want the link to point to the output of foo.html. So far I have this, but I'm not sure what I am able to test:
Code: Select all
<div id="toggle_foo_or_bar_link">
<xsl:choose>
<xsl:when test="">
<p>You are viewing the Foo docs. View the <a href="bar.html" target="_blank">Bar</a> docs instead.</p>
</xsl:when>
<xsl:otherwise>
<p>You are viewing the Bar docs. View the <a href="foo.html" target="_blank">Foo</a> docs instead.</p>
</xsl:otherwise>
</xsl:choose>
</div>
Code: Select all
dita.input.filename
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: Testing the input map name
Post by radu_pisoi »
Hi,
To get the URL of the current processed DITA map you could use the document-uri() function. To find its name, you could use the function tokenize(document-uri(.), '/')[last()].
However, the next oXygen version that will be available until the end of this month, will include a new HTML output: Webhelp Responsive. This output is based on HTML templates and it is more easy to customize that the current WebHelp out. It has already defined empty place holders you can use to include custom HTML fragment in your publication, like external links for your case.
To get the URL of the current processed DITA map you could use the document-uri() function. To find its name, you could use the function tokenize(document-uri(.), '/')[last()].
However, the next oXygen version that will be available until the end of this month, will include a new HTML output: Webhelp Responsive. This output is based on HTML templates and it is more easy to customize that the current WebHelp out. It has already defined empty place holders you can use to include custom HTML fragment in your publication, like external links for your case.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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