[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] olink styling
Let's see, you wanted xrefs to sections to have page refs, but not xrefs to other elements, right? As you found, putting the "on page %p" in the gentext template for section also gets it into olinks. Instead, I would recommend that you remove the page reference from the gentext template, and handle the xrefs with a customization. If you look in fo/xref.xsl, you will find that in the match="xref" template: <xsl:apply-templates select="$target" mode="page.citation"> By default, there is one match="*" template in that mode, and it generates the page ref using the 'page.citation' gentext. But since this is a mode, you can add empty templates for other target elements to turn off the page ref for just those elements: <xsl:apply-templates select="chapter|appendix" mode="page.citation"/> Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Andreas Lalloo" <andreas.lalloo@appmind.com> To: <docbook-apps@lists.oasis-open.org> Sent: Tuesday, June 28, 2005 5:48 AM Subject: RE: [docbook-apps] olink styling Excellent, thank you Bob! I've checked in rev 1.5 of common/olink.xsl to our local CVS repo until the next release is out. Works like a charm. Regarding my other problem (that olinks to sections in other documents gets an "on page" suffix), i've understood as much as the modification affects my olink .db database - the xreftext entry in that file looks something like <xreftext>Section "<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-style="italic">AppMind MX(tm) Management Information Repository</fo:inline>" on page <fo:page-number-citation xmlns:fo="http://www.w3.org/1999/XSL/Format" ref-id="seref_ug_mib_architecture"/></xreftext> So I guess my approach of modifying the gentext for sections is not the way to go: <l:context name="xref"> <!-- Express section references (gentext) as Section "blahblah" --> <l:template name="section" text="Section "%t" on page %p"/> </l:context> One thought then is to use some kind of profiling which disables the gentext modification for the collect.xref.targets pass through the documents, phew. Any better ideas, anyone? Does more people have the same problem in this case, too? Best regards Andreas > -----Original Message----- > From: Bob Stayton [mailto:bobs@sagehill.net] > Sent: den 28 juni 2005 06:13 > To: Andreas Lalloo; docbook-apps@lists.oasis-open.org > Cc: tim@enigmatec.net > Subject: Re: [docbook-apps] olink styling > > Hi Andreas, > You are not alone. This issue came up in April with someone > trying to do > the same thing. The conclusion was that there should be a > special case for > olinks pointing to the root element of a document, so that it > does *not* > output the docname which repeats the olink title text. I > recently checked > into CVS a fix for this problem (in common/olink.xsl). It > will be in the > next release, which should be coming out soon. > > In the meantime, you can use an undocumented feature. There is a > "nodocname" key word that you can use in the "select:" > xrefstyle. It has > the effect of turning off the docname that would normally > appear. So try > this: > > <olink xrefstyle="select: title nodocname" ... > > This will be documented in the next edition of my book. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]