Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 比较XSL中的动态驱动值_C#_Asp.net_Xslt - Fatal编程技术网

C# 比较XSL中的动态驱动值

C# 比较XSL中的动态驱动值,c#,asp.net,xslt,C#,Asp.net,Xslt,我正在使用XSLt转换表和XML数据以显示在UI页面中,这是我的问题 <xsl:variable name="Work to do" select="DocumentElement/Working[(worktype='wash' or worktype='clean' worktype='sweep') and (attendance= 'Present' or attendance = 'permit')]"></xsl:variable> public stri

我正在使用XSLt转换表和XML数据以显示在UI页面中,这是我的问题

<xsl:variable name="Work to do" select="DocumentElement/Working[(worktype='wash' or worktype='clean' worktype='sweep') and (attendance= 'Present' or attendance = 'permit')]"></xsl:variable>

 public string milestonebugstype()
    {
        string ms_bugtype;
        string msbugs = CommonHelper.Getmilestonebug();
        string[] milestonebugs = msbugs.Split(',');
        List<string> milestone_bugs = new List<string>();
        foreach (string milestonebugtype in milestonebugs)
        {
            milestone_bugs.Add("task_type=" + "'" + milestonebugtype + "'");
        }
        ms_bugtype = string.Join(" or ", milestone_bugs.ToArray());
        return ms_bugtype;
    }
  string milestone_bugs = milestonebugtype();
  outputXml += "<WorkType>"+milestone_bugs+"</WorkType>";

 <xsl:variable name="Works" select="documentelement/worktype"></xsl:variable>
 <xsl:variable name="Work to do" select="DocumentElement/Working[($works) and (attendance= 'Present' or attendance = 'permit')]">   </xsl:variable>

公共字符串milestonebugstype()
{
字符串ms_bugtype;
字符串msbugs=CommonHelper.Getmilestonebug();
字符串[]milestonebugs=msbugs.Split(',');
列表里程碑_bugs=新列表();
foreach(字符串milestonebugs,以milestonebugs表示)
{
添加(“任务类型=“+””“+milestonebugtype+””);
}
ms_bugtype=string.Join(“or”,里程碑_bugs.ToArray());
返回ms_bugtype;
}
字符串里程碑_bugs=milestonebugtype();
outputXml+=“”+milestone_-bugs+“”;

我想从我检索数据但不知道如何使用XSL的数据库中具体化worktype='wash'或worktype='clean'worktype='sweep'。这里的工作类型取自表,我想通过XML动态加载“wash”和“clean”。请帮助我在一个旧的c#项目中传递参数xslcomiledtransform.Transform。我将简单类型作为字符串传递

请向我们展示一个XML输入示例,并指出您要使用的“动态”值的位置。请看:我已经更新了上面的代码。请看