cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elmar Christen <el...@elmartec.de>
Subject Re: Javascript and XSLT!!!
Date Wed, 18 Apr 2001 09:50:49 GMT
Check this out: it's a bit of code, which generates an html with 
javascript.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3c.org/TR/REC-html40">
<xsl:template match="raiz">
<xsl:processing-instruction 
name="cocoon-format">type="text/html"</xsl:processing-instruction>

<html><head><title>Login Form</title>

<script language="Javascript">
   var mymsg = "<xsl:value-of select="mensaje"/>";
   var usersessioncount = <xsl:value-of select="usersessioncount"/>;
   var login = "<xsl:value-of select="login"/>";
   var numeroMaximoDeIntentos = <xsl:value-of 
select="numeromaximodeintentosporusuario"/>;

...and so on. Just watch out with those "<" or ">" chars within your 
javascript. Instead, use &lt; / &gt; or put all the javascript stuff 
within <![CDATA[ ..]]>.

mohamed ramzy wrote:

> hi All
> 
> actually i've found that Microsoft has a new extension
> for XSLT and added  new elements xsl:script and
> xsl:eval, as xsl:script to write multi-line jscript
> inside XSL file, and xsl:eval just to write one
> line...STRANGE!!
> 
> any way..i have a simple question is there any way to
> write jscripts inside XSL....
> 
> thanks for your help in advance....
> 
> =====
> Mohamed Ramzy Zakaria, Graduate Research student
> School of Computer Science & Information Technology
> Jubilee Campus, Nottingham University
> Nottingham, UK
> TEL: 00 44 (0)115 84 66529
> MOB: 00 44 (0)7947105251
> MOB E-MAIL: m_ramzy@quios.com
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 
> 


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message