DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Cross references without page number after the link?

  • jepry

    Cross references without page number after the link?

    Participants 2
    Replies 3
    Last 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 engine

    Reply

    Derek Read

    Reply to: Cross references without page number after the link?

    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.

    Reply

    jepry

    Reply to: Cross references without page number after the link?

    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,

    Reply

    jepry

    Reply to: Cross references without page number after the link?

    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.

    Thanks again.

    Reply

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

Lost Your Password?

Products
Downloads
Support