diff --git a/src/transform/apply-gen.xsl b/src/transform/apply-gen.xsl
index adf5401..c194593 100644
--- a/src/transform/apply-gen.xsl
+++ b/src/transform/apply-gen.xsl
@@ -32,6 +32,7 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:f="http://www.lovullo.com/hoxsl/apply"
+ xmlns:_f="http://www.lovullo.com/hoxsl/apply/_priv"
xmlns:fgen="http://www.lovullo.com/hoxsl/apply/gen"
xmlns:out="http://www.lovullo.com/hoxsl/apply/gen/_out"
exclude-result-prefixes="#default fgen">
@@ -147,10 +148,15 @@
@@ -161,15 +167,42 @@
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -187,7 +220,7 @@
-
-
-
+
-
-
-
-
-
-
-
-
- ,
-
- $arg
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+
+ $arg
+
+
+
+
+
+
+
+
diff --git a/test/transform/apply-gen-test-in.xsl b/test/transform/apply-gen-test-in.xsl
index 72a64af..631ee0a 100644
--- a/test/transform/apply-gen-test-in.xsl
+++ b/test/transform/apply-gen-test-in.xsl
@@ -41,4 +41,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/transform/apply-gen.xspec b/test/transform/apply-gen.xspec
index 151731c..ad8dfca 100644
--- a/test/transform/apply-gen.xspec
+++ b/test/transform/apply-gen.xspec
@@ -26,6 +26,20 @@
xmlns:foo="http://www.lovullo.com/_junk"
stylesheet="apply-gen-test.xsl">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -218,5 +232,203 @@
select="2" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+