ï
Hi
Niels,
I'm not
sure I understand if this is working for you. Multiple
scripts are allowed as a space-separated value to the
stylesheet parameter html.script, and they each generate a
<script> element. They would all get the same @type,
though.
In any
case, if you need more than the simple script handling
provided by the params, there is an empty utility template
named 'user.head.content' that you can customize instead. It
is called within <head> to output whatever custom head
content you need. It is described here:
http://www.sagehill.net/docbookxsl/HtmlHead.html
Bob Stayton
bobs@sagehill.net
On 4/19/2020 2:52 AM, Niels MÃller
Larsen wrote:
Thanks Bob.
Are there any details you donât have handy?
I notice âa scriptâ at the link location. Not âthe scriptâ.
I tested if you could include more than one. Didnât work. So
the âtype=âmoduleâ will allow you to import other scripts to
help the one allowed in docbook. This supports a better
structure in the necessary js code.
In css you can import other sheets. In js you can do that
only with type=module.
At present I am trying to interface my pages with prism.js
for syntax highlighting. Prism is a script and a css sheet.
But thanks again
/Niels
Greetings
Niels MÃller Larsen
Programmer/Teacher
ï
If you just want to change the @type attribute value for
all scripts, there's a param for that:
http://docbook.sourceforge.net/release/xsl/current/doc/html/html.script.type.html
Bob Stayton
bobs@sagehill.net
On 4/18/2020 5:01 AM, Niels
MÃller Larsen wrote:
Hi all
You may customize docbook to include a certain _javascript_ into all your generated html files (chunked) by including
<xsl:param name="html.script">nmlQuery.js</xsl:param>
is there a way you can make this appear in the html as
<script src="" type="module"/>
it would be very convenient by allowing you to structure your js in a more moderne way.
BTW ...type="text/_javascript_" is not necessary in this day and age.