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

Home Posts Topics Members FAQ

XSLCompiledTrns form and msxml:script

2 New Member
HI All,
For certain perfomance improvements , my project needs to migrate from using the XSLTransform class to the XSLCompiledTrns form 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 2064
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 checkPrevIsEqua l(oNode,sFieldN ame,sCondition) {

if (oNode.item(0). selectSingleNod e("Field[@name='" + sFieldName + "']") == null)
return false;
var sCurr = oNode.item(0).s electSingleNode ("Field[@name='" + sFieldName + "']").attributes.g etNamedItem("va lue").text;
var i;

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

var sPrev = oNode.item(0).p reviousSibling. selectSingleNod e("Field[@name='" + sFieldName + "']").attributes.g etNamedItem("va lue").text;

if(sCurr.toLowe rCase() == sPrev.toLowerCa se()) {
if(sCondition != '') {
var arr = sCondition.spli t("$#$");
for(i=0;i < arr.length;i++)
{
sCondition = "Field[" + arr[i] + "]";
if( oNode.item(0).p reviousSibling. selectSingleNod e(sCondition) == 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 XSLCompiledTran sform class, it started giving the compilation errors. I could change some part of this function as below.


function checkPrevIsEqua l(oNode,sFieldN ame,sCondition)
{

oNode.MoveNext( )
var thisNode = oNode.Current.U nderlyingObject ;



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

if(thisNode.pre viousSibling == null)
return false;

var sPrev = thisNode.previo usSibling .SelectSingleNo de["Field[@name='" + sFieldName + "']"].Attributes["value"].Value;

if(sCurr.toLowe rCase() == sPrev.toLowerCa se()) {
if(sCondition != '') {
var arr = sCondition.spli t("$#$");
for(i=0;i < arr.length;i++)
{
sCondition = "Field[" + arr[i] + "]";
if( thisNode.previo usSibling.selec tSingleNode[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.Ne xtSibling == 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
3088
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 TYPE="TypeLib" NAME="Microsoft XML, v4.0" UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"--> But when I write the following code in an ASP server-side JavaScript:
7
5058
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 example, the user make a choice by clicking on an item called 20050928, and as a result a file named "20050928/case.js" is "included", and the data contained within is available.
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...
3
3638
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 getting JS1135 errors saying that some variable was not declared. This scripts worked perfectly with MSXML4. Is there a guide for migraiton from MSXML to .NET or can you just give me some tips on how to resolve this issues without having to change...
3
1492
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 something like: dim xslTrans as System.Xml.Xsl.Xsltransform
11
2356
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 didnt get anything out of them. MSXML doesnt works with some keywords and consider some letters as operator so i cant go with MSXML. i tried MSHTML but it doesnt provide any way to parse the HTML data you got from other source. there is a...
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
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
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...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4306
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.
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.