Incorrect link text in DITA PDF2 transform
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Mon Nov 24, 2008 7:05 pm
Incorrect link text in DITA PDF2 transform
I'm creating a PDF document from a ditamap using the PDF2 transform. In my document, I have internal/dita links of the form <xref href="...">this is a link</xref>. When I transform to HTML or PDF, the body of the xref tag is preserved as the link text. However, when I do a PDF2 transform, the title of the topic pointed to by the href attribute becomes the link text. Is there someway using the PDF2 transform to preserve the original link text?
Thanks
Andrew
Thanks
Andrew
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Incorrect link text in DITA PDF2 transform
Hi Andrew,
You should try setting a format attribute to the xref like:
Regards,
Radu
You should try setting a format attribute to the xref like:
Code: Select all
<xref href="garagetaskoverview.xml#taskconcept"
format="dita">
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 6
- Joined: Mon Nov 24, 2008 7:05 pm
Re: Incorrect link text in DITA PDF2 transform
Thanks for the reply, Radu. However, that does not seem to work.
Here's the xref:
...
<li>
<xref href="test.xml#123" format="dita">
Text1
</xref>
</li>
...
Here's the task it's linking to:
...
<task id="123">
<title>Text2<title>
...
The link text is changed from Text1 to Text2. If I change the "123" to something that doesn't exist (say, "456"), the link has the correct text but the link isn't active (since it points to something that doesn't exist).
Am I missing something? I was wondering if this was a bug in a PDF stylesheet since the links are created correctly for XHTML output.
Thanks again!
Andrew
Here's the xref:
...
<li>
<xref href="test.xml#123" format="dita">
Text1
</xref>
</li>
...
Here's the task it's linking to:
...
<task id="123">
<title>Text2<title>
...
The link text is changed from Text1 to Text2. If I change the "123" to something that doesn't exist (say, "456"), the link has the correct text but the link isn't active (since it points to something that doesn't exist).
Am I missing something? I was wondering if this was a bug in a PDF stylesheet since the links are created correctly for XHTML output.
Thanks again!
Andrew
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Incorrect link text in DITA PDF2 transform
Hi Andrew,
There seem to be problems when referring an ID with a numeric value.
For example, if the task ID is "abc" everything seems OK.
Do you receive any linkage error in your console for the task with the ID "123"?
Something like:
Regards,
Radu
There seem to be problems when referring an ID with a numeric value.
For example, if the task ID is "abc" everything seems OK.
Do you receive any linkage error in your console for the task with the ID "123"?
Something like:
Code: Select all
Topic reference (href : #null) not found
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 6
- Joined: Mon Nov 24, 2008 7:05 pm
Re: Incorrect link text in DITA PDF2 transform
Thanks for your help. I did try non-numeric ids but I still have the problem when performing a PDF2 transform: the title of the referenced topic is used as the text of the link rather than the provided link text.
Thanks
Andrew
Thanks
Andrew
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Incorrect link text in DITA PDF2 transform
Hi Andrew,
In the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/links.xsl at line 177 you can replace the line:
with:
Regards,
Radu
In the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/links.xsl at line 177 you can replace the line:
Code: Select all
<xsl:variable name="element" select="key('key_anchor',$destination)[1]"/>
Code: Select all
<xsl:variable name="element" select="text()"/>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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