这是我的xslt文档的一段,我用户点击文章标题(title)时会弹出文章详情的网页,但需要传该文章的ID值<A href="ProduceShow_Item.aspx?ID=">,不知道该将<xsl:value-of select="ID"/>如何处理,请赐教:
<A href="ProduceShow_Item.aspx?ID=" target="_black" style="left: 10px;position: relative;FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: 宋体"><xsl:value-of select="title"/></A>

解决方案 »

  1.   

    两种方法试一下吧,很久没写xls,也不确定有没有写错<A target="_black" style="left: 10px;position: relative;FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: 宋体"><xsl:attribute name="href">ProduceShow_Item.aspx?ID=<xsl:value-of select="ID" /></xsl:attribute><xsl:value-of select="title"/></A><A target="_black" style="left: 10px;position: relative;FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: 宋体"><xsl:attribute name="href"><xsl:value-of select="concat('ProduceShow_Item.aspx?ID=' + ID)" /></xsl:attribute><xsl:value-of select="title"/></A>
      

  2.   

    there is another way in XSLT: attribute value template<A href="ProduceShow_Item.aspx?ID={ID}" target="_black" style="left: 10px;position: relative;FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: 宋体"><xsl:value-of select="title"/></A>