Subject: Re: [xsl] Associating javascript with XSL and XML From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Tue, 05 Jan 2010 13:49:36 +0100 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h="http://www.w3.org/1999/xhtml">
<xsl:template match="/">
<h:script type="text/javascript">
alert('hello');
</h:script>
<h:style type="text/css">
a{background-color:red}
</h:style>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="item">
<h:a href="{link}"><xsl:value-of select="desc"/></h:a>
</xsl:template>
</xsl:stylesheet>
What I'm trying to do is start up javascript and be able to manipulate the DOM in the browser without having to rely on anything related to HTML. I don't have any aversion to HTML, it just feels like I'm adding extraneous elements.
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Associating javascript wi, Rob Belics | Thread | Re: [xsl] Associating javascript wi, Rob Belics |
Re: [xsl] tag with one blank body, G. Ken Holman | Date | RE: [xsl] tag with one blank body, Michael Kay |
Month |