[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to pass arguments to VBScript function in MS XML3

Subject: How to pass arguments to VBScript function in MS XML3
From: sotiris@xxxxxxxxxx
Date: Mon, 17 Jul 2000 12:10:47 +0300
vbscript function arguments
Hi,

In a stylesheet I am writing I need to convert a string by ensuring that
certain characters are protected  as follows:

     \    \\
     `    \Q
     '    \q
     >    \>
     tab  \t

I have written VBScript code within my stylesheet using the <msxsl:script>
function, to do the above, but I cannot pass the string argument to it.
The string argument will be the value of certain element or attribute nodes
on the XML tree being processed.  A simplified version of the code I have
written looks like:

 <msxsl:script language="VBScript" implements-prefix="plss">
     function MFS(AString)
          dim locstr, outstr, i

          locstr = AString
          outstr = ""
          do while(true)
               i = instr(locstr, "'")
               if i &gt; 0 then
                    OutStr = OutStr + left(locstr, i - 1) + "\q"
                    locstr = right(locstr, len(locstr) - i)
               else
                    outstr = outstr + locstr
                    exit do
               end if
          loop
          test = outstr
     end function
</msxsl:script>

I know that I need to invoke this as follows:

     <xsl:value-of select="plss:MFS(??????????)"/>

but how do I pass the value of an element or attribute node into the
VBScript function?  Does anyone know?

Kind regards
Sotiris, CTL, Cyprus.


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.