faqts : Computers : Internet : Web : XML : XSL[T] (in IE 5.x)

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 4 people (75%) answered Yes
Recently 3 of 4 people (75%) answered Yes

Entry

XML: XSL: Text: Literal: Insert: How to insert literal text? [JavaScript / VBScript / CDATA]

Sep 7th, 2003 08:41
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 07 September 2003 - 05:32 pm ------------------

XML: XSL: Text: Literal: Insert: How to insert literal text? 
[JavaScript / VBScript / CDATA]

Use the following tags around the text you want to skip parsing in XSL:

<![CDATA[
 ... here comes the text you want to skip ...
]]>

---

When your text contains JavaScript or VBScript,
thus <SCRIPT> ... </SCRIPT>,
or further [, ], &
you can use the following to skip parsing in XSL:

<SCRIPT>

<![CDATA[

  ... here comes your JavaScript or VBScript ...

]]>

</SCRIPT>

---

Note that the position of this tags '<![CDATA[' and ']]>' is *inside*
the script, and around the text there. If you put this tags elsewhere
(e.g. outside and around the <SCRIPT>...</SCRIPT>) your JavaScript
should not work in the generated HTML.

---

Tested and worked OK in Internet Explorer v6.0 [kn, ni, su, 07-09-2003 
17:37:07]

---

Internet: see also:
http://www.htmlref.com/samples/Chapt17/17_08.htm

----------------------------------------------------------------------