Adding a <div> tag around all related links in XHTML output
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 3
- Joined: Sat Mar 31, 2012 1:56 am
Adding a <div> tag around all related links in XHTML output
Post by davegibbons »
I need to add a div around all the related links in XHTML output. Oxygen appears to have customized the DITA toolkit in this area. Where would I add a div with an id attribute so that the div surrounds all of the related links on an XHTML page, including "previous" and "next" links?
Thank you for your help.
Thank you for your help.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Adding a <div> tag around all related links in XHTML output
Post by sorin_ristache »
Hello,
For XHTML output you should run the DITA Map XHTML transformation. The related links are created in the template:
from the stylesheet [Oxygen-install-dir]\frameworks\dita\DITA-OT\xsl\xslhtml\rel-links.xsl. This template already contains a div element without attributes so you should add an id attribute to this div element, for example:
If you want to surround only the Previous Topic and Next Topic links you should modify only the template:
from [Oxygen-install-dir]\frameworks\dita\DITA-OT\xsl\xslhtml\rel-links.xsl. You should add the div element inside this template:
Regards,
Sorin
For XHTML output you should run the DITA Map XHTML transformation. The related links are created in the template:
Code: Select all
<xsl:template match="*[contains(@class,' topic/related-links ')]" name="topic.related-links">
Code: Select all
<xsl:template match="*[contains(@class,' topic/related-links ')]" name="topic.related-links">
<div id="some_ID">
. . .
Code: Select all
<xsl:template name="next-prev-parent-links">
Code: Select all
<xsl:template name="next-prev-parent-links">
<div id=some_ID>
. . .
</div>
</xsl:template>
Regards,
Sorin
-
- Posts: 3
- Joined: Sat Mar 31, 2012 1:56 am
Re: Adding a <div> tag around all related links in XHTML output
Post by davegibbons »
Excellent, Sorin! Thank you!
Return to “General XML Questions”
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