DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › TOPLEAF: Adding reltable linking to topics?
-
Nick V September 2, 2011 at 2:02 pm
TOPLEAF: Adding reltable linking to topics?
September 2, 2011 at 2:02 pmParticipants 5Replies 6Last Activity 11 years, 5 months agoIn 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 tag in a manner similar to the
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 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?
gjn2066 September 6, 2011 at 10:02 am
Reply to: TOPLEAF: Adding reltable linking to topics?
September 6, 2011 at 10:02 amAre 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 [email protected]. If not, then let me know that and I'll run some prelim tests here.
Nick V September 12, 2011 at 3:01 pm
Reply to: TOPLEAF: Adding reltable linking to topics?
September 12, 2011 at 3:01 pmSent. Oddly enough, the preview pane in the GUI doesn't reflect the output as it ends up when created through the XMetaL plugin.
gjn2066 September 19, 2011 at 2:17 am
Reply to: TOPLEAF: Adding reltable linking to topics?
September 19, 2011 at 2:17 amAre 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:
copy="{@ref}"/> The copy attribute implies copy the [u]named[/u] 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 [u]name[/u] 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:
Without the curlies the argument will be set to the value of {@ref} as required.Alternatively you can say:
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.
gjn2066 September 28, 2011 at 5:31 am
Reply to: TOPLEAF: Adding reltable linking to topics?
September 28, 2011 at 5:31 amI'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.
Nick V October 25, 2011 at 2:30 pm
Reply to: TOPLEAF: Adding reltable linking to topics?
October 25, 2011 at 2:30 pmgjn,
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.
gjn2066 October 30, 2011 at 10:26 pm
Reply to: TOPLEAF: Adding reltable linking to topics?
October 30, 2011 at 10:26 pmSo 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.
-
AuthorPosts
- You must be logged in to reply to this topic.