OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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&#160;&#x22;%t&#x22;"/>
	<!-- 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&#160;%n,&#160;&#x22;%t&#x22;"/>
      </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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]