docbook-apps

  • 1.  merging secondary index terms

    Posted 10-09-2018 13:39
    hi,
    I create a subject index for my docbook documents but I'm getting multiple
    entries for primary/secondary terms when I should be getting a single
    primary with multiple secondaries.

    Just wondered if others have conquered a similar problem that I can learn
    from.
    Currently using Python and lxml to merge them, but it's kind of messy.

    thanks,
    --Tim
    Here's pseudo-output of the situation:
    ------------
    term
    subterm1
    term
    subterm2
    -----------------

    when I want
    -----------
    term
    subterm1
    subterm2
    --------------



  • 2.  Re: [docbook-apps] merging secondary index terms

    Posted 10-09-2018 13:46
    Hi Tim,

    you are sure that the primary subjects are really the same, if not I get
    double primary terms, too. Maybe you could show an example"

    Regards

    Bernhard


    Am 09.10.2018 um 15:39 schrieb Tim Arnold:
    > hi,
    > I create a subject index for my docbook documents but I'm getting
    > multiple entries for primary/secondary terms when I should be getting
    > a single primary with multiple secondaries.
    >
    > Just wondered if others have conquered a similar problem that I can
    > learn from.
    > Currently using Python and lxml to merge them, but it's kind of messy.
    >
    > thanks,
    > --Tim
    > Here's pseudo-output of the situation:
    > ------------
    > term
    >    subterm1
    > term 
    >   subterm2
    > -----------------
    >
    > when I want
    > -----------
    > term
    >   subterm1
    >   subterm2
    > --------------
    >
    >

    --
    spitzhalde9
    D-79853 lenzkirch
    bernhard.kleine@gmx.net
    www.b-kleine.com, www.urseetal.net
    -
    thunderbird mit enigmail
    GPG schlüssel: D5257409
    fingerprint:
    08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09





  • 3.  Re: [docbook-apps] merging secondary index terms

    Posted 10-09-2018 16:19
    Thanks Bernhard,
    The code is a few hundred lines but your response made me realize the
    problem is in my code.

    The primaries are identical, but this is my own cadging of xslt which is
    the issue.
    For now I'll stick with Python since even if messy, I can understand it
    better.
    thanks,
    --Tim


    On Tue, Oct 9, 2018 at 9:45 AM Bernhard Kleine <bernhard.kleine@gmx.net>
    wrote:

    > Hi Tim,
    >
    > you are sure that the primary subjects are really the same, if not I get
    > double primary terms, too. Maybe you could show an example"
    >
    > Regards
    >
    > Bernhard
    >
    >
    > Am 09.10.2018 um 15:39 schrieb Tim Arnold:
    > > hi,
    > > I create a subject index for my docbook documents but I'm getting
    > > multiple entries for primary/secondary terms when I should be getting
    > > a single primary with multiple secondaries.
    > >
    > > Just wondered if others have conquered a similar problem that I can
    > > learn from.
    > > Currently using Python and lxml to merge them, but it's kind of messy.
    > >
    > > thanks,
    > > --Tim
    > > Here's pseudo-output of the situation:
    > > ------------
    > > term
    > > subterm1
    > > term
    > > subterm2
    > > -----------------
    > >
    > > when I want
    > > -----------
    > > term
    > > subterm1
    > > subterm2
    > > --------------
    > >
    > >
    >
    > --
    > spitzhalde9
    > D-79853 lenzkirch
    > bernhard.kleine@gmx.net
    > www.b-kleine.com, www.urseetal.net
    > -
    > thunderbird mit enigmail
    > GPG schlüssel: D5257409
    > fingerprint:
    > 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
    >
    >
    >



  • 4.  Re: [docbook-apps] merging secondary index terms

    Posted 10-09-2018 16:45
    I never had problems usind
    <indexterm><primary>someterm</primary><secondary>otherterm</secondary></indexterm>.
    It works in docbook out of the box. Nothing to adjust with xsl. The only
    thing control is that the terms are really identical: some formatting
    like <emphasis>, <foreignphrase>, use of abbreviated terms make indexing
    very time consuming. For my book of ~700 pages it took more than a month
    till everything was correct.

    Bernhard


    Am 09.10.2018 um 18:18 schrieb Tim Arnold:
    > Thanks Bernhard, 
    > The code is a few hundred lines but your response made me realize the
    > problem is in my code.
    >
    > The primaries are identical, but this is my own cadging of xslt which
    > is the issue.
    > For now I'll stick  with Python since even if messy, I can understand
    > it better.
    > thanks,
    > --Tim
    >
    >
    > On Tue, Oct 9, 2018 at 9:45 AM Bernhard Kleine
    > <bernhard.kleine@gmx.net <mailto:bernhard.kleine@gmx.net>> wrote:
    >
    > Hi Tim,
    >
    > you are sure that the primary subjects are really the same, if not
    > I get
    > double primary terms, too. Maybe you could show an example"
    >
    > Regards
    >
    > Bernhard
    >
    >
    > Am 09.10.2018 um 15:39 schrieb Tim Arnold:
    > > hi,
    > > I create a subject index for my docbook documents but I'm getting
    > > multiple entries for primary/secondary terms when I should be
    > getting
    > > a single primary with multiple secondaries.
    > >
    > > Just wondered if others have conquered a similar problem that I can
    > > learn from.
    > > Currently using Python and lxml to merge them, but it's kind of
    > messy.
    > >
    > > thanks,
    > > --Tim
    > > Here's pseudo-output of the situation:
    > > ------------
    > > term
    > >    subterm1
    > > term 
    > >   subterm2
    > > -----------------
    > >
    > > when I want
    > > -----------
    > > term
    > >   subterm1
    > >   subterm2
    > > --------------
    > >
    > >
    >
    > --
    > spitzhalde9
    > D-79853 lenzkirch
    > bernhard.kleine@gmx.net <mailto:bernhard.kleine@gmx.net>
    > www.b-kleine.com <http://www.b-kleine.com>, www.urseetal.net
    > <http://www.urseetal.net>
    > -
    > thunderbird mit enigmail
    > GPG schlüssel: D5257409
    > fingerprint:
    > 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
    >
    >

    --
    spitzhalde9
    D-79853 lenzkirch
    bernhard.kleine@gmx.net
    www.b-kleine.com, www.urseetal.net
    -
    thunderbird mit enigmail
    GPG schlüssel: D5257409
    fingerprint:
    08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09