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