cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bierenfeld <michael.bierenf...@atmiralis.de>
Subject Re: Script Code
Date Fri, 06 Oct 2000 10:37:04 GMT
Christof Schneider wrote:
> 
> General (beginner's) question:
> 
> [apache 1.3.12 - tomcat 3.1 - cocoon 1.8 - Windows 2000]
> 
> When generating a HTML document from a xml-file and a xsl file I
> need to include java script code. Is there a common way to integrate
> java script code in my xsl-code? I discovered that the <xsl:script>
> tag is not part of the w3c drafts.
> 
> Thanks in advance.
> 
> - Chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

We have done it this way :

<xsl:template match="page">

<xsl:processing-instruction name="cocoon-format">
	type="text/html"
</xsl:processing-instruction>

<head>
<script language="JavaScript"
src="../../../xml/ecmascript/command.es"
type="text/javascript">
</script>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"/>
<title><xsl:value-of select="@title"/></title>
<link rel="stylesheet"
href="../../css/style.css"><!-- do not remove this
comment --></link>
</head>

and so on. ......

Works fine. So there is no need to include
javascript code in xml content. 

Regards

Michael

Mime
View raw message