OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] javascript to chunked xhtml output from docbook


Thanks Mark, works :)

Niels Muller Larsen, MSc
Programmer, Assoc Professor

The distinction between true and false appears to become increasingly
blurred by... the pollution of the language.
		-- Arne Tiselius

On 05/09/16 08:10, Mark Craig wrote:
Hello,

If you can store the JavaScript in a separate file, then you can
reference the file with the html.script parameter:
http://docbook.sourceforge.net/release/xsl/1.79.1/doc/html/html.script.html

The stylesheets basically copy the content of the parameter element to a
script element in the head of the (X)HTML document.

Here's an example referencing external files:

 <xsl:param name="html.script">
  https://code.jquery.com/jquery-1.11.2.min.js
  https://code.jquery.com/ui/1.11.4/jquery-ui.min.js
  https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
 </xsl:param>

You can also reference local files, but you'll have to copy them to the
output separately. The stylesheets do not do that for you.

Regards,
Mark


On Sun, May 8, 2016 at 6:20 PM, Niels Müller <neinalways@gmail.com
<mailto:neinalways@gmail.com>> wrote:

    Hi guys

    I am producing course materials for various it courses with docbook 5.
    I use chunked output so that I get a series of lessons (chapters)
    each consisting of separate sections. That is a section becomes an
    xhtml page by this procedure. (http://x15.dk/auit/site/)

    Now I need to include a bit of javascript into the head element of
    one of these xhtml pages. The javascript should create an svg
    element with content dynamically putting it into an 'id' div in the
    page.

    Everything is tested and works in a separate, custommade html-page.

    But not through docbook. I have looked at Bobs material for
    including premade html into a docbook produced page, but I can't get
    it to work.

    Does anyone have an example of something like that, and are you
    willing to share, please?

    Cheers
    --
    Niels Muller Larsen, MSc
    Programmer, Assoc Professor

    Send some filthy mail.

    ---------------------------------------------------------------------
    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>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]