docbook-apps

  • 1.  Issues regarding the customization of l10n

    Posted 09-30-2010 11:53
    Hi

    It seems the refactored localization support has broken the
    compatibility with the previous customization layer used for local
    definitions on l10n. Or, maybe, I just can't make it work.

    To be shortly, the 'local.l10n.xml' parameter has no effect. I copied
    and adapted the 'l10n.xml' and 'l10n.dtd' to my working directory, then
    the German 'de.xml' file where I modified the 'part' template from the
    'title' context. I have set the 'local.l10n.xml' parameter in a custom
    'l10n.xsl' file (located in the same directory) like

    <xsl:param name="local.l10n.xml" select="document('l10n.xml')"/>

    It has no effect. The 'part' template remained unchanged. I need to
    mention the l10n stuff worked properly before, using the old method.

    --
    Costin STROIE
    Informatics Consultant
    BitDefender
    ------------------------------
    Email: cstroie@bitdefender.com
    Phone: +40 212 063 470
    ------------------------------
    www.bitdefender.com



  • 2.  Re: [docbook-apps] Issues regarding the customization of l10n

    Posted 09-30-2010 20:34
    Costin Stroie wrote:

    > It seems the refactored localization support has broken the
    > compatibility with the previous customization layer used for local
    > definitions on l10n.

    It shouldn't.

    > To be shortly, the 'local.l10n.xml' parameter has no effect. I copied
    > and adapted the 'l10n.xml' and 'l10n.dtd' to my working directory, then
    > the German 'de.xml' file where I modified the 'part' template from the
    > 'title' context. I have set the 'local.l10n.xml' parameter in a custom
    > 'l10n.xsl' file (located in the same directory) like
    >
    > <xsl:param name="local.l10n.xml" select="document('l10n.xml')"/>

    This was never suggested way how to customize localization. You
    shouldn't copy existing localization, just override existing one as is
    described at:

    http://www.sagehill.net/docbookxsl/CustomGentext.html

    In short local.l10n.xml has to point to XML structure like:

    <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
    <l:l10n language="xxx">
    ... localization customizations go there ...
    </l:10n>
    </l:i18n>

    By copying current l10n.xml you have broken this expected structure as
    there are no directky nested localization customization instead only
    href attribute is pointing to localization data for one language. This
    allows lazy loading implementation. However this approach is used only
    for default localization data, all customization has to use same
    mechanism as before.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------




  • 3.  Re: [docbook-apps] Issues regarding the customization of l10n

    Posted 10-04-2010 13:11
    On Thu, 30 Sep 2010 22:33:33 +0200
    Jirka Kosek <jirka@kosek.cz> wrote:

    > This was never suggested way how to customize localization. You
    > shouldn't copy existing localization, just override existing one as is
    > described at:
    >
    > http://www.sagehill.net/docbookxsl/CustomGentext.html
    >
    > In short local.l10n.xml has to point to XML structure like:
    >
    > <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
    > <l:l10n language="xxx">
    > ... localization customizations go there ...
    > </l:10n>
    > </l:i18n>
    >
    > By copying current l10n.xml you have broken this expected structure as
    > there are no directky nested localization customization instead only
    > href attribute is pointing to localization data for one language. This
    > allows lazy loading implementation. However this approach is used only
    > for default localization data, all customization has to use same
    > mechanism as before.

    I see, there should be only one file to rule them all. But, I must
    confess, that modular structure, imitating the stock directories/files,
    was very appealing.

    --
    Costin STROIE
    Informatics Consultant
    BitDefender
    ------------------------------
    Email: cstroie@bitdefender.com
    Phone: +40 212 063 470
    ------------------------------
    www.bitdefender.com



  • 4.  Re: [docbook-apps] Issues regarding the customization of l10n

    Posted 10-05-2010 07:28
    Costin Stroie wrote:

    > I see, there should be only one file to rule them all. But, I must
    > confess, that modular structure, imitating the stock directories/files,
    > was very appealing.

    It would be very complex to handle this in XSLT 1.0.

    But you can use XInclude or entities to put localization customizations
    for each language into a separate file.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------