473,503 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLCompiledTrnsform and msxml:script

2 New Member
HI All,
For certain perfomance improvements , my project needs to migrate from using the XSLTransform class to the XSLCompiledTrnsform Class for xsl transformations.
This migration requires many changes in functions that are written inside the msxml:script block. We are facing many syntactical problems while rewritting those functions.
Anybody knows any possible way to avoid such rewriting of the msxml:script functions.
Any help will be appriciated. Thanks a lot in advance.
Apr 14 '08 #1
3 2060
pronerd
392 Recognized Expert Contributor
Since your question relates to a programing language instead of XML it would be better to post your question in a forum that covers that topic.
Apr 14 '08 #2
jkmyoung
2,057 Recognized Expert Top Contributor
Could you provide an example of the type of functions you intend to transfer? What language are the scripts using? Are they consistent.
Apr 14 '08 #3
AmolPalve
2 New Member
Could you provide an example of the type of functions you intend to transfer? What language are the scripts using? Are they consistent.
Thanks for the quick reply. Here is the function that has the issue.
function checkPrevIsEqual(oNode,sFieldName,sCondition) {

if (oNode.item(0).selectSingleNode("Field[@name='" + sFieldName + "']") == null)
return false;
var sCurr = oNode.item(0).selectSingleNode("Field[@name='" + sFieldName + "']").attributes.getNamedItem("value").text;
var i;

if(oNode.item(0).previousSibling == null)
return false;

var sPrev = oNode.item(0).previousSibling.selectSingleNode("Fi eld[@name='" + sFieldName + "']").attributes.getNamedItem("value").text;

if(sCurr.toLowerCase() == sPrev.toLowerCase()) {
if(sCondition != '') {
var arr = sCondition.split("$#$");
for(i=0;i < arr.length;i++)
{
sCondition = "Field[" + arr[i] + "]";
if( oNode.item(0).previousSibling.selectSingleNode(sCo ndition) == null)
return false;
}
return true;
}
else
return true;
}
else
return false;

}


This function is called from the xsl stylesheet. If I use XSLTransform class for transformation then it works fine, but when I migrated to the XSLCompiledTransform class, it started giving the compilation errors. I could change some part of this function as below.


function checkPrevIsEqual(oNode,sFieldName,sCondition)
{

oNode.MoveNext()
var thisNode = oNode.Current.UnderlyingObject;



if( thisNode.SelectSingleNode["Field[@name='" + sFieldName + "']"] == null)
return false;
var sCurr = thisNode.SelectSingleNode["Field[@name='" + sFieldName + "']"].Attributes["value"].Value;
var i;

if(thisNode.previousSibling == null)
return false;

var sPrev = thisNode.previousSibling .SelectSingleNode["Field[@name='" + sFieldName + "']"].Attributes["value"].Value;

if(sCurr.toLowerCase() == sPrev.toLowerCase()) {
if(sCondition != '') {
var arr = sCondition.split("$#$");
for(i=0;i < arr.length;i++)
{
sCondition = "Field[" + arr[i] + "]";
if( thisNode.previousSibling.selectSingleNode[sCondition] == null)
return false;
}
return true;
}
else
return true;
}
else
return false;

}

The changes marked in bold are working and giving the expected values. but when it comes to the code line "if(thisNode.NextSibling == null)" it gives error like object doesn't support this property.

thanks ,,
Apr 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
3075
by: Vince C. | last post by:
Hi, I've created a web application with Visual Interdev and I've added Microsoft XML, version 4 in project's references. A META tag has been successfully added in global.asa: <!--METADATA...
7
5036
by: cjl | last post by:
Hey all: I've searched the newsgroup, and googled, but I'm stuck. I want to be able to 'dynamically' add a .js file to a web page after the page has loaded, based on user interaction. For...
6
6242
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#...
3
3625
by: Eugen Gulinsky | last post by:
Hello guys, I am having problems trying to migrate our MSXML4-compatible stylesheets containing large msxsl:script blocks to a formate understandable by System.Xml:Xsl.XslTransform. I keep...
3
1476
by: steve_h | last post by:
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="myObject.someMethod(arg1)" /> having done...
11
2344
by: Lucky | last post by:
hi guys, i need to parse html data that i've got from "Inet" object in vb6. now i want to prase the html data. here i got 2 options. one is MSXML and other is MSHTML. i tried both of them but i...
3
70129
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
13
25070
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...
3
3533
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 ,...
0
7287
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,...
0
7353
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...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
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...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3180
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.