Page 1 of 1
Docbook to PDF - no links generated
Posted: Wed Nov 11, 2009 10:47 pm
by pwatt
Hi,
I've just started using Oxygen. I'm working in the XML Editor 11.0 and used Oxygen template to create a DocBook5 project.
I put in an xlink to another part of the same file like this:
<link xlink:href="#WhatIsOnyx">What is Onyx?</link>
The target looks like this:
<title xml:id="WhatIsOnyx">What is Onyx?</title>
When I run Oxygen's PDF transformation scenario on my file, the PDF that is generated doesn't contain a link.
Thanks for any help.
Tricia
Re: Docbook to PDF - no links generated
Posted: Thu Nov 12, 2009 1:18 pm
by sorin_ristache
Hello,
If you have a link to an ID of the same file you should use the linkend attribute:
Code: Select all
<link linkend="WhatIsOnyx">What is Onyx?</link>
The xlink:href attribute is used for a link to a URI, for example:
Code: Select all
<link xlink:href="http://foo.bar.com/onyx.html">What is Onyx?</link>
Regards,
Sorin
Re: Docbook to PDF - no links generated
Posted: Fri Nov 13, 2009 8:20 pm
by pwatt
Thanks for your answer to my first question. As you suggested, I defined the link this way in the xml:
<xref linkend="WhatIsOnyx"/>
I used Oxygen's standard PDF transformation scenario, the above cross-reference ends up looking like this in the PDF:
the section called “What is Onyx?” [1]
I replaced the xref element with a link element and was able to control the hot text in the link in the PDF. Now there's a link but no formatting indicates it. My questions: How do I control the text that is automatically generated for an xref? How do I control the formatting of any link in a PDF?
I have tried editing a few parameters using Oxygen's tranformation scenario dialog and see that I can occasionally have an effect on the PDF in that way. I also looked into the myriad xsl files in docbook/xsl/fo.
But could you please give me a clue as to where (which xslt file) and how (where do I set actual values) I should make changes to format my PDF output?
Could you also please suggest a good beginner's reference (website or book) for formatting XML-->XSLT?
Thanks
Patricia
Re: Docbook to PDF - no links generated
Posted: Mon Nov 16, 2009 11:27 am
by sorin_ristache
Hello,
pwatt wrote:My questions: How do I control the text that is automatically generated for an xref? How do I control the formatting of any link in a PDF?
You control the text that is generated for an xref using the
xreflabel attribute. You cannot control the formatting of a link in PDF output with an XSLT parameter of the DocBook stylesheets. You have to
create a custom layer for the DocBook stylesheet for FO output, that is [Oxygen-folder]/frameworks/docbook/xsl/fo/docbook.xsl.
pwatt wrote:Could you also please suggest a good beginner's reference (website or book) for formatting XML-->XSLT?
You can look at
this tutorial and
this tutorial.
Regards,
Sorin