diff --git a/build.gradle b/build.gradle
index f5d1de7be..e5f29da18 100644
--- a/build.gradle
+++ b/build.gradle
@@ -132,7 +132,8 @@ spec_schemas.dependsOn download_core30_rng
def schemaList = ["xproc.rnc", "xproc.rng",
"xproc10.rnc", "xproc10.rng",
- "xproc30.rnc", "xproc30.rng"]
+ "xproc30.rnc", "xproc30.rng",
+ "xproc31.rnc", "xproc31.rng"]
schemaList.each { schema ->
def taskname = "download_" + schema.replace(".", "_")
@@ -324,6 +325,7 @@ task xproc_assets(dependsOn: [ "xproc:images", "xproc_web_assets", "xproc_schema
include "xproc.rn*"
include "xproc10.rn*"
include "xproc30.rn*"
+ include "xproc31.rn*"
}
}
}
diff --git a/src/main/xml/bibliography.xml b/src/main/xml/bibliography.xml
index 817bca776..ba0a477b6 100644
--- a/src/main/xml/bibliography.xml
+++ b/src/main/xml/bibliography.xml
@@ -31,6 +31,12 @@ Step Library.
Norman Walsh, Achim Berndzen, Gerrit Imsieke and Erik Siegel, editors.
+Steps 3.1
+XProc 3.1: Standard
+Step Library.
+Norman Walsh, Achim Berndzen, Gerrit Imsieke and Erik Siegel, editors.
+
+
XProc 3.0 StepsXProc 3.0 Steps:
An Introduction.
diff --git a/tools/xsl/rngsyntax.xsl b/tools/xsl/rngsyntax.xsl
index 3074d601d..3852868ce 100644
--- a/tools/xsl/rngsyntax.xsl
+++ b/tools/xsl/rngsyntax.xsl
@@ -251,10 +251,10 @@
-
+
diff --git a/xproc/src/main/examples/choose.xml b/xproc/src/main/examples/choose.xml
index 6e83e6239..947fa7606 100644
--- a/xproc/src/main/examples/choose.xml
+++ b/xproc/src/main/examples/choose.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/doctemp-1.xml b/xproc/src/main/examples/doctemp-1.xml
index d93833640..9cd9c7a3d 100644
--- a/xproc/src/main/examples/doctemp-1.xml
+++ b/xproc/src/main/examples/doctemp-1.xml
@@ -1,6 +1,6 @@
+ name="main" version="3.1">
diff --git a/xproc/src/main/examples/doctemp-2.xml b/xproc/src/main/examples/doctemp-2.xml
index 121c6c350..103cde44d 100644
--- a/xproc/src/main/examples/doctemp-2.xml
+++ b/xproc/src/main/examples/doctemp-2.xml
@@ -1,6 +1,6 @@
+ name="main" version="3.1">
diff --git a/xproc/src/main/examples/doctemp-3.xml b/xproc/src/main/examples/doctemp-3.xml
index 70c08f52c..58dae9050 100644
--- a/xproc/src/main/examples/doctemp-3.xml
+++ b/xproc/src/main/examples/doctemp-3.xml
@@ -1,5 +1,5 @@
+ name="main" version="3.1">
diff --git a/xproc/src/main/examples/exclude-pfx.xml b/xproc/src/main/examples/exclude-pfx.xml
index c436bd4ae..156192f7c 100644
--- a/xproc/src/main/examples/exclude-pfx.xml
+++ b/xproc/src/main/examples/exclude-pfx.xml
@@ -1,6 +1,6 @@
+ version="3.1">
+ version="3.1">
diff --git a/xproc/src/main/examples/fig1.xml b/xproc/src/main/examples/fig1.xml
index ce963cd6a..a2aed6283 100644
--- a/xproc/src/main/examples/fig1.xml
+++ b/xproc/src/main/examples/fig1.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/fig2.xml b/xproc/src/main/examples/fig2.xml
index 62761e39f..34bafc9a9 100644
--- a/xproc/src/main/examples/fig2.xml
+++ b/xproc/src/main/examples/fig2.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/for-each.xml b/xproc/src/main/examples/for-each.xml
index b6fdf4f30..a1a8e75ed 100644
--- a/xproc/src/main/examples/for-each.xml
+++ b/xproc/src/main/examples/for-each.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/group.xml b/xproc/src/main/examples/group.xml
index 584121f8c..1590e217a 100644
--- a/xproc/src/main/examples/group.xml
+++ b/xproc/src/main/examples/group.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/identity.xml b/xproc/src/main/examples/identity.xml
index f3d94026a..c79f0203b 100644
--- a/xproc/src/main/examples/identity.xml
+++ b/xproc/src/main/examples/identity.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/xproc/src/main/examples/input-doc.xml b/xproc/src/main/examples/input-doc.xml
index 170b48893..58075fb7d 100644
--- a/xproc/src/main/examples/input-doc.xml
+++ b/xproc/src/main/examples/input-doc.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/xproc/src/main/examples/input-select.xml b/xproc/src/main/examples/input-select.xml
index 309700de5..5e61e496a 100644
--- a/xproc/src/main/examples/input-select.xml
+++ b/xproc/src/main/examples/input-select.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/xproc/src/main/examples/opns-2.xml b/xproc/src/main/examples/opns-2.xml
index f178232a4..0e61ccb13 100644
--- a/xproc/src/main/examples/opns-2.xml
+++ b/xproc/src/main/examples/opns-2.xml
@@ -1,7 +1,7 @@
+ type="ex:delete-in-div" version="3.1">
diff --git a/xproc/src/main/examples/par1.xml b/xproc/src/main/examples/par1.xml
index 8b40674c8..6e336985d 100644
--- a/xproc/src/main/examples/par1.xml
+++ b/xproc/src/main/examples/par1.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/par1b.xml b/xproc/src/main/examples/par1b.xml
index d08741fbc..9ff9119f3 100644
--- a/xproc/src/main/examples/par1b.xml
+++ b/xproc/src/main/examples/par1b.xml
@@ -1,5 +1,5 @@
+ name="main" version="3.1">
diff --git a/xproc/src/main/examples/parameter.xml b/xproc/src/main/examples/parameter.xml
index c38a9e71c..c38782f3d 100644
--- a/xproc/src/main/examples/parameter.xml
+++ b/xproc/src/main/examples/parameter.xml
@@ -1,5 +1,5 @@
+ name="main" version="3.1">
diff --git a/xproc/src/main/examples/pipeline-library.xml b/xproc/src/main/examples/pipeline-library.xml
index 5d393521a..ca9fcaa50 100644
--- a/xproc/src/main/examples/pipeline-library.xml
+++ b/xproc/src/main/examples/pipeline-library.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/pipeline.xml b/xproc/src/main/examples/pipeline.xml
index 430121804..d86d08389 100644
--- a/xproc/src/main/examples/pipeline.xml
+++ b/xproc/src/main/examples/pipeline.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/shadow.xml b/xproc/src/main/examples/shadow.xml
index 188285686..878f18800 100644
--- a/xproc/src/main/examples/shadow.xml
+++ b/xproc/src/main/examples/shadow.xml
@@ -1,5 +1,5 @@
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.1">
diff --git a/xproc/src/main/examples/simple-default.xml b/xproc/src/main/examples/simple-default.xml
index 3d1961685..638cb0143 100644
--- a/xproc/src/main/examples/simple-default.xml
+++ b/xproc/src/main/examples/simple-default.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/simple-explicit.xml b/xproc/src/main/examples/simple-explicit.xml
index 5ee0115a5..12cd2aa87 100644
--- a/xproc/src/main/examples/simple-explicit.xml
+++ b/xproc/src/main/examples/simple-explicit.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/xproc/src/main/examples/step-types-1.xml b/xproc/src/main/examples/step-types-1.xml
index f14b150cf..dd88bfb63 100644
--- a/xproc/src/main/examples/step-types-1.xml
+++ b/xproc/src/main/examples/step-types-1.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/step-types-2.xml b/xproc/src/main/examples/step-types-2.xml
index f5a848214..9320dcff8 100644
--- a/xproc/src/main/examples/step-types-2.xml
+++ b/xproc/src/main/examples/step-types-2.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/step-types-3.xml b/xproc/src/main/examples/step-types-3.xml
index 0f014da1b..b294fb7d4 100644
--- a/xproc/src/main/examples/step-types-3.xml
+++ b/xproc/src/main/examples/step-types-3.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/step-types-4.xml b/xproc/src/main/examples/step-types-4.xml
index b58b46e52..eb1944ef3 100644
--- a/xproc/src/main/examples/step-types-4.xml
+++ b/xproc/src/main/examples/step-types-4.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/trycatch.xml b/xproc/src/main/examples/trycatch.xml
index ff93e41ae..c81ccf462 100644
--- a/xproc/src/main/examples/trycatch.xml
+++ b/xproc/src/main/examples/trycatch.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/using-names-1.xml b/xproc/src/main/examples/using-names-1.xml
index b0fb2ffaf..07bcc0f81 100644
--- a/xproc/src/main/examples/using-names-1.xml
+++ b/xproc/src/main/examples/using-names-1.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/using-names-2.xml b/xproc/src/main/examples/using-names-2.xml
index 0193311ea..44831f6c4 100644
--- a/xproc/src/main/examples/using-names-2.xml
+++ b/xproc/src/main/examples/using-names-2.xml
@@ -1,4 +1,4 @@
-
diff --git a/xproc/src/main/examples/viewport.xml b/xproc/src/main/examples/viewport.xml
index 60bf92004..f4a799b57 100644
--- a/xproc/src/main/examples/viewport.xml
+++ b/xproc/src/main/examples/viewport.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/xinclude.xml b/xproc/src/main/examples/xinclude.xml
index 903cea2c2..8b642d4cf 100644
--- a/xproc/src/main/examples/xinclude.xml
+++ b/xproc/src/main/examples/xinclude.xml
@@ -1,5 +1,5 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/xpathcontext.xml b/xproc/src/main/examples/xpathcontext.xml
index becd4fe11..8d78fb5ea 100644
--- a/xproc/src/main/examples/xpathcontext.xml
+++ b/xproc/src/main/examples/xpathcontext.xml
@@ -1,5 +1,5 @@
+ xmlns:xp="x" type="xp:x" version="3.1">
diff --git a/xproc/src/main/examples/xslt-empty.xml b/xproc/src/main/examples/xslt-empty.xml
index 84a3635b6..940e5c084 100644
--- a/xproc/src/main/examples/xslt-empty.xml
+++ b/xproc/src/main/examples/xslt-empty.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/examples/xslt.xml b/xproc/src/main/examples/xslt.xml
index 6c6ec8b39..cb257a2e6 100644
--- a/xproc/src/main/examples/xslt.xml
+++ b/xproc/src/main/examples/xslt.xml
@@ -1,6 +1,6 @@
+ version="3.1">
diff --git a/xproc/src/main/xml/ancillary.xml b/xproc/src/main/xml/ancillary.xml
index 50de835db..918281300 100644
--- a/xproc/src/main/xml/ancillary.xml
+++ b/xproc/src/main/xml/ancillary.xml
@@ -9,6 +9,14 @@
ancillary files.
+
+,
+
+A RELAX NG Schema for XProc 3.1 pipelines, in compact or XML form.
+
+
+
+
,
@@ -29,11 +37,11 @@ ancillary files.
, A RELAX NG Schema for XProc pipelines, in compact or XML form.
-It will validate either XProc 1.0 pipelines or XProc 3.0 pipelines,
+It will validate XProc 1.0, 3.0, or 3.1 pipelines,
depending on the value of the version attribute.
-In order to use this schema, you must also download the 1.0 and 3.0
-schemas; they are included into this one.
+In order to use this schema, you must also download the 1.0, 3.0, and 3.1
+schemas; they are included by reference into this one.
diff --git a/xproc/src/main/xml/references.xml b/xproc/src/main/xml/references.xml
index 6aa0633b0..2019c986a 100644
--- a/xproc/src/main/xml/references.xml
+++ b/xproc/src/main/xml/references.xml
@@ -7,7 +7,7 @@
Normative References
-
+
diff --git a/xproc/src/main/xml/specification.xml b/xproc/src/main/xml/specification.xml
index 03164d487..e36b15115 100644
--- a/xproc/src/main/xml/specification.xml
+++ b/xproc/src/main/xml/specification.xml
@@ -111,7 +111,7 @@ far as the pipeline is concerned. Compound steps control the execution
of other steps, which they include in the form of one or more
subpipelines.
-
+
defines a standard library of steps. Pipeline implementations
may support additional types of steps as well.
@@ -248,7 +248,7 @@ it sends result documents, and options which influence its behavior.
indivisible.
There are many types of atomic steps. The
standard library of atomic steps is described in , but implementations may
+ linkend="steps31"/>, but implementations may
provide others as well. It is
implementation-defined what additional step
types, if any, are provided. Each use, or instance, of an
@@ -559,7 +559,7 @@ map{'serialization':
Document Types
-XProc 3.0 has been designed to make it possible to process any kind of
+XProc 3.1 has been designed to make it possible to process any kind of
document. Each document has a representation in the .
This is necessary so that any kind of document can be passed as an argument to XPath functions,
such as p:document-properties.
@@ -985,7 +985,7 @@ step signatures are fixed and shared by all instances. There is no
mechanism for a pipeline author to declare that an atomic step has a
signature that varies. However, implementors may provide such
mechanisms and other specifications may depend upon them.
-Such steps are “magic” and XProc 3.0 makes no effort to provide
+Such steps are “magic” and XProc 3.1 makes no effort to provide
a mechanism to define them.
@@ -1029,11 +1029,11 @@ content types, that they accept, see .<
intermediate results produced by steps in the pipeline have base URIs. Whether (and
when and how) or not the intermediate results that pass between steps are ever written
to a filesystem is implementation-dependent.
- In Version 3.0 of XProc, how (or if) implementers provide local resolution
+ In Version 3.1 of XProc, how (or if) implementers provide local resolution
mechanisms and how (or if) they provide access to intermediate results by URI is
implementation-defined.
- Version 3.0 of XProc does not require implementations to guarantee that multiple
+ Version 3.1 of XProc does not require implementations to guarantee that multiple
attempts to dereference the same URI always produce the same results.On the one hand, this is a somewhat unsatisfying state of affairs because it leaves
@@ -1350,7 +1350,7 @@ is good practice.
take account of prefix information in creating new namespace bindings, to minimize
negative impact on prefixed names in content.Except for cases which are specifically called out in , the extent to which namespace fixup, and other checks for
+ linkend="steps31"/>, the extent to which namespace fixup, and other checks for
outputs which cannot be serialized, are performed on intermediate outputs is
implementation-defined.Whenever an implementation serializes XML, for example for pipeline
@@ -1433,7 +1433,7 @@ as they are available statically.Consider:
-xs:stringversion
-A version 3.0 processor will return true() when
-p:version-available('3.0') is evaluated.
+A version 3.1 processor will return true() when
+p:version-available('3.1') is evaluated.The p:version-available function behaves
normally during static analysis.
@@ -3351,8 +3351,8 @@ Variable names are always expressed as
Versioning Considerations
-A pipeline author may identify the version of XProc
-for which a particular pipeline was authored by setting the
+Pipelines identify the version of XProc they are authored against
+with the
version attribute. The
version attribute can be specified on
p:declare-step or p:library.
@@ -3364,7 +3364,7 @@ the version attribute must be a
xs:decimal.The version of XProc defined
-by this specification is “3.0”.
+by this specification is “3.1”.A pipeline author must identify the version of XProc
on the document element of a pipeline document.
@@ -3373,16 +3373,47 @@ required
version attribute
is not present.
-The version identified applies
-to the element on which the
-version attribute appears and all of its descendants,
-unless or until another version is explicitly identified.
+The version identified applies to the element on which the version attribute appears and all of its
+descendants, unless or until another version is explicitly
+identified.
-XProc 3.0 takes a draconian approach to versioning.
-It
-is a static error if the processor encounters
-an explicit request for a version of the language other than “3.0”.
+An XProc 3.1 processor must accept pipelines
+labeled with version “3.1”. It should also accept
+pipelines labeled with version “3.0”.
+
+
+
+If a 3.1 processor accepts pipelines
+labeled with version “3.0”, it must
+process them as if they were labeled “3.1”. In this case, the
+acceptable versions are “3.0” and “3.1”.
+
+
+Alternatively, an XProc 3.1 processor may reject
+pipelines labeled with version “3.0”. In this case, the only acceptable version
+is “3.1”.
+
+
+
+
+A pragmatic approach to 3.0 and 3.1
+In practice, implementations are expected to treat version “3.0”
+as a synonym for version “3.1”. Although there are technically a few
+backwards incompatiblities between 3.1 and 3.0, all known processors
+have always implemented the behavior now defined
+in 3.1, so it is of no consequence.
+Requiring processors to reject pipelines labeled “3.0” would be
+hostile to users with existing pipelines. Requiring implementors to
+strictly support the 3.0 behavior on pipelines labeled “3.0”
+would, from the user’s perspective, actually introduce errors in existing pipelines.
+
+
+It is a static error
+if the processor encounters an explicit request for a version of the
+language not acceptable to the processor.
+
@@ -4303,7 +4334,7 @@ attribute">extension attributes.
StepsThis section describes the core language steps of XProc; the full
vocabulary of standard, atomic steps is described in
-.
+.Pipelines
@@ -5186,7 +5217,7 @@ can provide some sort of default for the rest of the pipeline.An atomic
step is a step that does not contain a subpipline when it
is invoked. The built-in steps described in are atomic. Steps like p:for-each and
+linkend="steps31"/> are atomic. Steps like p:for-each and
p:try that always have a subpipline are
not atomic.
@@ -5248,7 +5279,7 @@ steps and the terms associated with these types:
Processor-provided standard atomic stepsIn addition to the six step types
described in the preceding sections, XProc provides a standard library of atomic step types.
- The full vocabulary of standards steps is described in .
+ The full vocabulary of standards steps is described in .
In addition to these standard atomic steps, other specifications by the same standardization
body may define other optional steps in the XProc namespace, for example, validation or file system
related steps.
@@ -5581,7 +5612,7 @@ they are implicit inlines.
Connection precedence
-XProc 3.0 introduces a number of new connection defaulting
+XProc has a number of new connection defaulting
mechanisms to make pipeline authoring easier. Defaults only apply
if there’s no explicit connection, and they apply differently to
primary and secondary inputs.