DITA and XMetaL Discussion
carmstrong December 8, 2010 at 9:14 pm
Excluding page numbers in cross-referencesDecember 8, 2010 at 9:14 pmParticipants 3Replies 4Last Activity 11 years, 9 months ago
In XMetaL 5.5 SP1 is there a way to exclude the page number when inserting a cross-reference to a topic? For example, I've created a revision history table as an appendix. The table references each chapter in the document and the changes made, if any. While page numbers are necessary when cross-references are used within the document, they are not necessary in the revision history table.
I've attached an example table for your reference. Any information you can provide would be helpful. Thanks.gcrews December 8, 2010 at 9:42 pm
Reply to: Excluding page numbers in cross-referencesDecember 8, 2010 at 9:42 pm
You might want to take a look at the insertPageNumberCitation xsl template in links.xsl in xmfo ( assuming your using renderX). You can eather change/override that template or take out the calls to it. If you haven’t worked with customizing the toolkit files before, you might want to read though the Appendix D of the user guide to know what files to edit.Derek Read December 8, 2010 at 10:07 pm
Reply to: Excluding page numbers in cross-referencesDecember 8, 2010 at 10:07 pm
The file you need to modify will also depend on which 'deliverable' you are using to generate your PDF (there are three different ones).
If you are using “XMetaL Enhanced PDF via RenderX XEP” then the existing section in links.xsl looks like this:
At minimum you would need additional conditional logic in there to check to see if the link is inside a table. However, you might have links inside tables elsewhere, so if you don't want to suppress page numbers for links in all tables you might need to add something to your XML to identify this table as being special, perhaps using the outputclass attribute for example:
. Or you could key off of something else. Maybe you never want links inside tables inside an 'appendix' to have page numbers. For bookmaps you might be able to check if the table is in an appendix. For regular maps you might try to just check to see if the topic title contains the text “appendix”.
The the outputclass type of solution the conditional logic inside the XSLT template might have this kind of logic:
xsl:when has ancestor “table” and “table” has @outputclass = “docUpdateTable” do not include page number
xsl:otherwise include page number (ie: existing behavior)Derek Read December 8, 2010 at 11:39 pm
Reply to: Excluding page numbers in cross-referencesDecember 8, 2010 at 11:39 pm
Here's the section I quoted in my previous message modified to exclude the page number for any xref that appears in any table, with the blue part being new code:
Here's the same section again but this time modified to exclude the page number for any xref that appears in tables with @outputclass=”docUpdateTable”, with the blue part being the new code:
These have been tested with the links.xsl file that is used by the “XMetaL Enhanced PDF via RenderX” deliverable. I think the file for “Book via RenderX” is the same or similar.
- You must be logged in to reply to this topic.