Adding scripts in Mallard?

Philip Chimento <philip.chimento at gmail.com>
Wed Feb 15 15:37:34 EST 2012

Hello,

I'm wondering if there's a way to include <script>s in the HTML that
Mallard generates. For example, I'd like to have my code listings
highlighted with highlight.js [1], so I'd want to add, say, the
following to the <head> in the generated HTML:

<link rel="stylesheet"
href="http://yandex.st/highlightjs/6.1/styles/github.min.css"></link>
<script src="../highlight.pack.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
  $('pre.code').each(function(i, e) {hljs.highlightBlock(e, '    ')});
});
</script>

But there's no <xsl:apply-templates> in the section of
mal2html-page.xsl that generates the HTML's <head>, so no place for a
custom XSLT stylesheet to hook into.

Any suggestions?

[1] http://softwaremaniacs.org/soft/highlight/en/

Regards,
-- 
Philip Chimento