473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JavaScript in XSLT

29
Hi. Everyone
I’m using xslt styllesheet to transform my xml doc. into an html doc. The task includes embedding some JavaScript code for validation purpose, till this point there is no problem everything is going right. Once I tried to get an xhtml doc instead of html, JavaScript problem was raised. In other words, the transformation is performed right apart from JavaScript problem which is, some of JavaScript special characters such as (< , >, &&) were converted into (&lt; , &gt; , ….) which cause some problems with validation task, despite the fact that all JavaScript code is placed between <![CDATA and ]]>. So, any clue to keep whole JavaScript code in its original form?

Your help is much appreciated
May 1 '07 #1
3 1501
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN....

Do not use <, >, && , replace them by the appropriate HTML symbol.
May 2 '07 #2
elsheh
29
thank you 4 ur reply

but this is not possible for JavaScript . I mean JavaScript doesn't accept to write &lt; instead of <.
do u see what i mean?
cheers.

Welcome to TheScripts TSDN....

Do not use <, >, && , replace them by the appropriate HTML symbol.
May 2 '07 #3
dorinbogdan
839 Expert 512MB
thank you 4 ur reply

but this is not possible for JavaScript . I mean JavaScript doesn't accept to write &lt; instead of <.
do u see what i mean?
cheers.
Yes, I know, but the output html should convert those codes.
Eventually try to not use the CDATA tag, and see if the html codes are parsed correctly.
May 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jon Martin Solaas | last post by:
For java programmers there exist a framework called Millstone (www.millstone.org) for programming web user-interfaces in a component oriented way. Millstone uses xslt transformations to render...
1
by: Matt | last post by:
Is it possible to put XSL instructions inside JavaScript? For example, pop up a message box with the xml value: alert(value in xml); Approach #1: <script type="text/javascript">...
1
by: Claudio Jolowicz | last post by:
I need to produce an HTML page with javascript using XSLT. Unfortunately, Mozilla has a bug that lets it crash when it encounters document.write in an XSLT stylesheet (bugzilla# 202765). Are there...
1
by: Sergio del Amo | last post by:
Hi, I post here because, i think that my problem can happen to a lot of people using javascript with xml and xsl and the future feedback can be useful to all of us. I hava an xml file with a...
1
by: ms_chika | last post by:
Please help! I just want to know how can i pass the return value of a javascript function to a xsl variable. I have an xsl file and from that file i will call a javascript function then the...
6
by: RC | last post by:
Hello World, I am try do call a JavaScript function from XSLT, but I got function not avaible error. See "????" below. Would someone out there tell me how? Thank Q! <xsl:stylesheet...
2
by: Alan Searle | last post by:
I would like to use an XSL/HTML template to sort XML data dynamically on the client side. As it is, I found a tutorial showing how to do this on the following site ... ...
3
by: bloc | last post by:
I am programming an interactive CV using xml, xslt and java script. The page consists of a header which contains links to various 'sections' on the xml cv, a left and right menu, and a central...
4
by: elsigh | last post by:
I'm wondering if anyone has any ideas about a way to quickly convert an HTML DOM Node into an XML Document. The goal is that I want to perform XSLT on the Node, which is coded correctly as XHTML....
6
by: kenundrum | last post by:
Hey all, I am having an issue with XML/XSLT and JavaScript in my ASP.NET page that I am creating. I first want to apologize if i placed this in the wrong category. Since there were three different...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.