Hi,
I have been working on a larger issue and have narrowed down the issue to a very small one.
I have a variable called $data_path. I am trying to read a document called mydata.xml which looks like.
<root>
<a>Hello world</a>
</root>
the $data_path variable contains the string "/root/a" (this can be tweaked if needed).
How do I read the Hello World string from the file. I am trying to do something like
<xsl:variable name="new" select="document('mydata.xml')$data_path"/>
but this does not quite work. If I replace this with the string
<xsl:variable name="new" select="document('mydata.xml')/root/a"/>
it works fine. Now just to get it to work with the variable.
Thanks,
I have been working on a larger issue and have narrowed down the issue to a very small one.
I have a variable called $data_path. I am trying to read a document called mydata.xml which looks like.
<root>
<a>Hello world</a>
</root>
the $data_path variable contains the string "/root/a" (this can be tweaked if needed).
How do I read the Hello World string from the file. I am trying to do something like
<xsl:variable name="new" select="document('mydata.xml')$data_path"/>
but this does not quite work. If I replace this with the string
<xsl:variable name="new" select="document('mydata.xml')/root/a"/>
it works fine. Now just to get it to work with the variable.
Thanks,