Sub-topic Linking Using PrinceXML
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4
- Joined: Wed Nov 09, 2016 11:52 pm
Sub-topic Linking Using PrinceXML
Post by donlammers »
We are trying to create a DITA style sheet based on your DItamap - WYSIWYG - Experimental transformation, and seem to be just about there. However, links that refer to subtopic elements (i.e., links that contain the "#" character), although they appear underlined as links, are not active. I have tried various combinations of attributes, starting with what oXygen gives me if I use the xref (cross-reference) dialog from the element pop-up (which is "no attributes").
For instance, the following works:
[Codebox=]<xref href="concept_profiling_instrumenting_code_measure_performance.dita>This is a test</xref>[/Codebox]
But the following (which was inserted using oXygen) does not.
[Codebox=]<xref href="concept_profiling_instrumenting_code_measure_performance.dita#concept_profiling_instrumenting_code_measure_performance/ol_kgw_wxf_js>This is a test</xref>[/Codebox]
The links with "#" work in our HTML output. Just not in our PDF output using PrinceXML. I have made a lot of styling changes to the CSS, but even when I reset everything to the original that shipped with 18.1 and run the transform, the same links are broken. Any ideas what I am doing wrong?
For instance, the following works:
[Codebox=]<xref href="concept_profiling_instrumenting_code_measure_performance.dita>This is a test</xref>[/Codebox]
But the following (which was inserted using oXygen) does not.
[Codebox=]<xref href="concept_profiling_instrumenting_code_measure_performance.dita#concept_profiling_instrumenting_code_measure_performance/ol_kgw_wxf_js>This is a test</xref>[/Codebox]
The links with "#" work in our HTML output. Just not in our PDF output using PrinceXML. I have made a lot of styling changes to the CSS, but even when I reset everything to the original that shipped with 18.1 and run the transform, the same links are broken. Any ideas what I am doing wrong?
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Sub-topic Linking Using PrinceXML
Hi,
Thank you for reporting this problem. We will include a fix in the next release.
Meanwhile, follow these steps to activate the links:
Best Regards,
Mihaela
Thank you for reporting this problem. We will include a fix in the next release.
Meanwhile, follow these steps to activate the links:
- open the following file (you must have admin role to do it):
{OxygenInstallDir}/frameworks/dita/DITA-OT2.x/plugins/com.oxygenxml.pdf.css/xsl/post-process.xsl
and add the following line after the last xsl:include:Code: Select all
<xsl:include href="post-process-links.xsl"/>
- In the same folder, create the file post-process-links.xsl, with the following content:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<!--
The merged DITA map file may contain cross references to elements from a topic. In this case, the reference looks like:
<xref class="- topic/xref "
href="#unique_3/unique_3_Connect_42_my_table_id"
ohref="topics/care.dita#care/my_table_id"/>
Where the "ohref" is the original value from the DITA source, and the "href" is generated by the merging process.
The value of the href cannot be used by the XML+CSS to PDF processor, because it is not a valid IDREF (contains a / )
so wee need to remove the part before the slash.
-->
<xsl:template match="@href[starts-with( ., '#') and contains(., '/')]">
<xsl:attribute name="href" select="concat('#',substring-after(., '/'))"/>
</xsl:template>
</xsl:stylesheet>
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Wed Nov 09, 2016 11:52 pm
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)
- ↳ 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