Re: [xsl] dynamic document() template problem

Subject: Re: [xsl] dynamic document() template problem
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Mon, 20 Jun 2005 22:00:53 +0200
Arian Hojat wrote:
select="document(@href)/Document/{@nodes}"/>

You seem to expect some sort of macro substitution: {@nodes} -> fb/section1/* and the reevaluate the expression. XSLT/XPath doesn't work this way.

It seems you have to use Saxon's extension function for evaluating
strings as XPath expression, roughly like
 select="saxon:evaluate(concat('document(@href)/Document/',@nodes))"
Note string concatenation.
Please check your Saxon docs for the exact name of the extension
function and and the namespace declaration you need.

J.Pietschmann

Current Thread