Example #1
0
 /// <summary>
 /// Add parameters to a transform
 /// </summary>
 /// <param name="parameterList"></param>
 /// <param name="xslProc"></param>
 private void AddParameters(XMLUtilities.XSLParameter[] parameterList)
 {
     if (parameterList != null)
     {
         foreach (XMLUtilities.XSLParameter rParam in parameterList)
         {
             // Following is a specially recognized parameter name
             if (rParam.Name == "prmSDateTime")
             {
                 m_xslProc.addParameter(rParam.Name, XMLUtilities.GetCurrentDateTime(CultureToUse), "");
             }
             else
             {
                 m_xslProc.addParameter(rParam.Name, rParam.Value, "");
             }
         }
     }
 }
 private void AddParameters(out XsltArgumentList args, XMLUtilities.XSLParameter[] parameterList)
 {
     args = new XsltArgumentList();
     if (parameterList != null)
     {
         foreach (XMLUtilities.XSLParameter rParam in parameterList)
         {
             // Following is a specially recognized parameter name
             if (rParam.Name == "prmSDateTime")
             {
                 args.AddParam(rParam.Name, "", XMLUtilities.GetCurrentDateTime(CultureToUse));
             }
             else
             {
                 args.AddParam(rParam.Name, "", rParam.Value);
             }
         }
     }
 }
        /// <summary>
        /// Add parameters to a transform
        /// </summary>
        /// <param name="parameterList"></param>
        /// <param name="xslProc"></param>
        private void AddParameters(XMLUtilities.XSLParameter[] parameterList)
        {
            if (parameterList != null)
            {
                foreach (XMLUtilities.XSLParameter rParam in parameterList)
                {
                    var parameterName = new QName(rParam.Name);

                    // Following is a specially recognized parameter name
                    if (rParam.Name == "prmSDateTime")
                    {
                        var parameterValue = new XdmAtomicValue((new QName(XMLUtilities.GetCurrentDateTime(CultureToUse))));
                        m_transformer.SetParameter(parameterName, parameterValue);
                    }
                    else
                    {
                        var parameterValue = new XdmAtomicValue((new QName(rParam.Value)));
                        m_transformer.SetParameter(parameterName, parameterValue);
                    }
                }
            }
        }