Variables 在xslt中连接字符串和变量
我想参数化一个DB连接字符串。 如何将此Variables 在xslt中连接字符串和变量,variables,xslt,concat,Variables,Xslt,Concat,我想参数化一个DB连接字符串。 如何将此DBSchema变量转换为cs字符串的其余部分 <xsl:variable name="DBSchema" select="'sa'" /> 我试过: <xsl:variable name="ConnectionString" select="concat('Data Source=SIS025;Persist Security Info=True;User ID=$DBSchema;Password=system')" />
DBSchema
变量转换为cs字符串的其余部分
<xsl:variable name="DBSchema" select="'sa'" />
我试过:
<xsl:variable name="ConnectionString" select="concat('Data Source=SIS025;Persist Security Info=True;User ID=$DBSchema;Password=system')" />
<xsl:variable name="ConnectionString" select="concat('Data Source=SIS025;Persist Security Info=True;User ID=',DBSchema,';Password=system')" />
<xsl:variable name="ConnectionString" select="concat('Data Source=SIS025;Persist Security Info=True;User ID=',$DBSchema,';Password=system')" />
他们两个都不工作。欢迎任何意见 我想你的意思是:
<xsl:variable name="ConnectionString" select="concat('Data Source=SIS025;Persist Security Info=True;User ID=', $DBSchema, ';Password=system')" />
谢谢,是的,这是正确的,这是我在我的第三次尝试。问题出在另一个地方,他不能用concat读取字符串。但这不是这个问题的必要条件。我应该早点调查。
Data Source=SIS025;Persist Security Info=True;User ID=sa;Password=system