Include an xref within prodinfo/brand
Post here questions and problems related to editing and publishing DITA content.
Include an xref within prodinfo/brand
Hi
I would like to include a URL within the prodinfo/brand element to display on the cover page. Although I have succeeded in doing this, I would like to make the URL a live clickable link.
The xref element is not valid within the brand element, so I have tried adding a keydef to the map, which references a link in variables files, like this:
With a keyref in the brand element like this:
This doesn't appear to work either.
Do you have any suggestions as to how I might achieve this, please.
Thanks
Matt
I would like to include a URL within the prodinfo/brand element to display on the cover page. Although I have succeeded in doing this, I would like to make the URL a live clickable link.
The xref element is not valid within the brand element, so I have tried adding a keydef to the map, which references a link in variables files, like this:
Code: Select all
<keydef keys="cover_url">
<topicmeta>
<keywords><keyword conkeyref="url_variables/www_abc_com"/></keywords>
</topicmeta>
</keydef>
Code: Select all
<brand><keyword keyref="cover_url"/></brand>
Do you have any suggestions as to how I might achieve this, please.
Thanks
Matt
-
- Posts: 566
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Include an xref within prodinfo/brand
Post by julien_lacour »
Hi Matt,
You cannot use <xref> directly in <brand> but you can wrap it in a <data> element:
Then you just need to create an XPath expression that fetches the link and use it in oxy_xpath() function as value of -oxy-link property:
Regards,
Julien
You cannot use <xref> directly in <brand> but you can wrap it in a <data> element:
Code: Select all
<map>
<title>Map</title>
<topicmeta>
<prodinfo>
<prodname>Some Product</prodname>
<vrmlist><vrm version="1"/></vrmlist>
<brand><data><xref href="https://www.oxygenxml.com" scope="external" format="html"/></data></brand>
</prodinfo>
</topicmeta>
</map>
Code: Select all
*[class ~= "front-page/front-page-title"] > *[class ~= "topic/title"]:after {
display: block;
content: "Brand: Oxygen XML";
-oxy-link: oxy_xpath('(//*[contains(@class, " map/topicmeta ")])[1] \
//*[contains(@class, " topic/brand ")]//@href');
margin-top: 4em;
text-align: center;
color: gray;
}
Julien
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