I get an "Invalid XPath Expression" error when using the code below.
I have a file as a variable and an xpath as a variable. I want to select an element from from the file using $FILE2/$xpath. How else can I do this?
(ignore the space between <xsl: and param, it shows a smiley if they are together)
THANKS!
...
<xsl: param name="XML_FILE">file.xml</xsl: param>
<xsl:variable name="FILE1" select="/"/>
<xsl:variable name="FILE2" select="document($XML_FILE)"/>
<xsl:variable name="xpath">/A/B/C</xsl:variable>
<xsl:template match="/">
...
<xsl:variable name="FoundXMLElement" select="$FILE2/$xpath"/>
...
</xsl:template>
....
I have a file as a variable and an xpath as a variable. I want to select an element from from the file using $FILE2/$xpath. How else can I do this?
(ignore the space between <xsl: and param, it shows a smiley if they are together)
THANKS!
...
<xsl: param name="XML_FILE">file.xml</xsl: param>
<xsl:variable name="FILE1" select="/"/>
<xsl:variable name="FILE2" select="document($XML_FILE)"/>
<xsl:variable name="xpath">/A/B/C</xsl:variable>
<xsl:template match="/">
...
<xsl:variable name="FoundXMLElement" select="$FILE2/$xpath"/>
...
</xsl:template>
....