DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion TOPLEAF: Adding reltable linking to topics?

  • Nick V

    TOPLEAF: Adding reltable linking to topics?

    Participants 5
    Replies 6
    Last Activity 11 years ago

    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 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?

    Reply

    gjn2066

    Reply to: TOPLEAF: Adding reltable linking to topics?

    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 [email protected]. If not, then let me know that and I'll run some prelim tests here.

    Reply

    Nick V

    Reply to: TOPLEAF: Adding reltable linking to topics?

    Sent. Oddly enough, the preview pane in the GUI doesn't reflect the output as it ends up when created through the XMetaL plugin.

    Reply

    gjn2066

    Reply to: TOPLEAF: Adding reltable linking to topics?

    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:
      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.

    Reply

    gjn2066

    Reply to: TOPLEAF: Adding reltable linking to topics?

    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.

    Reply

    Nick V

    Reply to: TOPLEAF: Adding reltable linking to topics?

    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.

    Reply

    gjn2066

    Reply to: TOPLEAF: Adding reltable linking to topics?

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support