2015-05-06 79 views
-1
<xsl:variable name="columnIndex1"> 
    <xsl:value-of select="position()+1"/> 
</xsl:variable> 

<xsl:variable name="var5" select="/mxRoot/columns/column[($columnIndex1)]/settings/setting[@name='Show Function']" /> 
    javascript:link("<xsl:value-of select="@index"/>","<xsl:value-of select="$oid"/>","<xsl:value-of select="$relId"/>","<xsl:value-of select="$parentId"/>","<xsl:value-of select="$parentId"/>","<xsl:value-of select="$var5"/>") 
</xsl:variable> 

在這種VAR5只得到總是第一個指數,沒有得到動態索引XSL動態索引

+0

根本的問題是一樣的,在問題http://stackoverflow.com/questions/29823166/xslt-1-0-extract-sequential-infromation-from-external-document/ – potame

回答

0

嘗試設置你的變量是這樣的:

<xsl:variable name="columnIndex1" select="position()+1"/>