|
Nick V
Member
Posts: 7
|
 |
« on: September 02, 2011, 08:02:05 AM » |
|
In the custom stylesheet that we've created based off of the DITAmap styling, we have enabled the display of reltable links. However, they do not actually link to the associated topics within the PDF.
Processing the <link/> tag in a manner similar to the <xref/> tag results in a link that points to the relative location of the source file, rather than the topic ID in the document. Since the target topic ID attribute does not appear in the reltable <link/> tag itself, I'm unsure how to get that information to create a proper link.
In short, we're getting this:
<%Xref href="C:/foo/build/temp/src/cifd_introduction_to_stuff.xml#../src/cifd_about_stuff.xml">
Rather than this:
<%Xref href="C:/foo/build/temp/src/cifd_introduction_to_stuff.xml#concept_ED8F4673AEEF480A9564C23B960AF7F1">
I'm aware that TopLeaf inserts a custom <%LinkTarget> tag for each topic, but after looking through the User Guide, Mapping Guide, and Cookbook, I'm still not sure how to leverage this. Any pointers on how to correctly create the links?
|
|
|
|
|
Logged
|
|
|
|
gjn2066
Member
Posts: 47
|
 |
« Reply #1 on: September 06, 2011, 04:02:24 AM » |
|
Are you able to run your document directly via the TopLeaf GUI? If so can you run it with debug set to on and send the logfile to gjn2066@gmail.com. If not, then let me know that and I'll run some prelim tests here.
|
|
|
|
|
Logged
|
|
|
|
|
Nick V
Member
Posts: 7
|
 |
« Reply #2 on: September 12, 2011, 09:01:00 AM » |
|
Sent. Oddly enough, the preview pane in the GUI doesn't reflect the output as it ends up when created through the XMetaL plugin.
|
|
|
|
|
Logged
|
|
|
|
gjn2066
Member
Posts: 47
|
 |
« Reply #3 on: September 18, 2011, 08:17:56 PM » |
|
Are you using the GUI on the original source, or after the DITA OT transform. The latter is the one you want.
Note: you are calling a Perl extension with an argument: <perl-arg copy="{@ref}"/>
The copy attribute implies copy the named TopLeaf variable. In this case the ref attribute in the source contains a PATH#ID string. I'm assuming you want Perl to see this string.
But what is happening is that this string is being used as the name of a TopLeaf variable {PATH#ID}. Since no such variable exists, Perl is receiving a null argument here.
What you need to say (I believe) is: <perl-arg copy="@ref"/> Without the curlies the argument will be set to the value of {@ref} as required.
Alternatively you can say: <perl-arg string="{@ref}"/> which interprets the {@ref} as a literal string, rather than a variable name.
This is a common issue which I get trapped by myself on occasion. I think we need to emit a proper error message if the copy value doesn't equate to a properly set variable name, rather than just quietly pass a null argument. Watch this space.
|
|
|
|
« Last Edit: September 18, 2011, 08:48:18 PM by gjn2066 »
|
Logged
|
|
|
|
gjn2066
Member
Posts: 47
|
 |
« Reply #4 on: September 27, 2011, 11:31:24 PM » |
|
I've been looking further into this issue and I may be barking up the wrong tree here. While the advice I gave in my previous response remains generally valid, in your particular case the apparent copy of a variable value (rather than name) may be a false positive due to a logging issue currently being investigated.
I am shortly posting an upgraded set of pre-built Perl functions which can be used to simplify link handling, so I'll have another look at what you sent and respond accordingly.
Watch this space.
|
|
|
|
|
Logged
|
|
|
|
|
Nick V
Member
Posts: 7
|
 |
« Reply #5 on: October 25, 2011, 08:30:21 AM » |
|
gjn,
I appreciate the effort. I've had my head down in other stylesheet work in the meantime, but I'm going to take another poke at this.
|
|
|
|
|
Logged
|
|
|
|
gjn2066
Member
Posts: 47
|
 |
« Reply #6 on: October 30, 2011, 04:26:15 PM » |
|
So sorry for the delay but we have been working on launching a major new TopLeaf release. I'll have another look at what you sent, since this should just work with no problems and I want to see what's causing the difficulty in your case.
|
|
|
|
|
Logged
|
|
|
|
|