Bonjour,
le code suivant ne fonctionne pas :
<xsl:variable name = "input" >
<xsl:value-of select = "document('mdh2IsamiInputSample.xml')" />
</xsl:variable>
<xsl:template match="@value">
<xsl:variable name = "current" >
<xsl:value-of select = "." />
</xsl:variable>
<xsl:choose >
<xsl:when test = "starts-with($current,'mdhpath:')" >
<xsl:variable name = "mdhxpath" >
<xsl:value-of select = "substring-after($current,'mdhpath:')" />
</xsl:variable>
<xsl:attribute name="value"><xsl:value-of select = "$input/$mdhxpath"/></xsl:attribute>
</xsl:when>
<xsl:otherwise >
<xsl:attribute name="value"><xsl:value-of select = "$current" /></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
mdhxpath est la représentation format string d'une partie d'un xpath.
Quelqu'un peut-il m'aider ?
Thanks
Partager