I'm pleased to announce the marriage of XSL and JavaScript

To get an XSL stylesheet to output XML with JavaScript in it, do this:

<?xml version="1.0" encoding="us-ascii"?>
<xsl:stylesheet version="1.0"
<xsl:output method="xml"
doctype-public="-//W3C//DTD XHTML 1.1//EN"
cdata-section-elements="javascript-escape" />

<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<title>The Marriage of XSL and JavaScript</title>
<script type="text/javascript">


function load() {
alert("All your bases are belong to us.");

/* ]]>

<body onload="load()">
<p>Captain: You know what you doing.</p>

No comments:

Post a Comment