[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] olink styling
Yes, I had same problem. I think I use xrefstyle="select: docname" or I would if I was using docbook 4.3. As I'm using 4.2 I also have to set: <xsl:param name="use.role.as.xrefstyle" select="1"/> and then use the "role" attribute. Good to hear a fix is coming. Tim -----Original Message----- From: Bob Stayton [mailto:bobs@sagehill.net] Sent: 28 June 2005 05: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 ----- Original Message ----- From: "Andreas Lalloo" <andreas.lalloo@appmind.com> To: <docbook-apps@lists.oasis-open.org> Sent: Sunday, June 26, 2005 3:35 AM Subject: [docbook-apps] olink styling I would like to have two kind of olink styles in my PDF documentation, one as the default ('section'/'chapter' in 'document') and one which is only the document title for the cases I want to talk about the book in general, no specific section or chapter within, and avoid text like "...described in User's Guide in User's Guide". Following Bob Stayton's book I have managed to try all (?) permutations of xref/olink styling etc. but without accomplishing what I want. The following works, i.e. it replaces all gentext info to "override text" making my references look like "the Developer's Guide" override text tells more..." <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en"> <l:context name="xref"> <!-- Express section references (gentext) as Section "blahblah" --> <l:template name="section" text="Section "%t""/> <!-- My style--> <l:template name="olink.document.citation" text=" override text"/> </l:context> <l:context name="xref-number-and-title"> <!-- Express chapter references (gentext) as Chapter X, "blahblah" --> <l:template name="chapter" text="Chapter %n, "%t""/> </l:context> </l:l10n> </l:i18n> The idea is to later remove the " override text" with empty text, of course. OK, so now I want to only override _some_ of my olink references. I modify the template above to be in effect only for xrefstyle "my-style" like <l:template name="olink.document.citation" style="my-style" text=" override text"/> OK, no more override text in my ouptut, and all occurances are "..the Developers's Guide in Developer's Guide tells more..." as before. Then I ask one olink to use the modified style: <para><olink targetdoc="usersguide" xrefstyle="my-style"></olink></para> Then I get the following errors during generation, but the ouptut looks exactly like before adding xrefstyle: Making portrait pages on A4 paper (210mmx297mm) No template for "book" (or any of its leaves) exists in the context named "xref-number" in the "en" localization. No template for "book" (or any of its leaves) exists in the context named "xref-number" in the "en" localization. No template for "book" (or any of its leaves) exists in the context named "xref-number-and-title" in the "en" localization. No template for "book" (or any of its leaves) exists in the context named "xref-number-and-title" in the "en" localization. I have set <xsl:param name="olink.doctitle" select="'yes'"></xsl:param> Experimenting with the "maybe" variant mostly gives result that no output contains the " in %o" part, but in 95% of the cases I want that included. In short, I would like all olink references to behave in a special way without having to update all .xml source, and only pin-point some of them with a reference to preferably a template defined by myself or possibly some kind of explicit format (a là select:) but I fail. This is surely trivial to an expert, so I could really do with some assistance... My environment is DTD 4.4, xslt 1.68.1 (xsltproc-RenderX processing). Thanks /Andreas --------------------------------------------------------------------- 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]