Java Script in XSL Issue

Results 1 to 2 of 2

Thread: Java Script in XSL Issue

  1. #1
    Join Date
    Dec 1969

    Default Java Script in XSL Issue

    I am using Java Script in an XSL Style Sheet. Within my java script I am using the operator &#060; to compare two value. Since this is a Style Sheet, I can not use &#060; because it thinks it is part of a tag. I was defining &#060; than as a constant (see example below), and using xsl:eval to translate it. That worked for version 2 of MS XML parser, but xsl:eval is not supprted in MS XML parser version 3 and above. Anybody have any other ideas on how to handle this? <BR><BR>Here is part of the code I was using: <BR><BR>Const LESS_THAN = "&#060;" <BR><BR>for(var idx=0;idx&#060;xsl:eval no-entities="true"&#062;LESS_THAN&#060;/xsl:eval&#062;document.frmSite.fldStateProvince.le ngth;idx++)

  2. #2
    Join Date
    Dec 1969

    Default RE: Java Script in XSL Issue

    You need to put the JavaScript in CDATA tags:<BR>&#060;script language="JavaScript"&#062;<BR>&#060;xsl:comment&# 062;<BR>&#060;![CDATA[<BR><BR>// script here<BR><BR>]]&#062;<BR>//&#060;/xsl:comment&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts