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: Re: [docbook-apps] XInclude problems after upgrading docbooc-xsl


When you set use.local.olink.style, it forms the link text from the <ttl> 
element and the @number attribute in the olink database.  But currently it 
uses the gentext template in the context with name="xref" instead of 
name="xref-number-and-title".  In the "xref" context, it uses just the 
title, which uses the <ttl> element.  In the "xref-number-and-title" 
context, it uses both number and title.  Not selecting the right context in 
this situation is a deficiency of the stylesheets, I would say.

One solution is to customize your gentext and copy the gentext template from 
the "xref-number-and-title" context to the "xref" context for chapter (and 
other numbered elements), something like this:

<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">
     <l:template name="chapter" text="Chapter&#160;%n, %t"/>
     <!-- add other numbered elements here -->
   </l:context>
  </l:l10n>
</l:i18n>

You could also file a bug report on the DocBook SourceForge site about how 
use.local.olink.style is not using the proper gentext context when 
referencing numbered elements.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Gerd v. Egidy" <lists@egidy.de>
To: <docbook-apps@lists.oasis-open.org>
Cc: "Bob Stayton" <bobs@sagehill.net>
Sent: Monday, July 14, 2008 3:15 AM
Subject: Re: [docbook-apps] XInclude problems after upgrading docbooc-xsl


> Hi Bob,
>
>> The links are correct now, the generated text is not. I used a completely
>> customized template for generating the text and that code only works for
>> html - I have to dig into this and rework it for fo. I hope I'll have 
>> this
>> working again by the end of this week.
>
> I still can't get it to work as I want, so would you mind to help me 
> again:
>
> I want my external olinks to have a text generated like this:
>
> My Manual, Chaper 13, "Don't do stupid stuff"
>
> Putting the docname in front was easy, I copied the whole
>
> <xsl:template match="d:olink" name="olink">
>
> section from xref.xsl and turned the order of the copy-of. But the output 
> I
> get is
>
> My Manual, Don't do stupid stuff
>
> So the section-type ("Chapter"), section number ("13") and the quotes are
> missing. But olinks within the same document get this text (but without 
> the
> document title, which is ok for local links). When I look into the 
> generated
> olink-database I see two types of data generated for each section: ttl and
> xreftext. I guess that for internal links the xreftext is used while ttl 
> is
> used for olinks. How can I change that?
>
> Kind regards,
>
> Gerd
> -- 
> Address (better: trap) for people I really don't want to get mail from:
> james@cactusamerica.com
>
> ---------------------------------------------------------------------
> 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]