From this XML source :
Owen,
your solution making use of dyn:evaluate>() is fine, but does not work in browsers, see here:
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201008/msg00126.html
The problem with what you've got: ... is that it assumes elementName is only a single element's name. If it's an arbitrary XPath expression, the test will fail.
Dimitrie's solution was not for general XPath parsing, and the handling
of more than one node can simply be added to his solution by adding
s, see the diff below:
$ diff -u x.xsl y.xsl
--- x.xsl 2010-08-13 14:53:42.000000000 +0200
+++ y.xsl 2010-08-14 11:59:42.000000000 +0200
@@ -40,15 +40,19 @@
-
+
+
+
+
+ "."/>
+
$