docbook-apps

  • 1.  How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 06:29
    Hello,

    How does one insert


  • 2.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 13:24
    On Thu, May 19, 2011 at 2:28 AM, Mark Craig


  • 3.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 13:45
    Hello, thanks for your suggestion.

    This is what I tried after I found user.footer.content only gets used when
    chunking.

    Trouble is, I can insert the file in the HTML following the instructions you
    cite.

    But either I get effectively "<script>" etc. in the HTML, using
    <xinclude:include href="ga.txt" parse="text" />.
    Or the HTML is okay but the build breaks generating PDF with <xinclude:include
    href="ga.txt" />, because the FO specification has never heard of


  • 4.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 14:14
    Hello again,

    Well... this seems to work, though it doesn't feel right. I put this as one
    of the tasks for the maven-antrun-plugin of the POM:

    <replace dir='${basedir}/target/docbkx/html/' token=
    '</body>'>

    <include name='**/**/*.html' />

    <replacevalue><script type="text/javascript">


    var _gaq = _gaq || [];

    _gaq.push(['_setAccount', 'UA-********-*']);

    _gaq.push(['_trackPageview']);


    (function() {

    var ga = document.createElement('script'); ga.type = 'text/javascript';
    ga.async = true;

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : '
    http://www') + '.google-analytics.com/ga.js';

    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);

    })();


    </script></body></replacevalue>

    </replace>

    It would be cool if there were something like user.footer.content that
    worked without chunking.

    Regards,
    Mark

    On Thu, May 19, 2011 at 3:45 PM, Mark Craig


  • 5.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 15:13
    I've never used docbkx-tools, maybe I'm misunderstanding your
    publishing process. I'm surprised that a customization for HTML has
    any effect on your FO.

    Peter

    On Thu, May 19, 2011 at 9:45 AM, Mark Craig


  • 6.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 15:20
    Hello Peter,

    It's not actually a customization for HTML specifically. Maybe I need to
    reread the docs?

    When I include the Google Analytics script in the document with XInclude,
    the resulting content is in the source. Then the docbkx-tools Maven plugin
    runs HTML, EPUB, PDF, RTF, and man page generation on the source.

    Regards,
    Mark

    On Thu, May 19, 2011 at 5:12 PM, Peter Desjardins <peter.desjardins.us@
    gmail.com> wrote:

    > I've never used docbkx-tools, maybe I'm misunderstanding your
    > publishing process. I'm surprised that a customization for HTML has
    > any effect on your FO.
    >
    > Peter
    >
    > On Thu, May 19, 2011 at 9:45 AM, Mark Craig


  • 7.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 15:20
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    It appears he was using an xinclude to pull in the script (rather than a
    processing instruction as suggested in Bob's book). The xinclude will be
    resolved for all formats, so would break fo. The PI however would be
    ignored/discarded by the fo xsls.

    David

    On 05/19/2011 10:12 AM, Peter Desjardins wrote:
    > I've never used docbkx-tools, maybe I'm misunderstanding your
    > publishing process. I'm surprised that a customization for HTML has
    > any effect on your FO.
    >
    > Peter
    >
    > On Thu, May 19, 2011 at 9:45 AM, Mark Craig


  • 8.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 15:28
    Aha, . I'll try that.

    Regards,
    Mark

    On Thu, May 19, 2011 at 5:20 PM, David Cramer <david@thingbag.net> wrote:

    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > It appears he was using an xinclude to pull in the script (rather than a
    > processing instruction as suggested in Bob's book). The xinclude will be
    > resolved for all formats, so would break fo. The PI however would be
    > ignored/discarded by the fo xsls.
    >
    > David
    >
    > On 05/19/2011 10:12 AM, Peter Desjardins wrote:
    > > I've never used docbkx-tools, maybe I'm misunderstanding your
    > > publishing process. I'm surprised that a customization for HTML has
    > > any effect on your FO.
    > >
    > > Peter
    > >
    > > On Thu, May 19, 2011 at 9:45 AM, Mark Craig


  • 9.  Re: [docbook-apps] How to insert JavaScript near end of HTML without chunking?

    Posted 05-19-2011 15:41
    Thanks very much for insistingm Peter and David. That's much better.

    Regards,
    Mark

    On Thu, May 19, 2011 at 5:28 PM, Mark Craig