diff --git a/xproc/src/main/xml/specification.xml b/xproc/src/main/xml/specification.xml
index c486b48d0..2e156df07 100644
--- a/xproc/src/main/xml/specification.xml
+++ b/xproc/src/main/xml/specification.xml
@@ -3578,10 +3578,17 @@ library must have unique names: it is a
static error if any static option name is
declared more than once in the same scope.
-
+
+
+Scoping of imported function names
+
+The scope of function names imported with p:import-functions is
+limited to expressions that appear in elements and attributes that follow the
+p:import-function element, in document order, in the pipeline
+document.
+
+
-
-
Base URIs and xml:base
@@ -6706,11 +6713,13 @@ L2 contains a step C, then:
-p:import-functions
+
+p:import-functionsAn p:import-functions element identifies a library of externally
defined functions to be imported into the pipeline. After the functions have been
-imported, they are available in the processor XPath context.
+imported, they are available in the
+processor XPath context.
@@ -6744,6 +6753,10 @@ in those namespaces will be loaded.
+Imported functions are loaded during static analysis. In particular,
+they can be used in [p:]use-when expressions and in
+expressions that initialize static options.
+
The ability to import functions is optional. Whether or not a processor
can import functions, and if it can, what kinds of function libraries it can import
from is implementation-defined. Pipeline authors can
@@ -6771,7 +6784,6 @@ arity). It is a static error if a fun
imported from a library has the same name and arity as a function already imported.
-
diff --git a/xproc/src/main/xml/xpath-context.xml b/xproc/src/main/xml/xpath-context.xml
index 593ee0394..586383ad0 100644
--- a/xproc/src/main/xml/xpath-context.xml
+++ b/xproc/src/main/xml/xpath-context.xml
@@ -111,7 +111,8 @@ recent bindings are visible.
The signatures of the in namespaces http://www.w3.org/2005/xpath-functions,
http://www.w3.org/2005/xpath-functions/math, http://www.w3.org/2005/xpath-functions/map and
http://www.w3.org/2005/xpath-functions/array. Additionally the function signatures defined in .
+ linkend="xpath-extension-functions"/>. If a pipeline loads external functions
+with p:import-functions those are available within their scope.