473,657 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

msxml scripts and xstlArgumentLis t entension objects. Can I combinethem?

I think the subject says it all, but just in case:

I know that I can call my own methods during an XSL transformation
using

<xsl:value-of select="myObjec t.someMethod(ar g1)" />

having done something like:

dim xslTrans as System.Xml.Xsl. Xsltransform
dim xsltArg as new System.Xml.Xslt ArgumentList()
xsltArg.AddExte nsionObject("ur n:my-object")
....
dim navigator as System.Xml.Xpat h.XPathNavigato r = ..

xslTrans.transf orm(navigator, xslArg, myWriter, Nothing)

....
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:

<msxsl:script language="Visua lBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>

<xsl-value-of select="user:my Func( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?

<msxsl:script language="Visua lBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMe thod()
end function
]]>
</msxsl:script>
Steve.

Nov 17 '05 #1
3 1491
Like you, I would also like an answer to this question...

Also, does the VS debugger work for you with the contents of the msxsl:script tag ?
steve_h <st***********@ bigfoot.co.m> wrote in message news:<bo******* ***@rex.ip-plus.net>...
I think the subject says it all, but just in case:

I know that I can call my own methods during an XSL transformation
using

<xsl:value-of select="myObjec t.someMethod(ar g1)" />

having done something like:

dim xslTrans as System.Xml.Xsl. Xsltransform
dim xsltArg as new System.Xml.Xslt ArgumentList()
xsltArg.AddExte nsionObject("ur n:my-object")
....
dim navigator as System.Xml.Xpat h.XPathNavigato r = ..

xslTrans.transf orm(navigator, xslArg, myWriter, Nothing)

...
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:

<msxsl:script language="Visua lBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>

<xsl-value-of select="user:my Func( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?

<msxsl:script language="Visua lBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMe thod()
end function
]]>
</msxsl:script>
Steve.

Nov 17 '05 #2


John Doe wrote:
Like you, I would also like an answer to this question...

Also, does the VS debugger work for you with the contents of the msxsl:script tag ?
I had't tried it until just now. The only way I could think of doing
this was using 'step into' xsltTrans.trans form(....)', but that doesn't
work. The callbacks to myObject.someMe thod can be debugged if I place a
breakpoint there, but I can't place break points inside the
msxsl function because it's only a string inside a data file afa
devStudio is concerned.

steve_h <st***********@ bigfoot.co.m> wrote in message news:<bo******* ***@rex.ip-plus.net>...
I think the subject says it all, but just in case:

I know that I can call my own methods during an XSL transformation
using

<xsl:value-of select="myObjec t.someMethod(ar g1)" />

having done something like:

dim xslTrans as System.Xml.Xsl. Xsltransform
dim xsltArg as new System.Xml.Xslt ArgumentList()
xsltArg.AddExte nsionObject("ur n:my-object")
....
dim navigator as System.Xml.Xpat h.XPathNavigato r = ..

xslTrans.transf orm(navigator, xslArg, myWriter, Nothing)

...
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:

<msxsl:script language="Visua lBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>

<xsl-value-of select="user:my Func( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?

<msxsl:script language="Visua lBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMe thod()
end function
]]>
</msxsl:script>
Steve.


Nov 17 '05 #3
Here is the same reply I put on the microsoft.publi c.xsl list:

They are processed very differently by the .NET framework, and you should
refrain from using msxsl:script elements within XSLT parsed by managed code.
See Q316775 [1], the assembly cannot be unloaded correctly and may lead to a
memory leak. There are several design patterns that you can use to mitigate
the changes, including dynamically loading an assembly that contains your
extension objects.

Not that it is impossible to do, but I have not seen any vendors that
support script debugging in their XSLT products. For example, Marrowsoft's
Xselerator is one of the best XSLT IDEs and it does not support script
debugging. I have not seen ActiveState's newest release of their XSLT
debugger for .NET, but I have not heard about it being able to debug inlined
script, either.

Your best bet is to simply use extension objects if you are using .NET.

[1] http://support.microsoft.com/default...b;EN-US;316775

--
Kirk Allen Evans
Microsoft MVP, ASP.NET
XmlInsider
www.xmlandasp.net
Read my web log at http://weblogs.asp.net/kaevans

"steve_h" <st***********@ bigfoot.co.m> wrote in message
news:bo******** **@rex.ip-plus.net...


John Doe wrote:
Like you, I would also like an answer to this question...

Also, does the VS debugger work for you with the contents of the msxsl:script tag ?

I had't tried it until just now. The only way I could think of doing
this was using 'step into' xsltTrans.trans form(....)', but that doesn't
work. The callbacks to myObject.someMe thod can be debugged if I place a
breakpoint there, but I can't place break points inside the
msxsl function because it's only a string inside a data file afa
devStudio is concerned.

steve_h <st***********@ bigfoot.co.m> wrote in message news:<bo******* ***@rex.ip-plus.net>...
I think the subject says it all, but just in case:

I know that I can call my own methods during an XSL transformation
using

<xsl:value-of select="myObjec t.someMethod(ar g1)" />

having done something like:

dim xslTrans as System.Xml.Xsl. Xsltransform
dim xsltArg as new System.Xml.Xslt ArgumentList()
xsltArg.AddExte nsionObject("ur n:my-object")
....
dim navigator as System.Xml.Xpat h.XPathNavigato r = ..

xslTrans.transf orm(navigator, xslArg, myWriter, Nothing)

...
public function someMethod( arg as string) as String
...
end function
and I also know that I can define functions in a script inside
the xsl file using:

<msxsl:script language="Visua lBasic" implements-prefix="user">
function myFunc (xx)
...
end function
</msxsl:script>

<xsl-value-of select="user:my Func( elm/@value ) />
Is there an easy way to combine the two ideas so that my msxml:script
function calls the method of my extension object ?

<msxsl:script language="Visua lBasic" implements-prefix="user">
<![CDATA[
function myFunc (xx)
myFunc = myObject.someMe thod()
end function
]]>
</msxsl:script>
Steve.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2383
by: isee | last post by:
I want to send xml to some site and get response (also XML). I am using vb.net,but I don't want to install MSXML 4.0 .
6
6279
by: Alfred Taylor | last post by:
I'm having performance/memory problems using .NET's XslTransform class so I thought I'd give the MSXML object's a whirl. The question I haven't been able to find in these groups is can I use C# extension functions with the MSXML objects? More specifically to use a C# class which has all my extension functions. I've seen examples where the stylesheet uses the <msxsl:script> element and embeds C# code, but that's not a viable solution...
4
7236
by: Mathew | last post by:
Hi, I've got a problem and I haven't found any solution in the web till now. I'm using MSXML4.0SP2 with VC6 creating large XML files. The (only) problem I've got is the not-existing release of memory. My app allocs more and more memory and gives no back. I've build a small code part explaining my problem: CoInitialize(NULL);
1
1211
by: Kent | last post by:
I was wondering if there are direct equivelents in .NET to the objects provided by MSXML 4.0 dll. For example I need to send and recieve XML documents from an asp page. The example I was given uses these objects. MSXML2.FreeThreadedDOMDocumen MSXML2.ServerXMLHTT I know I can still used the MSXML 4.0 dll but I would like to do this strictly using .NET objects Any help would be greatly appreciated Thanks
0
860
by: Kent | last post by:
I was wondering if there are equivelents in .NET to the objects provided by MSXML 4.0 dll. For example I need to send and recieve XML documents from an asp page. The example I was given uses these objects. MSXML2.FreeThreadedDOMDocumen MSXML2.ServerXMLHTT I know I can still used the MSXML 4.0 dll but I would like to do this strictly using .NET objects Any help would be greatly appreciated Thanks
3
70178
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
13
25204
by: yawnmoth | last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP. If my understanding is correct, the different numbers refer to the version of Microsoft's XML parser and that Microsoft.XMLHTTP refers to the latest installed version. This makes me wonder why sites like <http://developer.apple.com/internet/webcontent/xmlhttpreq.htmlopt to use Msxml2.XMLHTTP, first, and...
3
3542
by: balakrishnan.dinesh | last post by:
hi frnds How to determine the version of the MSXML installed on a computer and How to determine the version of the MSXML used by Internet Explorer through javascript code. Can anyone say me , Is there any way to find this thing ? Waiting for ur quick response
7
1779
by: Edward | last post by:
Hello: I need to dynamically include documents stored in my own website. The website is coded in ASP. As far as I know there are two common options: FSO and the MSXML Objects. Which one of the two would be less of a resource hog for IIS ? Keep in mind that the documetns I want to include are stored in the server where the website resides, not on another webserver. Otherwise I'd have no choice but to use msxml.
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.