RE: [xsl] regarding xsl:script

Subject: RE: [xsl] regarding xsl:script
From: "Hahn, Kimberly" <Kim.Hahn@xxxxxxxxxx>
Date: Tue, 13 Feb 2001 18:25:45 -0600
Depends on what you are doing.  XSLT does not have the xsl:script, but you
can use the msxsl:script if you include the namespace.  Snippets of XSLT
transformation using msxsl namespace:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:bitmask="http://www.truequote.com/quote/bitmasknamespace";>
	<msxsl:script language="VBScript" implements-prefix="bitmask">
		Function DeCode(objAttr, intCode)
			If (objAttr.Item(0).Text and intCode) > 0 Then
				DeCode = "H000000FF"
			Else
				DeCode = ""
			End If
		End Function
	</msxsl:script>
...
<xsl:for-each select="@*">
	<xsl:attribute name="{concat('Attr', position())}">
		<xsl:value-of select="bitmask:DeCode(parent::OT/@ChangeBitMask, 32)"/>
	</xsl:attribute>
</xsl:for-each>
....

There are other options depending on where the transformation has to take
place. In my case I can rely on the users/client running IE 5.x, so I don't
have the compatibility worries that go with running on multiple client
browsers.


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Rosa I-Ting
Cheng
Sent: Tuesday, February 13, 2001 5:46 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] regarding xsl:script


can anyone please tell me whether xsl:script is processed during
transformation or the chunk between the xsl:script tags are only copied
directly into the HTML so that its just like having the script written
between <SCRIPT> HTML tags?

if it's the former, is there any special declarations we must put at the top
of the code? cos I have tried using xsl:script, but the browser don't seem
to undestand it.

Thanx!

Rosa

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


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


Current Thread