DITA and XMetaL Discussion
jepry April 29, 2011 at 11:12 pm
Cross references without page number after the link?April 29, 2011 at 11:12 pmParticipants 2Replies 3Last Activity 11 years, 5 months ago
I see an older topic here that's somewhat related but not exactly:
Does anyone know if there is any way to omit page numbers in cross references, on a per-cross-reference basis, using attributes for example?
I can create an xref link using any text I want but it always adds “on page XX” afterwards in the PDF output– which I want to keep in most cases but wondering if it can be suppressed on a case-by-case basis by adding something to the reference, not by changing the xsl that controls the behavior all around. It's possible that it can't be done but just wondering. Related links won't work, this would be something to insert anywhere, just without the page reference.
Using XMetal 6.0 and XRender XEP engineDerek Read April 29, 2011 at 11:37 pm
Reply to: Cross references without page number after the link?April 29, 2011 at 11:37 pm
The only thing I can think of would require making a change to both the source DITA file and the XSLT.
DITA includes an attribute for most elements called outputclass that is designed to be used for special purposes like this. You could make up some value (perhaps something like “noPageNumberInPDF”) that you would then need to add special code for into the XSLT that would be triggered by that value.jepry April 30, 2011 at 12:46 am
Reply to: Cross references without page number after the link?April 30, 2011 at 12:46 am
That's good to hear because I had just zeroed in on outputclass in the crossref attributes, thinking it might be the way to do it, this encourages me to continue down that road.
Now I have a bit of a learning curve about the xsl code, insertPageNumberCitation being the relevant part, I know so far, now to figure out what to write to exclude it for a class and where to put it all.
Thanks for the help,jepry May 1, 2011 at 1:39 am
Reply to: Cross references without page number after the link?May 1, 2011 at 1:39 am
I was successful at getting this modification to work, for what it's worth. Borrowing/inspired by your code in a somewhat related topic here: topic=1127.msg3605
I modified the code, and then inserted it into my links.xsl file as follows, adding the part shown here in bold:
Then in XMetal I just typed “noPageCitation” into the outputclass attribute field of my link, and bingo. No more “on Page XX” after any link that I mark with that outputclass.
I also went through everything it takes to omit page citations from links entirely, before I figured the above out.
If that might be interesting for anyone, that amounted to, in a condensed description:
-Deleting the section in the template above starting with
-Adding the entire modified “insertPageNumberCitation” template to the custom.xsl file (actually creating an xm file containing the template code then referencing it in the custom.xsl file)
-Making sure the appropriate line was un-commented in the catalog.xml file,
— and that was it.
With that modification, no links at all had “on page XX” after them. However the more selective toggling of it is the one I really wanted, so I'm thrilled that the above works.
- You must be logged in to reply to this topic.