I would look at dropping this into your XSL:
<xsl:preserve-space elements="JavaScript"/>
Main Topics
Browse All TopicsHere is my xsl:
......
<script language="javascript">
<xsl:apply-templates select="JavaScript"/>
</script>
.......
.......
<xsl:template match="JavaScript">
<xsl:copy-of select="node()"/>
</xsl:template>
.......
Here is my xml:
.....
<JavaScript>
var globalCount = 0;
....
...
</JavaScript>
......
After I tranformed xml with xsl into html, I saw a very long srting in my JavaScript portion. How to make it display properly ?
In other word, make it displays as whatever I have in <JavaScript> tag.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Have you verified that the XML has both line feeds and carriage returns in it? Some editors (e.g. FrontPage) allow just one of these and they look like they have both, but they are more UNIX like and only use one (can't remember which).
Try looking at the XML with a hex editor and see if there is a 0D 0A (or is it 0A 0D) for the lines.
I would recommend www.ultraedit.com
Business Accounts
Answer for Membership
by: getanightlifePosted on 2003-08-18 at 13:00:18ID: 9176157
Have a look at http://www.w3schools.com/x ml/xml_cda ta.asp as I think you may be able to use the CDATA feature of XML. Using CDATA tells the XML parsers to ignore contents of this tag and leave it as it is. An example from this website is as follows...
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1
}
else
{
return 0
}
}
]]>
</script>
Possibly let me know a little more about what you are trying to display properly. Are you trying to display Javascript to the user in the browser window or will the Javascript be hidden client-side code as it normally is?
I hope this helps
Paul