docbook-apps

  • 1.  Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml

    Posted 05-22-2013 13:46
    Hi there,
    My use case is that I want to maintain a single assembly file
    per-project, containing all the <structure> elements which define my
    document output. The problem I'm having is that XSLTproc (and the other
    XSLT processors I've tried) only seem to generate assembled DocBook
    files for the first <structure> element encountered, and the rest are
    ignored.

    My assembly file looks like:

    <structure xml:id="article1">

    <module resourceref="thing1"/>
    <module resourceref="thing2"/>
    </structure>

    <structure xml:id="book1">

    <module resourceref="thing3"/>
    <module resourceref="thing4"/>
    </structure>

    <structure xml:id="book2">

    <module resourceref="thing3"/>
    <module resourceref="thing4"/>
    </structure>

    When I run assemble.xml (version v 1.10 2012-04-10 07:56:58 from the
    latest stylesheets), I'm invoking it like this:

    xsltproc ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml

    In the output, I get the
    element for 'article1', but 'book1'
    and 'book2' are ignored.

    Here are the details of the xsltproc tool I'm using:

    Using libxml 20703, libxslt 10124 and libexslt 813
    xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt
    813
    libxslt 10124 was compiled against libxml 20703
    libexslt 813 was compiled against libxml 20703

    Thanks in advance for any guidance.

    Graeme



  • 2.  Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml

    Posted 05-22-2013 14:13
    Hi Graeme,

    On Wed, 22 May 2013 14:45:44 +0100
    graeme@heliocentrik.net wrote:

    > [...]
    > When I run assemble.xml (version v 1.10 2012-04-10 07:56:58 from the
    > latest stylesheets), I'm invoking it like this:
    >
    > xsltproc ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >
    > In the output, I get the
    element for 'article1', but 'book1'
    > and 'book2' are ignored.

    Have you tried the parameter structure.id? The assemble.xsl stylesheet
    contains the following comment:

    May be used to select one structure among several to process

    Perhaps you should try the structure.id parameter like this:

    xsltproc --stringparam structure.id book1 \
    ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml


    Hope that helps.

    --
    Gruß/Regards,
    Thomas Schraitle



  • 3.  Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml

    Posted 05-22-2013 14:24
    Hi Thomas,
    Thanks for your help - that works as you suggest.

    I'd still like to know if it's possible to produce assembled DocBook
    versions of _all_ the structures in my assembly, just by invoking the
    XSL file. Is that feasible?

    I was under the impression that XSL processors could create multiple
    files where necessary (like topic-maker-chunk.xsl is supposed to).
    Ideally, I'd like it to create the assembled DocBook files named after
    their structure IDs.

    Graeme

    On Wed, May 22, 2013, at 15:13, Thomas Schraitle wrote:
    > Hi Graeme,
    >
    > On Wed, 22 May 2013 14:45:44 +0100
    > graeme@heliocentrik.net wrote:
    >
    > > [...]
    > > When I run assemble.xml (version v 1.10 2012-04-10 07:56:58 from the
    > > latest stylesheets), I'm invoking it like this:
    > >
    > > xsltproc ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    > >
    > > In the output, I get the
    element for 'article1', but 'book1'
    > > and 'book2' are ignored.
    >
    > Have you tried the parameter structure.id? The assemble.xsl stylesheet
    > contains the following comment:
    >
    > May be used to select one structure among several to process
    >
    > Perhaps you should try the structure.id parameter like this:
    >
    > xsltproc --stringparam structure.id book1 \
    > ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >
    >
    > Hope that helps.
    >
    > --
    > Gruß/Regards,
    > Thomas Schraitle
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >



  • 4.  Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml

    Posted 05-24-2013 16:00
    Hi Graeme,
    Certainly it is possible to chunk out multiple documents from multiple
    structures in an assembly, but it is not yet implemented as a feature in
    assemble.xsl. I'll add it to the list for a future release.

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net

    --------------------------------------------------
    From: <graeme@heliocentrik.net>
    Sent: Wednesday, May 22, 2013 7:23 AM
    To: <docbook-apps@lists.oasis-open.org>
    Subject: Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple
    structure outputs using assemble.xml

    > Hi Thomas,
    > Thanks for your help - that works as you suggest.
    >
    > I'd still like to know if it's possible to produce assembled DocBook
    > versions of _all_ the structures in my assembly, just by invoking the
    > XSL file. Is that feasible?
    >
    > I was under the impression that XSL processors could create multiple
    > files where necessary (like topic-maker-chunk.xsl is supposed to).
    > Ideally, I'd like it to create the assembled DocBook files named after
    > their structure IDs.
    >
    > Graeme
    >
    > On Wed, May 22, 2013, at 15:13, Thomas Schraitle wrote:
    >> Hi Graeme,
    >>
    >> On Wed, 22 May 2013 14:45:44 +0100
    >> graeme@heliocentrik.net wrote:
    >>
    >> > [...]
    >> > When I run assemble.xml (version v 1.10 2012-04-10 07:56:58 from the
    >> > latest stylesheets), I'm invoking it like this:
    >> >
    >> > xsltproc ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >> >
    >> > In the output, I get the
    element for 'article1', but 'book1'
    >> > and 'book2' are ignored.
    >>
    >> Have you tried the parameter structure.id? The assemble.xsl stylesheet
    >> contains the following comment:
    >>
    >> May be used to select one structure among several to process
    >>
    >> Perhaps you should try the structure.id parameter like this:
    >>
    >> xsltproc --stringparam structure.id book1 \
    >> ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >>
    >>
    >> Hope that helps.
    >>
    >> --
    >> Gruß/Regards,
    >> Thomas Schraitle
    >>
    >> ---------------------------------------------------------------------
    >> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    >> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >>
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >
    >



  • 5.  Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml

    Posted 06-13-2013 10:57
    Hi Bob, all,
    I've whipped up a XSLT 2.0 stylesheet which works around this - hopefully others will find useful.

    Basically, given a 'master' assembly file containing multiple <structure> elements, it'll split these out into separate, self-contained assembly files which are named after each <structure>'s ID. Each self-contained assembly will also contain the entire 'resources' element from the 'master' assembly file.

    It means you don't need to then supply any 'stringparam' arguments when post-processing. I'm using it in a Mavenised workflow to do two-pass processing.

    https://gist.github.com/capncodewash/5772777

    Thanks,

    Graeme

    On 24 May 2013, at 17:00, Bob Stayton <bobs@sagehill.net> wrote:

    > Hi Graeme,
    > Certainly it is possible to chunk out multiple documents from multiple structures in an assembly, but it is not yet implemented as a feature in assemble.xsl. I'll add it to the list for a future release.
    >
    > Bob Stayton
    > Sagehill Enterprises
    > bobs@sagehill.net
    >
    > --------------------------------------------------
    > From: <graeme@heliocentrik.net>
    > Sent: Wednesday, May 22, 2013 7:23 AM
    > To: <docbook-apps@lists.oasis-open.org>
    > Subject: Re: [docbook-apps] Assemblies in DocBook 5.1: generating multiple structure outputs using assemble.xml
    >
    >> Hi Thomas,
    >> Thanks for your help - that works as you suggest.
    >>
    >> I'd still like to know if it's possible to produce assembled DocBook
    >> versions of _all_ the structures in my assembly, just by invoking the
    >> XSL file. Is that feasible?
    >>
    >> I was under the impression that XSL processors could create multiple
    >> files where necessary (like topic-maker-chunk.xsl is supposed to).
    >> Ideally, I'd like it to create the assembled DocBook files named after
    >> their structure IDs.
    >>
    >> Graeme
    >>
    >> On Wed, May 22, 2013, at 15:13, Thomas Schraitle wrote:
    >>> Hi Graeme,
    >>>
    >>> On Wed, 22 May 2013 14:45:44 +0100
    >>> graeme@heliocentrik.net wrote:
    >>>
    >>> > [...]
    >>> > When I run assemble.xml (version v 1.10 2012-04-10 07:56:58 from the
    >>> > latest stylesheets), I'm invoking it like this:
    >>> >
    >>> > xsltproc ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >>> >
    >>> > In the output, I get the
    element for 'article1', but 'book1'
    >>> > and 'book2' are ignored.
    >>>
    >>> Have you tried the parameter structure.id? The assemble.xsl stylesheet
    >>> contains the following comment:
    >>>
    >>> May be used to select one structure among several to process
    >>>
    >>> Perhaps you should try the structure.id parameter like this:
    >>>
    >>> xsltproc --stringparam structure.id book1 \
    >>> ~/docbook-xsl/assembly/assemble.xsl assembly-file.xml
    >>>
    >>>
    >>> Hope that helps.
    >>>
    >>> --
    >>> Gruß/Regards,
    >>> Thomas Schraitle
    >>>
    >>> ---------------------------------------------------------------------
    >>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    >>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >>>
    >>
    >> ---------------------------------------------------------------------
    >> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    >> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >>
    >>