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] How to depend on language?


Hi,

I put the language handling now into my customization
layer like the example below shows:

<xsl:param name="book.language">
  <xsl:value-of select="book/@lang"/>
</xsl:param>

<xsl:param name="copyright.note">
  <xsl:value-of
select="book/bookinfo/copyright/holder"/>
</xsl:param>

...

<xsl:variable name="footercandidate">  
  ...

  <xsl:when test="$position = 'center'">
    <fo:block font-family="{$title.page.font.family}"
font-size="3">
      <xsl:choose>
        <xsl:when test="$book.language = 'de'">
          <xsl:value-of select="$copyright.note"/>  
        </xsl:when>
        <xsl:when test="$book.language = 'en'">
          <xsl:value-of select="$copyright.note"/>  
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>All rights reserved.</xsl:text>  
        </xsl:otherwise>
      </xsl:choose>
    </fo:block>
  </xsl:when>		

This approach works fine. 

Now I still don't see that my previous approach made
any sense. What value do I have when I keep different
languages in one DocBook XML?

Regards,
Darya

--- Chris Chiasson <chris@chiasson.name> schrieb:

> Both the xml file and the xsl layer should have
> sections that deal
> with both languages - languages are just a special
> profiling case.
> There should be no need for multiple xml source
> files unless you have
> a large document.
> 
> I don't why your legal statement is coming out
> wrong, though.
> 
> On 9/25/06, Darya Said-Akbari
> <darya_akbari@yahoo.com> wrote:
> > I think I'm completely wrong to include the
> language
> > dependency into my DocBook XML as shown in
> previous
> > example.
> >
> > Either I have a german (de) or an english (en)
> DocBook
> > XML. Why should I mix a DocBook XML with multiple
> > languages at all?
> >
> > Hence I don't really understand what profile.lang
> is
> > really for?
> >
> > Isn't it better to do the language handling in the
> > customization layer?
> >
> > Regards,
> > Darya
> >
> > --- Darya Said-Akbari <darya_akbari@yahoo.com>
> > schrieb:
> >
> > > Hi,
> > >
> > > processing the profiled version of my
> customization
> > > layer works partly, but I am not able to
> retrieve a
> > > copyright remark based on language. The
> resulting FO
> > > file does not contain the <remark> entry in its
> > > footer
> > > section.
> > >
> > > See the XML snippet below from my DocBook XML
> and
> > > Customization Layer XSL.
> > >
> > > DocBook XML:
> > >
> > > <book lang="de">
> > >   <bookinfo>
> > >     <copyright>
> > >       <year>2006</year>
> > >       <holder>
> > >         <remark lang="en">All rights
> > > reserved.</remark>
> > >         <remark lang="de">Alle Rechte
> > > vorbehalten.</remark>
> > >       </holder>
> > >     </copyright>
> > >
> > >    ...
> > >
> > > Customization Layer XSL:
> > >
> > > <xsl:variable name="footercandidate">
> > >   <!-- sequence can be odd, even, first, blank
> -->
> > >   <!-- position can be left, center, right -->
> > >   <xsl:choose>
> > >     ...
> > >     <xsl:when test="$position = 'center'">
> > >       <fo:block
> > > font-family="{$title.page.font.family}"
> > > font-size="3">
> > >         <xsl:value-of
> > > select="book/bookinfo/copyright/holder/remark"/>
> > >       </fo:block>
> > >     </xsl:when>
> > >     ...
> > >
> > > Any hints?
> > >
> > > Regards,
> > > Darya
> > >
> > >
> > > --- Jirka Kosek <jirka@kosek.cz> schrieb:
> > >
> > > > Darya Said-Akbari wrote:
> > > >
> > > > > And then with <book lang="de"> let DocBook
> XSL
> > > do
> > > > the
> > > > > rest?
> > > > >
> > > > > Actually I tried this and it doesn't work :(
> > > >
> > > > Lang attribute just sets language used for
> content
> > > > of particular
> > > > element. If you want to filter out elements
> that
> > > are
> > > > not in particular
> > > > language you must use profiling. There is
> > > parameter
> > > > profile.lang which
> > > > can be used to select language which should be
> > > > retained in the output.
> > > > To use profiling, you must use stylesheets
> named
> > > > profile-docbook.xsl
> > > > instead of docbook.xsl.
> > > >
> > > > --
> > > >
> > >
> >
>
------------------------------------------------------------------
> > > >    Jirka Kosek     e-mail: jirka@kosek.cz
> > > > http://www.kosek.cz
> > > >
> > >
> >
>
------------------------------------------------------------------
> > > >    Profesionální ±kolení a poradenství v
> oblasti
> > > > technologií XML.
> > > >       Podívejte se na ná± nově spu±těný web
> > > > http://DocBook.cz
> > > >         Podrobný přehled ±kolení
> > > > http://xmlguru.cz/skoleni/
> > > >
> > >
> >
>
------------------------------------------------------------------
> > > >                     Nejbliµ±í termíny ±kolení:
> > > >      ** XSLT 23.-26.10.2006 ** XML schémata
> > > > 13.-15.11.2006 **
> > > >       ** DocBook 11.-13.12.2006 ** XSL-FO
> > > > 11.-12.12.2006 **
> > > >
> > >
> >
>
------------------------------------------------------------------
> > > >    http://xmlguru.cz    Blog mostly about XML
> for
> > > > English readers
> > > >
> > >
> >
>
------------------------------------------------------------------
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
___________________________________________________________
> > >
> > > Der frühe Vogel fängt den Wurm. Hier gelangen
> Sie
> > > zum neuen Yahoo! Mail: http://mail.yahoo.de
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > docbook-apps-unsubscribe@lists.oasis-open.org
> > > For additional commands, e-mail:
> > > docbook-apps-help@lists.oasis-open.org
> > >
> > >
> >
> >
> >
> >
> >
>
___________________________________________________________
> > Telefonate ohne weitere Kosten vom PC zum PC:
> http://messenger.yahoo.de
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> docbook-apps-unsubscribe@lists.oasis-open.org
> > For additional commands, e-mail:
> docbook-apps-help@lists.oasis-open.org
> 
=== message truncated ===



	

	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


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