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] Adding a custom line to the HTML <head> element


Look at the stuff about the user.head.content template here: 
http://www.sagehill.net/docbookxsl/HtmlHead.html

If you're pointing to an external .js file, be sure to include a comment
inside the <script> tag:

<xsl:template name="user.head.content">
  <script language="JavaScript" type="text/javascript" src="foo.js">
 	<xsl:comment>IE is very strange</xsl:comment>
  </script>
</xsl:template>

If you don't do that, the xslt processor will probably write it out as
an empty element like so <script language="JavaScript"
type="text/javascript" src="foo.js"/>, and then IE will not pick it up
and you'll spend an hour trying to figure out why your javascript works
fine in firefox but not in IE :-)

David

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Matthew East
> Sent: Sunday, June 04, 2006 5:39 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: [docbook-apps] Adding a custom line to the HTML <head>
element
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> I need to add a line like this [1] in the <head> element of my HTML
> output. I had a look at the sagehill bible but couldn't find anything
> specifically about including something like this - did I miss it, and
> can anyone help me?
> 
> [1] <script language="JavaScript" type="text/javascript" [...]
</script>
> 
> Thanks a lot!
> 
> Matt
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFEgrhBtSaF0w5rBv8RAgWTAKCI4kU6mmcJ3429U863cMUYuKxUwgCeLiWq
> gGAm/hvWnQrsnvIwO0tLTGs=
> =v+IO
> -----END PGP SIGNATURE-----
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org



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