You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by mohamed ramzy <m_...@yahoo.com> on 2001/04/17 16:41:01 UTC
Javascript and XSLT!!!
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Javascript and XSLT!!!
Posted by Elmar Christen <el...@elmartec.de>.
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 < / > 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>