Solved

How to call another vbscript function within msxsl script ??

Posted on 2003-11-25
5
998 Views
Last Modified: 2012-05-04
Hi,

I have embedded vbscript inside xsl, till now i was calling vbscript function from xsl and it was working fine.

How can i call another vbscript function from that embedded script ?

I tried to call a function using prefix inside vbscript still didn't worked and it give me error like "a semi colon character is expected in line no. xyz "

Here is that line : <msxsl:script language="VBScript" implements-prefix="myPrefix">

Can somone please throw some light on this issue.

Thanks in the anticipation that i will get some hint to solve this.

Regards,
Dipesh
0
Comment
Question by:DipehKhakhkhar
5 Comments
 
LVL 26

Expert Comment

by:rdcpro
ID: 9822056
If you're inside the script block executing functionA, and you want to call functionB, you don't need to specify prefixes.  That's only when you call a function from XPath.  You'll have to post a bit more code for us to help.

Regards,
Mike Sharp
0
 
LVL 1

Author Comment

by:DipehKhakhkhar
ID: 9822240
Hi Mike,

Thanks for replying immediately.

Exactly i did that only and whenever i was making call from xsl part it was working. Then i checked my vbscript which was inside <xsl:msxsl> element and i found that it was conidering characters like "&",  "<" and ">" as xsl/xml specific characters. Because of this i was getting errors and i changed them respectively to &amp; &lt; and &gt; and it then worked for me.

Since my output is text only i thought, it will escape these characters but it does not.

But finally i got my solution.
Thanks for your reply.

Regards,
Dipesh
0
 
LVL 9

Expert Comment

by:sparkplug
ID: 9824003
A simpler solution for escaping character in script would be to use CDATA tags:

e.g.

<msxsl:script language="VBScript" implements-prefix="myPrefix">
<![CDATA[
    Function AddFullStop(s)
            AddFullStop=s & "."
    End Function
]]>
</msxsl:script>

>S'Plug<
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11355891
Closed, 75 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question