private static void CheckParameterNameValue(XMLUtilities.XSLParameter parameter, string sExpectedName, string sExpectedValue, string sMessage)
        {
            string sName = parameter.Name;

            Assert.AreEqual(sExpectedName, sName, sMessage + " name");
            string sValue = parameter.Value;

            Assert.AreEqual(sExpectedValue, sValue, sMessage + " value");
        }
Exemple #2
0
        private XMLUtilities.XSLParameter[] GetTransformParameters()
        {
            XMLUtilities.XSLParameter[] parameterList = new XMLUtilities.XSLParameter[5];
            parameterList[0] = new XMLUtilities.XSLParameter("prmLangAbbr", m_sLanguageAbbreviation);
            parameterList[1] = new XMLUtilities.XSLParameter("prmRtlScript", m_fRightToLeftScript.ToString());
            parameterList[2] = new XMLUtilities.XSLParameter("prmInstallPath", ConfigurationPath + "/");
            string sStylesheet = GetStyleSheet();

            parameterList[3] = new XMLUtilities.XSLParameter("prmStylesheet", sStylesheet);
            parameterList[4] = new XMLUtilities.XSLParameter("prmWorkingPath", m_sHtmsPath.Replace("\\", "/") + "/");
            return(parameterList);
        }
        private XMLUtilities.XSLParameter[] CreateParametersFromXsltParametersNode(XmlNode node)
        {
            if (node == null)
            {
                return(null);
            }
            int iParameterCount = node.SelectNodes("param").Count;

            XMLUtilities.XSLParameter[] parameters = new XMLUtilities.XSLParameter[iParameterCount];
            for (int i = 0; i < iParameterCount; i++)
            {
                XmlNode paramNode            = node.SelectSingleNode("param[" + (i + 1).ToString() + "]");
                string  sName                = XmlUtils.GetManditoryAttributeValue(paramNode, "name");
                string  sValue               = XmlUtils.GetOptionalAttributeValue(paramNode, "value");
                string  sValueFromAnswerFile = GetResultFromAnswerFile(paramNode, "valueFromAnswerFile");
                if (sValueFromAnswerFile != null)
                {
                    sValue = sValueFromAnswerFile;
                }
                parameters[i] = new XMLUtilities.XSLParameter(sName, sValue);
            }
            return(parameters);
        }
Exemple #4
0
 private XMLUtilities.XSLParameter[] GetTransformParameters()
 {
     XMLUtilities.XSLParameter[] parameterList = new XMLUtilities.XSLParameter[5];
     parameterList[0] = new XMLUtilities.XSLParameter("prmLangAbbr", m_sLanguageAbbreviation);
     parameterList[1] = new XMLUtilities.XSLParameter("prmRtlScript", m_fRightToLeftScript.ToString());
     parameterList[2] = new XMLUtilities.XSLParameter("prmInstallPath", ConfigurationPath + "/");
     string sStylesheet = GetStyleSheet();
     parameterList[3] = new XMLUtilities.XSLParameter("prmStylesheet", sStylesheet);
     parameterList[4] = new XMLUtilities.XSLParameter("prmWorkingPath", m_sHtmsPath.Replace("\\","/") + "/");
     return parameterList;
 }
 private XMLUtilities.XSLParameter[] CreateParametersFromXsltParametersNode(XmlNode node)
 {
     if (node == null)
     {
         return null;
     }
     int iParameterCount = node.SelectNodes("param").Count;
     XMLUtilities.XSLParameter[] parameters = new XMLUtilities.XSLParameter[iParameterCount];
     for (int i = 0; i < iParameterCount; i++)
     {
         XmlNode paramNode = node.SelectSingleNode("param[" + (i+1).ToString() + "]");
         string sName = XmlUtils.GetManditoryAttributeValue(paramNode, "name");
         string sValue = XmlUtils.GetOptionalAttributeValue(paramNode, "value");
         string sValueFromAnswerFile = GetResultFromAnswerFile(paramNode, "valueFromAnswerFile");
         if (sValueFromAnswerFile != null)
             sValue = sValueFromAnswerFile;
         parameters[i] = new XMLUtilities.XSLParameter(sName, sValue);
     }
     return parameters;
 }