W3C

Proposed XProc Specification Errata

Abstract

This document records all known errors in the XProc: An XML Pipeline Language; for updates see the latest version.

The errata are numbered, classified as Substantive or Editorial, and listed in reverse chronological order of their date of publication in each category. Changes to the text of the spec are indicated thus: deleted text, new text, modified text . Substantive corrections are proposed by the XML Processing Model Working Group, which has consensus that they are appropriate; they are not to be considered normative until approved by a Call for Review of Proposed Corrections or a Call for Review of an Edited Recommendation.

Please email error reports to public-xml-processing-model-comments@w3.org.


Substantive errata

S04, 12 March 2014

Section 4.4 p:choose

To address bug 21006, make the following changes.

Change the first paragraph after the syntax box as follows:

A p:choose has no inputs. It contains an arbitrary number of alternative subpipelinesbranches (identified with p:when and p:otherwise elements), exactly one of which will be evaluated.

Change the fourth paragraph after the syntax box as follows:

After a subpipelinebranch is selected, it is evaluated as if only it its children had been present.

S03, 12 March 2014

Sections 4.4 p:choose and 4.4.1 p:xpath-context

To address bug 21003, make the following changes.

Change the penultimate paragraph of 4.4 as follows:

The p:choose can specify the context node against which the XPath expressions that occur on each branch are evaluated. The context node is specified as a connection in the p:xpath-context. If no explicit connectionp:xpath-context is provided, the default readable port is used. In an XPath 1.0 implementation, if the context node is connected to p:empty, or is unconnected and the default readable port is undefined, an empty document node is used instead as the context. In an XPath 2.0 implementation, the context item is undefined.

And delete the last paragraph of 4.4.1:

In an XPath 1.0 implementation, if the context node is connected to p:empty, or is unconnected and the default readable port is undefined, an empty document node is used instead as the context. In an XPath 2.0 implementation, the context item is undefined.

S02, 12 March 2014

Section 5.7.2 p:option

To address bug 21002, change the fourth paragraph (the first paragraph after the first syntax box) as follows:

An option may be declared as required. If an option is required, it is an error to invoke that step without specifying a value for that option. For steps invoked within a pipeline, it is a static error (err:XS0018) to invoke the step specify an invocation without providing a value for thata required option. For pipelines invoked directly by an external environment (informally, top-level pipelines), this error cannot be detected statically. It is a dymamic error (err:XD????) to invoke a pipeline without specifying a value for a required option.

We leave it to the discretion of the editor to define the new dynamic error number.

S01, 12 March 2014

Section 2.6 XPaths in XProc

To address bug 20995, add the following errata text somewhere in 2.6:

XProc 1.0 fails to adequately address the XPath requirement that the document-uri property of a document must be a stable identifier. Informally, if two nodes have the same document-uri, they must be the same document. The Working Group concludes that attempting to address this in the 1.0 specification is infeasible. It plans to address this issue explicitly in 2.0.

In the meantime, implementors are encouraged to satisfy the XPath constraint as much as is practical. The XProc 1.0 specification fails to mention the document-uri property, so there's no explicit text that forbids an implementor from satisfying it.


Editorial errata

E15, 6 October 2014

Section 5.8 p:declare-step

To address bug 21007, make the following changes to the paragraph below the first syntax box:

The value of the type can be from any namespace provided that the expanded-QName of the value has a non-null namespace URI. It is a static error (err:XS0025) if the expanded-QName value of the type attribute is in no namespace or in the XProc namespace that is not the XProc namespace.. Except as described in Section 2.13, “Versioning Considerations”, the XProc namespace must not be used in the type of steps. Neither users nor implementers may define additional steps in the XProc namespace.

E14, 6 October 2014

Section 2.6.1.1 Processor XPath Context

To address action A-230-05, make the following changes to the note under “variable bindings”:

An option that has neither a specified value nor a default value will not appear as an in-scope XPath variable. Consequently, an attempt to refer to that variable an XPath variable whose name is the name of such an option will raise an error.

E13, 6 October 2014

Section 3.2 Scoping of Names

To address action A-227-01, make the following changes to the penultimate paragraph of the section:

The scope of option and variable names is determined by where they are declared. When an option is declared with p:option (or a variable with p:variable), unless otherwise specified, its scope consists of the sibling elements that follow its declaration and the descendants of those siblings. It is a static error (err:XS0004) if an option or variable declaration duplicates the name of any other option or variable in the same environment. That is, no option or variable may lexically shadow another option or variable with the same name among its preceding siblings.

E12, 12 March 2014

Section 5.7.1 p:variable

To address bug 21004, make the following changes to the four paragraphs which follow the syntax box:

If a select expression is given, itThe select expression is evaluated as an XPath expression using the appropriate context as described in Section 2.6, “XPaths in XProc”, for the enclosing container, with the addition of bindings for all preceding-sibling p:variable and p:option elements. Regardless of the implicit type of the expression, when XPath 1.0 is being used, the string value of the expression becomes the value of the variable; when XPath 2.0 is being used, the type is treated as an xs:untypedAtomic.

Since all in-scope bindings are present in the Processor XPath Context as variable bindings, select expressions may refer to the value of in-scope bindings by variable reference. If a variable reference uses a QName that is not the name of an in-scope binding, an XPath evaluation error will occur.

If a select expression is given, theThe readable ports available for document connections are the readable ports in the environment inherited by the first step in the surrounding container's contained steps. However, in order to avoid ordering paradoxes, it is a static error (err:XS0019) for a variable's document connection to refer to the output port of any step in the surrounding container's contained steps.

If a select expression is given butIf no document connection is provided, the implicit connection is to the default readable port in the environment inherited by the first step in the surrounding container's contained steps. If there is no default readable port, the connection is treated as if p:empty was specified.

E11, 01 February 2012

Globally

Move the conformance phrases into the conformance appendix.

E10, 21 July 2011

Section 4.6 p:try

In the context of a p:catch, the error port is an input port not an output port; remove the word output.

What appears on the error output port is an error document. The error document may contain messages generated by steps that were part of the initial subpipeline. Not all messages that appear are indicative of errors; for example, it is common for all xsl:message output from the XSLT component to appear on the error output port. It is possible that the component which fails may not produce any messages at all. It is also possible that the failure of one component may cause others to fail so that there may be multiple failure messages in the document.

Section 4.6.1 The Error Vocabulary

Also here:

The p:try/p:catch mechanism gives pipeline authors the opportunity to process the errors that caused the p:try to fail. In order to facilitate some modicum of interoperability among processors, errors that are reported on the error output port of a p:catch should conform to the format described here.

E09, 3 February 2011

Section 7.1.10.5 HTTP Request Example

Make request/response consistent with respect to the “detailed” setting.

<c:request xmlns:c="http://www.w3.org/ns/xproc-step"
           method="POST" href="http://www.example.com/form-action" 
           detailed="true">
<c:body content-type="application/x-www-form-urlencoded">
name=W3C&spec=XProc
</c:body>
</c:request>

E08, 2 February 2011

Section 3.1 XProc Namespaces

Add text to discourage implementors from creating errors in the xproc-error namespace.

http://www.w3.org/ns/xproc-error

The namespace used for errors. The conventional prefix “err:” is used for this namespace.

Implementors are discouraged from inventing new error codes in the XProc error namespace; they are reserved for future versions of this specification or other working group products.

E07, 2 February 2011

Section 2 Pipeline Concepts

Clarify that the output of a compound step may be connected to any readable port, as specified in 2.2 Inputs and Outputs

Within a compound step, the declared outputs of the step can be connected to:
  • Any one of the compound step's readable ports.
  • The output port of some contained step.
  • A fixed, inline document or sequence of documents.
  • A document read from a URI.

E06, 2 February 2011

Section 2 Pipeline Concepts

Add definitions for pipeline processor and implementation.

The result of evaluating a pipeline (or subpipeline) is the result of evaluating the steps that it contains, in an order consistent with the connections between them. A pipeline must behave as if it evaluated each step each time it is encountered.

[Definition: The software responsible for evaluating XProc pipelines is referred to as an XProc Processor. In contexts where the kind of processor is unambiguous, it is sometimes referred to simple as “the processor”.]

[Definition: A specific product that performs the functions of an XProc processor is referred to as an implementation.]

Unless otherwise indicated, implementations must not assume that steps are functional (that is, that their outputs depend only on their inputs, options, and parameters) or side-effect free.

E05, 2 February 2011

Section 4.4.1 p:xpath-context

Make it clear that err:XD0026 applies in this case too.

…In an XPath 2.0 implementation, the context item is undefined. It is a dynamic error (err:XD0026) if the select expression makes reference to the context node, size, or position when the context item is undefined.

E04, 2 February 2011

Section 4.4 p:choose

Make it clear that err:XD0026 applies in this case too.

…In an XPath 2.0 implementation, the context item is undefined. It is a dynamic error (err:XD0026) if the select expression makes reference to the context node, size, or position when the context item is undefined.

E03, 2 February 2011

Section 5.13 p:document

Make it clear that support for xml:id is implementation-defined. Add a new paragraph after the paragraph that begins “The parser which the…”:

Support for xml:id in XProc processors is implementation-defined. Implementors are encouraged to support xml:id wherever practical.

E02, 22 June 2010

Section 7.1.10.3 Managing the Response

Make it clear that “decoded if necessary” in bullet 1 of the last bulleted list applies to the content encoding by changing the text of the bullet as follows:

If the media type (as determined by the override-content-type attribute or the Content-Type response header) is an XML media type, the entity is decoded if necessary (if a Content-Encoding response header is present and specifies an encoding other than identity), then parsed as an XML document and produced on the result output port as the entire output of the step.

E01, 22 June 2010

Section 7.1.10.4 Converting Response Entity Bodies

Make it clear that the final note only applies when no charset is specified by changing the text of the note as follows:

Given the above description, any content identified as text/html without specifying a Unicode character encoding will be encoded as (escaped) text or base64-encoded in the c:body element, as HTML isn't always well-formed XML. A user can attempt to convert such content into XML using the p:unescape-markup step.