This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Selecting User Defined Language tags for output in AutoTOC and AutoIndex


On Fri, Nov 07, 2003 at 02:21:40PM -0500, Mykone Saunders wrote:
> Hello I need some help customizing Docbook XSL AutoToC and AutoIndex
> feature.
> 
> I am writing a technical manual in english, french, and spanish.
> 
> I added elements to the DTD to translate any content areas see below.
> (Pardon my translation)
> 
> <translations>
> 
> 	<english>Hello World</english>
> 
> 	<spanish>Hola Globa</spanish>
> 
> 	<french>Halo Globé</french>
> 
> </translations>
> 
> 
> I then customize XSL as shown below.
> 
> 
> 	<xsl:param name="OutLang">es</xsl:param>
> 
> 	<xsl:template match="translations">
> 
> 		<xsl:if test="$OutLang = 'es'">
> 
> 			<xsl:value-of select="spanish"/>
> 
> 		</xsl:if>
> 
> 		<xsl:if test="$OutLang = 'en'">
> 
> 			<xsl:value-of select="english"/>
> 
> 		</xsl:if>
> 
> 		<xsl:if test="$OutLang = 'fr'">
> 
> 			<xsl:value-of select="french"/>
> 
> 		</xsl:if>
> 
> 	</xsl:template>
> 
> The output works for anywhere in the document body except for Auto TOC. I
> haven't tried the AutoIndex as yet. I'm quite sure it would be same problem.
> 
> Can you tell me if it's possible to add a customization layer to switch
> between the above languages in the AutoTOC and AutoIndex sections?

Could you provide some more details of how you integrated
the translation element into the DTD, how you are using
the translations element in your document, and what the
autotoc output looks like?

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]