Image for WHR header from map/topichead/topicmeta/data/image
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 12
- Joined: Thu Apr 21, 2016 8:49 pm
Image for WHR header from map/topichead/topicmeta/data/image
EDIT: Is there a simpler way to do this? Maybe take the href of the image with outputclass="header-img" and use that to set the value of webhelp.logo.image?
Thanks in advance for the help... My XSLT is a little rusty, and I'm sure there's something obvious I'm missing, but here's my issue...
I'm customizing a Webhelp Responsive plugin.
I need an image in my html page headers that changes for each map published, so I've placed an image in the map within a data element within the map's topicmeta element...
Here's my XSLT (testing in commonComponentsExpander.xsl):
Again, thanks in advance for any help someone can provide.
Thanks in advance for the help... My XSLT is a little rusty, and I'm sure there's something obvious I'm missing, but here's my issue...
I'm customizing a Webhelp Responsive plugin.
I need an image in my html page headers that changes for each map published, so I've placed an image in the map within a data element within the map's topicmeta element...
Code: Select all
<map>
<title>Map Title</title>
<topicmeta>
<data><image outputclass="header-img" href="image.jpg" id="image_123456"/></data>
</topicmeta>
Code: Select all
<xsl:template match="whc:webhelp_logo" mode="copy_template">
<xsl:variable name="headerImage" select="/map/topicmeta/data/image[@outputclass='header-img']/@href"/>
<!-- If the image reference exists, insert an <img> tag -->
<xsl:if test="$headerImage">
<img src="{$headerImage}" alt="Header logo"/>
</xsl:if>
<xsl:if test="not($headerImage)"/>
</xsl:template>
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