This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem with msxsl:script


I am attemting to dynamically generate a URL with a query string that is
dependent on a value passed from an XML node by using the following code:


<msxsl:script language="JScript" implements-prefix="user">
    function getURL(nodelistBook) {
			var mURL =&quot;&lt;a href = &quot;  ;
			var mURL =  mURL + &quot;
http:\\\\s1cf013\\irg_dev\\d_debug?xxx=&quot;;
			var curNode = nodelistBook.item(0);
			var state_1 =
curNode.selectSingleNode('state_1').text;
			var mURL = mURL+ state_1 + ">"  ;
			var mURL = mURL+ state_1 ;
			var mURL = mURL+ &quot;&lt;/a&gt;&quot;;

			return mURL;
    }
  </msxsl:script>

My return value as displayed by the browser is as follows:

<a href = http:\\s1cf013\irg_dev\d_debug?xxx=01>01</a>

which may look great but this is exactly what is diplayed, not the
hyperlink, but this code as is.  The browser is doing as it is supposed to
since it is receiving the output of the function as:  &lt;a href =
http:\\s1cf013\irg_dev\d_debug?xxx=01&gt;01&lt;/a&gt;

I have tried all different ways of expressing the less thans and greater
thans and quotes but I can't seem to end up with code that will actually be
expressed as text representing a hyperlink.
Any takers?

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]