docbook-apps

  • 1.  RE: [docbook] including a customized en.xml file

    Posted 11-02-2007 18:54
    > -----Original Message-----
    > From: ettinger@gmail.com
    >
    > I'd like to keep the same file path hierarchy in my customization
    > layer, but I am getting an error when I try to include or import the
    > en.xml file locally. It works fine if I drop the markup directly in
    > custom.xsl


    [Moving this thread to the docbook-apps list, where stylesheet issues are
    discussed]


    You are not supposed to do <xsl:include> on en.xml (or a customized version
    of it). It is not a stylesheet module, so that won't work. You should just
    "drop the markup" into your customization layer, and you seem to have that
    working already.

    /MJ








  • 2.  Re: [docbook] including a customized en.xml file

    Posted 11-03-2007 07:54
    How is it included now? It isn't in docbook.xsl directly.

    I don't really want l10n living in my top-level customization layer,
    there must be a way somehow.



    On 11/2/07, Mauritz Jeanson <mj@johanneberg.com> wrote:
    > > -----Original Message-----
    > > From: ettinger@gmail.com
    > >
    > > I'd like to keep the same file path hierarchy in my customization
    > > layer, but I am getting an error when I try to include or import the
    > > en.xml file locally. It works fine if I drop the markup directly in
    > > custom.xsl
    >
    >
    > [Moving this thread to the docbook-apps list, where stylesheet issues are
    > discussed]
    >
    >
    > You are not supposed to do <xsl:include> on en.xml (or a customized version
    > of it). It is not a stylesheet module, so that won't work. You should just
    > "drop the markup" into your customization layer, and you seem to have that
    > working already.
    >
    > /MJ
    >
    >
    >
    >
    >
    >


    --
    Anthony Ettinger
    Ph: 408-656-2473
    var (bonita, farley) = new Dog;
    farley.barks("very loud");
    bonita.barks("at strangers");

    http://chovy.dyndns.org/resume/
    http://utuxia.com/consulting



  • 3.  RE: [docbook] including a customized en.xml file

    Posted 11-03-2007 10:21
    > -----Original Message-----
    > From: ettinger@gmail.com
    >
    > How is it included now? It isn't in docbook.xsl directly.
    >
    > I don't really want l10n living in my top-level customization layer,
    > there must be a way somehow.


    1. The standard en.xml is found via the l10n.xml parameter in
    common/l10n.xsl:

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

    The l10n.xml file collects all gentext strings for all supported languages.
    The lookup mechanism in l10n.xsl locates the strings for a particular
    language depending on the value of the lang (xml:lang in DocBook 5)
    attribute in the XML source ("en" is the default).

    2. Your own customized generated text is located by the local.l10n.xml
    parameter:

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

    The document() function with an empty argument means the stylesheet itself.
    So the stylesheet looks into itself to find the customized strings.

    3. If you want, you can put all customizations related to generated text in
    a separate file. Here is how:

    A. Put your gentext customizations in a file that is structured like this:

    <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
    <l:l10n language="en" english-language-name="English">


    <l:context name="xref-number-and-title">
    <l:template name="chapter" text="Chapter %n: “%t”"/>
    </l:context>

    </l:l10n>
    </l:i18n>

    B. Name this file local.en.xml (or whatever you want) and save it in the
    same directory as your already existing stylesheet customization.

    C. Modify local.l10n.xml in your stylesheet customization:

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

    /MJ





  • 4.  Re: [docbook] including a customized en.xml file

    Posted 11-05-2007 22:20
    Thanks, worked like a charm.

    On 11/3/07, Mauritz Jeanson <mj@johanneberg.com> wrote:
    > > -----Original Message-----
    > > From: ettinger@gmail.com
    > >
    > > How is it included now? It isn't in docbook.xsl directly.
    > >
    > > I don't really want l10n living in my top-level customization layer,
    > > there must be a way somehow.
    >
    >
    > 1. The standard en.xml is found via the l10n.xml parameter in
    > common/l10n.xsl:
    >
    > <xsl:param name="l10n.xml" select="document('../common/l10n.xml')"/>
    >
    > The l10n.xml file collects all gentext strings for all supported languages.
    > The lookup mechanism in l10n.xsl locates the strings for a particular
    > language depending on the value of the lang (xml:lang in DocBook 5)
    > attribute in the XML source ("en" is the default).
    >
    > 2. Your own customized generated text is located by the local.l10n.xml
    > parameter:
    >
    > <xsl:param name="local.l10n.xml" select="document('')"/>
    >
    > The document() function with an empty argument means the stylesheet itself.
    > So the stylesheet looks into itself to find the customized strings.
    >
    > 3. If you want, you can put all customizations related to generated text in
    > a separate file. Here is how:
    >
    > A. Put your gentext customizations in a file that is structured like this:
    >
    > <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
    > <l:l10n language="en" english-language-name="English">
    >
    >
    > <l:context name="xref-number-and-title">
    > <l:template name="chapter" text="Chapter %n: “%t”"/>
    > </l:context>
    >
    > </l:l10n>
    > </l:i18n>
    >
    > B. Name this file local.en.xml (or whatever you want) and save it in the
    > same directory as your already existing stylesheet customization.
    >
    > C. Modify local.l10n.xml in your stylesheet customization:
    >
    > <xsl:param name="local.l10n.xml" select="document('local.en.xml')"/>
    >
    > /MJ
    >
    >
    >


    --
    Anthony Ettinger
    Ph: 408-656-2473
    var (bonita, farley) = new Dog;
    farley.barks("very loud");
    bonita.barks("at strangers");

    http://chovy.dyndns.org/resume/
    http://utuxia.com/consulting