Test for contents of a Map
Post here questions and problems related to editing and publishing DITA content.
Test for contents of a Map
I have a map inside my bookmap that contains keywords assigned to SKUs.
In my frontmatter.xsl file, I am attempting to test if the class exists so I can obtain the value to print on my cover page. However, I cannot figure out the right test criteria. I thought that should work as I am assuming the skus.ditamap is a topic. I have tried other combinations such as , etc.
Perhaps this assumption is wrong. If so, I would appreciate any help in sorting this out.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<keydef keys="sku1">
<topicmeta>
<keywords>
<keyword>ABC-1234567890123456</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="sku2">
<topicmeta>
<keywords>
<keyword>DEF-1234567890123456</keyword>
</keywords>
</topicmeta>
</keydef>
<keydef keys="sku3">
<topicmeta>
<keywords>
<keyword>GHI-1234567890123456</keyword>
</keywords>
</topicmeta>
</keydef>
</map>
Code: Select all
topic/keyword
Code: Select all
topicmeta map keydef
Code: Select all
<xsl:if test="//*[contains(@class, ' topic/keyword ')][1]">
-
- Posts: 553
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Test for contents of a Map
Post by julien_lacour »
Hello,
You can check the class of any DITA elements by selecting it in Oxygen and checking the Attributes view:
You can also check the Inheritance section of the DITA Specification (e.g. <keyword> element)
Regards,
Julien
You can check the class of any DITA elements by selecting it in Oxygen and checking the Attributes view:
- image.png (12.77 KiB) Viewed 358 times
Regards,
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