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 ,,