Failed using webhelp macros
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 3
- Joined: Wed Jun 22, 2022 10:29 am
Failed using webhelp macros
Hello
I use DITA-OT 2.54, webhelp 20.1 with the build 2018042310, and the oxygen.webhelp.responsive plugin.
I have to add the following meta tag to my wt_topic.html:
It requres me to use a special variable for a topic id. I've read this article for webhelp 20.1, and found out that I can use the parameter topic-xpath that can be used to execute an XPath expression over the current topic.
I tried different parameters:
But only the last one works. Can you recommend me, please, what I should fix to be able to insert a topic_id as a varible in the meta tag?
Regards,
Nadia
I use DITA-OT 2.54, webhelp 20.1 with the build 2018042310, and the oxygen.webhelp.responsive plugin.
I have to add the following meta tag to my wt_topic.html:
Code: Select all
<link rel="canonical" href="https://example.com/topic_id" />
It requres me to use a special variable for a topic id. I've read this article for webhelp 20.1, and found out that I can use the parameter topic-xpath that can be used to execute an XPath expression over the current topic.
I tried different parameters:
Code: Select all
<link rel="canonical" href="https://example.com/${topic-xpath(/topic/@id)}" /> //(my custom one)
<link rel="canonical" href="${topic-xpath(string-join(//shortdesc//text(), ' '))}" /> // (from the example)
<link rel="canonical" href="only this command works ${oxygen-webhelp-assets-dir}" /> // (from the example)
But only the last one works. Can you recommend me, please, what I should fix to be able to insert a topic_id as a varible in the meta tag?
Regards,
Nadia
image.png
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Failed using webhelp macros
Hello,
I have tested your example with WebHelp 20.1 and the macros were expanded correctly for all three <link> elements.

Regards,
Alin
I have tested your example with WebHelp 20.1 and the macros were expanded correctly for all three <link> elements.

Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
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