XSL怎样获取属性名称为变量的属性
<script language="javascript" type="text/javascript">
<xsl:variable name="proCount" select="count(@*[starts-with(name(),'a')])"/>
proCount = "<xsl:value-of select="$proCount"/>";
<![CDATA[
for(i = 1; i <= proCount; i++)
{
priName = "a"+i;
]]>
sss = "<xsl:value-of select="priName" />";
alert(sss);
<![CDATA[
}
]]>
</script>
priName为变量!这样写不行!要怎么写啊!
[解决办法]
arr = [ <xsl:for-each select="//note/@*[starts-with(name(),'a')]">'<xsl:value-of select="."/>'<xsl:if test="position()!=count(//note/@*[starts-with(name(),'a')])">,</xsl:if></xsl:for-each> ];