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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: DOCBOOK: Resend: A single multi-lingual documet -> multipletranslatedoutput files?


Taro Ikai wrote:

> The currently available transform processors for DocBook does not use
> DocBook's "lang" attribute the way I expected. I was hoping, that if I
> had:
> 
>         <para lang="en_na">
>                  Some English text.
>         </para>
>         <para lang="ja_ja">
>                 Japanese translation of the English text.
>         </para>
> 
> then, I would be able to pass the desired langauge as a parameter to
> the
> a transform processor, and get only the <para/> elements with the
> matching lang attribute value.

This is possible, the feature is called profiling. More info can be
found at

http://docbook.sourceforge.net/release/xsl/current/doc/tools/profiling.html

Basically if you use profiling able stylesheet (e.g. profile-chunk.xsl,
instead of chunk.xsl) you can pass parameter profile.lang with desired
language.

saxon document.xml /path/to/profile-chunk.xsl profile.lang=en
 
> The benefit of being able to do this, is that the consistency of the
> original
> and the translations can be checked very easily.

IMHO mixing translations in one file is not good practise. It is very
hard to edit them, especially if number of translations grew to more
than 2. You can use some auxiliary tools like diff and xmldiff to get
track changes in translations.
 
> Would the correct approach be to concoct my own DocBook derived schema
> 
> with tags to manage translations, and then write my own XSL (or other)
> transforms
> to produce a single langauge DocBook file?

This also possible by profiling. Look at the stylesheet
profile/profile.xsl in DocBook XSL distribution.

				Jirka

-- 
-----------------------------------------------------------------
  Jirka Kosek  	                     
  e-mail: jirka@kosek.cz
  http://www.kosek.cz


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


Powered by eList eXpress LLC