From 25936ebd52ad6a63d8defb34682923aab4fd71dc Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Fri, 6 Sep 2024 09:44:57 +0100 Subject: [PATCH 1/2] Attempt to clarify p:error --- steps/src/main/xml/steps/error.xml | 34 +++++++++++++++++------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/steps/src/main/xml/steps/error.xml b/steps/src/main/xml/steps/error.xml index 645f821..34969c9 100644 --- a/steps/src/main/xml/steps/error.xml +++ b/steps/src/main/xml/steps/error.xml @@ -4,8 +4,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="c.error"> p:error -The p:error step generates a dynamic error using the input provided -to the step. +The p:error step generates a +dynamic error using the input provided to the +step. @@ -13,18 +14,21 @@ to the step. -This step uses the document provided on its input as the content -of the error raised. An instance of the -c:errors element will be produced on the error output port, as is -always the case for dynamic errors. -The error generated can be caught by a p:try just like any -other dynamic error. +The p:error step always fails. It generates the error specified +in the option. It also produces a c:errors document that +will be visible on the error port inside a p:catch. +(The error vocabulary is described in .) + -For authoring convenience, the p:error step is -declared with a single, primary output port. With respect to connections, -this port behaves like -any other output port even though nothing can ever -appear on it since the step always fails. +This step should include the content of the document +that appears on the source port in the error. If more than one +document appears on the source port of the p:error step, what +is produced in the error document is implementation-defined. + +For authoring convenience, the p:error step is declared with a +single, primary output port. With respect to connections, this port behaves like +any other output port even though nothing can ever appear on it since the step +always fails. For example, given the following invocation: <p:error xmlns:my="http://www.example.org/error" @@ -34,8 +38,8 @@ appear on it since the step always fails. </p:with-input> </p:error> -The error vocabulary element (and document) generated on the -error output port would be: +The errors document generated on the error output port might be: + <c:errors xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" xmlns:my="http://www.example.org/error"> From 59dae5546f5262dd8cf19f00dff916c34f301325 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 7 Sep 2024 16:04:28 +0100 Subject: [PATCH 2/2] Don't make it implementation defined --- steps/src/main/xml/steps/error.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/steps/src/main/xml/steps/error.xml b/steps/src/main/xml/steps/error.xml index 34969c9..e523335 100644 --- a/steps/src/main/xml/steps/error.xml +++ b/steps/src/main/xml/steps/error.xml @@ -14,16 +14,18 @@ step. -The p:error step always fails. It generates the error specified -in the option. It also produces a c:errors document that +The p:error step always fails. It generates a single error with the +error code specified in the + option. It also produces a c:errors document that will be visible on the error port inside a p:catch. (The error vocabulary is described in .) This step should include the content of the document -that appears on the source port in the error. If more than one -document appears on the source port of the p:error step, what -is produced in the error document is implementation-defined. +that appears on the source port in the error. If more than one +document appears on the source port of the p:error step, all +of the documents must be added to a single c:error +element. For authoring convenience, the p:error step is declared with a single, primary output port. With respect to connections, this port behaves like