docbook-apps

  • 1.  transform title/@xml:id to title/@id in HTML

    Posted 03-03-2021 12:17
    Hi everyone,

    I'm using the DocBook XSL to transform DocBook XML to EPUB and HTML. I have a question about including xml:id in the output as id's.

    I know that it's possible to include the xml:id of main sections in the output using generate.id.attributes. I also have xml:id's in some of my </preface>

    Output:




    Frontispice







    Is there a way to do this?

    Thanks in advance,
    Kind regards,
    Michel





  • 2.  Re: [docbook-apps] transform title/@xml:id to title/@id in HTML

    Posted 03-04-2021 04:43
    Hi, Michel!

    I would consider customizing the d:title template and setting the output id
    value to whatever the input xml:id value is.


    https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/html/titlepage.xsl#L1037

    My idea feels like a hack though. Maybe someone else has a better solution?

    Peter

    On Wed, Mar 3, 2021 at 7:17 AM Michel van den Burg <burg@coutinho.nl> wrote:

    > Hi everyone,
    >
    > I'm using the DocBook XSL to transform DocBook XML to EPUB and HTML. I
    > have a question about including xml:id in the output as id's.
    >
    > I know that it's possible to include the xml:id of main sections in the
    > output using generate.id.attributes. I also have xml:id's in some of my
    > </preface>
    >
    > Output:
    >
    > id="56789">
    >

    >

    >

    >

    Frontispice


    >

    >

    >

    >

    >
    > Is there a way to do this?
    >
    > Thanks in advance,
    > Kind regards,
    > Michel
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >



  • 3.  RE: [docbook-apps] transform title/@xml:id to title/@id in HTML

    Posted 03-05-2021 11:34
    Hi Peter,

    Thanks for your suggestion! I igree that one must try to avoid ‘hacking’ if possible. Adding ID’s (from the source document) to more elements than the main sections seems like a very common wish, though. We would like to add internal links to lots of places, that’s why we want to transform xml:id to id.

    Does anyone else know if the 1.0-stylesheets have a setting to transfer all xml:id’s to the output? Or is Peter’s suggestion the way to go?

    Many thanks,

    Michel

    Van: Peter Desjardins <peter.desjardins.us@gmail.com>
    Verzonden: donderdag 4 maart 2021 05:43
    Aan: Michel van den Burg <burg@coutinho.nl>
    CC: docbook-apps@lists.oasis-open.org
    Onderwerp: Re: [docbook-apps] transform title/@xml:id to title/@id in HTML

    Hi, Michel!

    I would consider customizing the d:title template and setting the output id value to whatever the input xml:id value is.

    https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/html/titlepage.xsl#L1037

    My idea feels like a hack though. Maybe someone else has a better solution?

    Peter

    On Wed, Mar 3, 2021 at 7:17 AM Michel van den Burg <burg@coutinho.nl<mailto:burg@coutinho.nl>> wrote:
    Hi everyone,

    I'm using the DocBook XSL to transform DocBook XML to EPUB and HTML. I have a question about including xml:id in the output as id's.

    I know that it's possible to include the xml:id of main sections in the output using generate.id.attributes. I also have xml:id's in some of my </preface>

    Output:




    Frontispice







    Is there a way to do this?

    Thanks in advance,
    Kind regards,
    Michel



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org<mailto:docbook-apps-unsubscribe@lists.oasis-open.org>
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org<mailto:docbook-apps-help@lists.oasis-open.org>