Define the step name exports of an XProc element, against the background of a set of URIs Visited of resources already visited, as follows:
type
of the elementhref
of the element. If
RU is a member of Visited, then an empty bag,
otherwise update Visited by adding RU to it, and
return the step name exports of the
document element of the retrieved representationThe changes to Visited mandated by the p:import case above are persistent, not scoped. That is, not only the recursive processing of the imported resource but also subsequent processing of siblings and ancestors must be against the background of the updated value. In practice this means either using a side-effected global variable, or not only passing Visited as an argument to any recursive or iterative processing, but also returning its updated value for subsequent use, along with the bag of step names.
Given a pipeline library document with actual resolved URI DU, it is an error (err:XS0036) if the step name exports of the document element of the retrieved representation, against the background of a singleton set containing DU, contains any duplicate names.
Given a (top-level?) pipeline document with actual resolved URI DU, it is an error (err:XS0036) if the bag-merger of the step name exports of the document element of the retrieved representation with the step name exports of its children, against the background of a singleton set containing DU, contains any duplicate names.