Hi Jens,
"Jens Heinrich" <> wrote in message
news:be9meq$g89$07$...
> I have some problem.
> The document() Function with fix parameter works very well:
>
> <xsl:value-of select="document('test.xml')//Name/FirstName"/>
>
> ...but I have the path of the context node and want to set this path
> dynamicly to this
> function.
> The path are saved in the variable xpath.
>
> I want to build some statement like:
> <xsl:value-of select="document('test.xml') + $xpath"/> (perhaps, the
> "+"doesn't work)
> to get the value of the node.
>
> <xsl:value-of select="document(('test.xml'),$xpath) "/> doesn't work.
>
Firstly, this has nothing to do with the document() function really.
None of what you are trying will work - there is no syntax for doing this
because it cannot be done in XSLT+XPath. IOW, XSLT and XPath cannot macro
evaluate a string as an XPath expression.
However, some transformation engines do have extension functions that might
enable you to do this (e.g. the evaluate() extension function in some
engines) - but of course this makes the XSLT code less portable.
Cheers
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator