Subject: [xsl] AW: Accessing values in a node-set using XPATH From: "Klunzinger, Dagmar" <Dagmar.Klunzinger@xxxxxxxxxxxxx> Date: Tue, 11 Nov 2008 11:38:30 +0100 |
Hello, I would like to display only the values of an XML that are configured in a separate Configuration file. As the data is structured it makes sense to access the data using an XPATH. This can be done using dyn:evaluate() like in the example below. <xsl:template name="print"> <xsl:param name="pos"/> <xsl:variable name="xpath"> <xsl:value-of select="document('config-szenario.xml')/config/Line/field[position() = $pos]"/> </xsl:variable> <xsl:if test="$xpath"> <xsl:variable name="valueofxpath"> <xsl:value-of select="dyn:evaluate($xpath)"/> </xsl:variable> <td> <xsl:value-of select="$valueofxpath"/> </td> <xsl:call-template name="print"> <xsl:with-param name="pos" select="$pos + 1"/> </xsl:call-template> </xsl:if> </xsl:template> However is there a possibility to perform this also on a nodeset? I would like to pass a variable (e.g. comparing) and then call dyn:evaluate like shown below. However it raises an error. It this somehow possible? <xsl:value-of select="dyn:evaluate($comparing/$xpath)"/> Thank you in advance Dagmar
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Entities, David Carlisle | Thread | RE: [xsl] AW: Accessing values in a, Michael Kay |
RE: [xsl] Entities, Michael Kay | Date | Re: [xsl] Entities, Andrew Welch |
Month |