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


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: Resend: A single multi-lingual documet -> multipletranslatedoutput files?


On Mon, Sep 16, 2002 at 07:14:55PM +0200, Jirka Kosek wrote:
> 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. 

Also, some elements like 'title' cannot be repeated
for multiple languages.  For example, this structure
violates the DTD:

<chapter>
  <title lang="en_na">My English Title</title>
  <title lang="ja_ja">Japanese title</title>
  ...
</chapter>

Instead, this has to be encoded as:

<chapter>
  <title><phrase lang="en_na">My English Title</phrase><phrase lang="ja_ja">Japanese title</phrase></title>
  ...
</chapter>

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


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