<?xml-stylesheet href="edit.css" type="text/css"?>
<?xml-stylesheet type="text/css" href="edit.css"?>
<?xml-stylesheet href="../style/xmlspec.xsl" type="text/xsl"?>
<?xml-model href="../../../../../Applications/oxygen/frameworks/xmlspec/schema/xmlspec.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<spec w3c-doctype="wd" xmlns:grddl="http://www.w3.org/2003/g/data-view#"
  grddl:transformation="glean_title.xsl getAuthor.xsl" role="editors-copy">
  <header>
    <title diff="chg">XProc Language v2 Requirements and Use Cases</title>
    <w3c-designation diff="chg">WD-xproc-langreq-v2</w3c-designation>
    <w3c-doctype diff="chg">Editors' Working Draft</w3c-doctype>
    <pubdate diff="chg">
      <day>28</day>
      <month>June</month>
      <year>2012</year>
    </pubdate>
    <publoc diff="chg">
      <loc xmlns:xlink="http://www.w3.org/1999/xlink"
        href="http://www.w3.org/XML/XProc/docs/langreq-v2.html" xlink:type="simple"
        xlink:show="replace" xlink:actuate="onRequest"
        >http://www.w3.org/XML/XProc/docs/langreq-v2.html</loc></publoc>
    <altlocs>
      <loc xmlns:xlink="http://www.w3.org/1999/xlink"
        href="http://www.w3.org/XML/XProc/docs/langreq-v2.xml" xlink:type="simple"
        xlink:show="replace" xlink:actuate="onRequest">XML</loc>
      <loc href="http://www.w3.org/XML/XProc/docs/langreq-v2-diff.html">with differences
        marked</loc>
    </altlocs>
    <latestloc diff="chg">
      <loc xmlns:xlink="http://www.w3.org/1999/xlink"
        href="http://www.w3.org/XML/XProc/docs/langreq-v2.html" xlink:type="simple"
        xlink:show="replace" xlink:actuate="onRequest"
        >http://www.w3.org/XML/XProc/docs/langreq-v2.html</loc>
    </latestloc>
    <authlist>
      <author>
        <name>Alex Milowski</name>
        <affiliation>Invited Expert</affiliation>
        <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:alex@milowski.com"
          xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">alex@milowski.com</email>
      </author>
      <author diff="add">
        <name>Murray Maloney</name>
        <affiliation>Invited Expert</affiliation>
        <email xmlns:xlink="http://www.w3.org/1999/xlink" href="mailto:murray@muzmo.com"
          xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">murray@muzmo.com</email>
      </author>
    </authlist>
    <abstract diff="chg">
      <p>This document is being built to articulate requirements for the development of a subsequent
        version of <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline
          Language</titleref>. </p>
    </abstract>
    <status>
      <p><emph>This section describes the status of this document at the time of its publication.
          Other documents may supersede this document. A list of current W3C publications and the
          latest revision of this technical report can be found in the <loc
            xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">W3C technical reports
            index</loc> at http://www.w3.org/TR/.</emph></p>
      <p diff="chg">This Editor's Working Draft has been produced by the authors listed above, at
        the will of the chair, and with the consent of the members W3C <loc
          xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/XML/Processing/"
          xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">XML Processing Model
          Working Group</loc> as part of the <loc xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/XML/Activity" xlink:type="simple" xlink:show="replace"
          xlink:actuate="onRequest">XML Activity</loc>, following the procedures set out for the
          <loc xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/2003/06/Process-20030618/" xlink:type="simple"
          xlink:show="replace" xlink:actuate="onRequest">W3C Process</loc>. The goals of the XML
        Processing Model Working Group are discussed in its <loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/2005/10/xml-processing-model-wg-charter.html" xlink:type="simple"
          xlink:show="replace" xlink:actuate="onRequest">charter</loc>.</p>
      <p> Comments on this document should be sent to the W3C mailing list <loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="mailto:public-xml-processing-model-comments@w3.org" xlink:type="simple"
          xlink:show="replace" xlink:actuate="onRequest"
          >public-xml-processing-model-comments@w3.org</loc> (<loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://lists.w3.org/Archives/Public/public-xml-processing-model-comments/"
          xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">archive</loc>).</p>
      <p>Publication as a <loc xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/2004/02/Process-20040205/tr.html#RecsWD" xlink:type="simple"
          xlink:show="replace" xlink:actuate="onRequest">Working Draft</loc> does not imply
        endorsement by the W3C Membership. This is a draft document and may be updated, replaced or
        obsoleted by other documents at any time. It is inappropriate to cite this document as other
        than work in progress.</p>
      <p>This document was produced by a group operating under the <loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/Consortium/Patent-Policy-20040205/" xlink:type="simple"
          xlink:show="replace" xlink:actuate="onRequest">5 February 2004 W3C Patent Policy</loc>.
        The group does not expect this document to become a W3C Recommendation. This document is
        informative only. W3C maintains a <loc xmlns:xlink="http://www.w3.org/1999/xlink"
          role="disclosure" href="http://www.w3.org/2004/01/pp-impl/38398/status"
          xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">public list of any
          patent disclosures</loc> made in connection with the deliverables of the group; that page
        also includes instructions for disclosing a patent. An individual who has actual knowledge
        of a patent which the individual believes contains <loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential"
          xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">Essential
          Claim(s)</loc> must disclose the information in accordance with <loc
          xmlns:xlink="http://www.w3.org/1999/xlink"
          href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure"
          xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">section 6 of the W3C
          Patent Policy</loc>.</p>
    </status>
    <langusage>
      <language id="en">English</language>
    </langusage>
    <revisiondesc diff="chg">
      <p>Editors' working draft (Revision 30 May 2012)</p>
    </revisiondesc>
  </header>
  <body>
    <div1 id="introduction">
      <head>Introduction</head>
      <p diff="chg">A large and growing set of specifications describe processes operating on XML
        documents. Many applications depend on the use of more than one of the many inter-related
        XML family of specifications. How implementations of these specifications interact affects
        interoperability. <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline
          Language</titleref> is designed for describing operations to be performed on XML
        documents. </p>
      <p diff="add"><quote>An XML Pipeline specifies a sequence of operations to be performed on a
          collection of XML input documents. Pipelines take zero or more XML documents as their
          input and produce zero or more XML documents as their output. A pipeline consists of
          steps. Like pipelines, steps take zero or more XML documents as their inputs and produce
          zero or more XML documents as their outputs. The inputs of a step come from the web, from
          the pipeline document, from the inputs to the pipeline itself, or from the outputs of
          other steps in the pipeline. The outputs from a step are consumed by other steps, are
          outputs of the pipeline as a whole, or are discarded. There are three kinds of steps:
          atomic steps, compound steps, and multi-container steps. Atomic steps carry out single
          operations and have no substructure as far as the pipeline is concerned. Compound steps
          and multi-container steps control the execution of other steps, which they include in the
          form of one or more subpipelines.</quote> -- <titleref href="http://www.w3.org/TR/xproc/"
          >XProc: An XML Pipeline Language</titleref></p>
      <p diff="add">This specification contains requirements for an anticipated <emph>XProc
          V.next</emph>. This specification is concerned with the conceptual model of XML process
        interactions, the language for the description of these interactions, and the inputs and
        outputs of the overall process. This specification is not generally concerned with the
        implementations of actual XML processes participating in these interactions.</p>
      <div2 diff="add" id="Goals">
        <head>XProc V.next Goals</head>
        <ednote>
          <edtext>The editors intend to enumerate the Working Group's goals for <emph>XProc
              V.next</emph> to guide our efforts, and these may ultimately inform <specref
              ref="design-principles"/>. </edtext>
        </ednote>
        <olist>
          <item>
            <p>Improving ease of use (syntactic improvements) </p>
          </item>
          <item>
            <p>Improving ease of use (increasing the scope: non XML content, for example) </p>
          </item>
          <item>
            <p>Addressing known shortcomings in the language</p>
          </item>
          <item>
            <p>Improve relationship with streaming and parallel processing</p>
          </item>
        </olist>
      </div2>
      <div2 diff="add" id="Editorial">
        <head>Editorial Process</head>
        <p>The following is a strawman list; it has no standing with the Working Group and is likely
          to be replaced and/or expanded daily until further notice.</p>
        <ulist>
          <item>
            <p>Iterate until ready to declare success. (&lt;p:iterate-until value="success" />)</p>
          </item>
          <item>
            <p>Review <specref ref="terminology"/>. </p>
          </item>
          <item>
            <p>Review <specref ref="design-principles"/>. </p>
          </item>
          <item>
            <p>Review <specref ref="requirements"/>. </p>
          </item>
          <item>
            <p>Review <specref ref="use-cases"/></p>
          </item>
          <item>
            <p>Gather and review <specref ref="references"/></p>
          </item>
          <item>
            <p>Gather and review <specref ref="issues"/>
            </p>
          </item>
          <item>
            <p>Audit existing <specref ref="use-case-unsatisfied"/></p>
          </item>
          <item>
            <p>Gather and review <specref ref="steps-categorized"/></p>
          </item>
          <item>
            <p>Gather and review input from stakeholders.</p>
            <ulist>
              <item>
                <p><specref ref="input-architecture"/></p>
              </item>
              <item>
                <p><specref ref="input-res-mgr"/></p>
              </item>
              <item>
                <p><specref ref="input-integration"/>. </p>
              </item>
              <item>
                <p><specref ref="input-usability"/>. </p>
              </item>
              <item>
                <p><specref ref="input-new-steps"/></p>
              </item>
            </ulist>
          </item>
          <item>
            <p>Discuss. </p>
          </item>
          <item>
            <p>Update existing definitions, design principles, requirements and use cases.</p>
          </item>
          <item>
            <p>Enumerate new definitions, design principles, requirements and use cases.</p>
          </item>
          <item>
            <p>Review.</p>
          </item>
          <item>
            <p>Approve.</p>
          </item>
          <item>
            <p>Publish. </p>
          </item>
        </ulist>
      </div2>
    </div1>
    <div1 id="terminology">
      <head>Terminology</head>
      <note>
        <p>The Working Group should review the definitions included here to determine whether
          changes are warranted in light of the publication of <titleref
            href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>.
          Additional term definitions may be warranted and will be added as needed. </p>
      </note>
      <glist>
        <gitem>
          <label><termdef id="infoset" term="XML Information Set">XML Information Set or
              "Infoset"</termdef></label>
          <def>
            <p>An XML Information Set or "Infoset" is the name we give to any implementation of a
              data model for XML which supports the vocabulary as defined by the XML Information Set
              recommendation <bibref ref="xml-infoset-rec"/>.</p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="xml-pipeline" term="XML Pipeline">XML Pipeline</termdef></label>
          <def>
            <p>An XML Pipeline is a conceptualization of a flow of a configuration of steps and
              their parameters. The XML Pipeline defines a process in terms of order, dependencies,
              or iteration of steps over XML information sets.</p>
            <p diff="add"><quote>[A pipeline is a set of connected steps, with outputs of one step
                flowing into inputs of another.]</quote> -- <titleref
                href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="spec-lang" term="Specification Language">XML Pipeline Specification
              Document</termdef></label>
          <def>
            <p>A pipeline specification document is an XML document that described an XML
              pipeline.</p>
            <p diff="add">This definition does not seem to be helpful any longer. XProc 1.0 refers
              to an XML pipeline, or simply a pipeline.</p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="step" term="Step">Step</termdef></label>
          <def>
            <p>A step is a specification of how a component is used in a pipeline that includes
              inputs, outputs, and parameters.</p>
            <p diff="add"><quote>[A step is the basic computational unit of a pipeline.] A typical
                step has zero or more inputs, from which it receives XML documents to process, zero
                or more outputs, to which it sends XML document results, and can have options and/or
                parameters. There are three kinds of steps: atomic, compound, and multi-container. A
                pipeline is itself a step and must satisfy the constraints on steps. Connections
                between steps occur where the input of one step is connected to the output of
                another.</quote>-- <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML
                Pipeline Language</titleref></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="component" term="Component">Component</termdef></label>
          <def>
            <p>A component is an particular XML technology (e.g. XInclude, XML Schema Validity
              Assessment, XSLT, XQuery, etc.).</p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="input-document" term="Input Document">Input Document</termdef></label>
          <def>
            <p>An XML infoset that is an input to a XML Pipeline or Step.</p>
            <p diff="add">Relates to <specref ref="input-arch-content"/></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="output-document" term="Output Document">Output
            Document</termdef></label>
          <def>
            <p>The result of processing by an XML Pipeline or Step.</p>
            <p diff="add"><quote>[The output ports declared on a step are its declared outputs.]
                When a step is used in a pipeline, it is connected to other steps through its inputs
                and outputs.</quote> -- <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML
                Pipeline Language</titleref></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="parameter" term="parameter">Parameter</termdef></label>
          <def>
            <p>A parameter is input to a Step or an XML Pipeline in addition to the Input and Output
              Document(s) that it may access. Parameters are most often simple, scalar values such
              as integers, booleans, and URIs, and they are most often named, but neither of these
              conditions is mandatory. That is, we do not (at this time) constrain the range of
              values a parameter may hold, nor do we (at this time) forbid a Step from accepting
              anonymous parameters.</p>
            <p diff="add"><quote>Some steps accept parameters. Parameters are name/value pairs, like
                variables and options. Unlike variables and options, which have names known in
                advance to the pipeline, parameters are not declared and their names may be unknown
                to the pipeline author. Pipelines can dynamically construct sets of parameters.
                Steps can read dynamically constructed sets on parameter input ports. [...] A
                parameter input port is a distinguished kind of input port which accepts (only)
                dynamically constructed parameter name/value pairs</quote>.-- <titleref
                href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref></p>
            <p>Relates to <specref ref="usability-parameters"/> and <specref ref="issue-004"/></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="pipeline-env" term="Pipeline Environment">XML Pipeline
              Environment</termdef></label>
          <def>
            <p>The technology or platform environment in which the XML Pipeline is used (e.g.
              command-line, web servers, editors, browsers, embedded applications, etc.).</p>
            <p diff="add"><quote>[The environment is a context-dependent collection of information
                available within subpipelines.] Most of the information in the environment is static
                and can be computed for each subpipeline before evaluation of the pipeline as a
                whole begins. The in-scope bindings have to be calculated as the pipeline is being
                evaluated.</quote> -- <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML
                Pipeline Language</titleref></p>
            <p diff="add">Relates to proposed steps: <specref ref="step-env"/> and <specref
                ref="step-fileinfo"/></p>
          </def>
        </gitem>
        <gitem>
          <label><termdef id="streaming" term="Streaming">Streaming</termdef></label>
          <def>
            <p>The ability to parse an XML document and pass infoitems between components without
              building a full document information set.</p>
            <p diff="add">This editor has not discovered corresponding language in <titleref
                href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>.
              Relates to Usability: <specref ref="usability-streaming"/>. -- MM</p>
          </def>
        </gitem>
      </glist>
    </div1>
    <div1 id="design-principles">
      <head>Design Principles</head>
      <note>
        <p>The Working Group should review the design principles included here to determine whether
          changes are warranted in light of the publication of <titleref
            href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>.
          Additional design principles may be warranted and will be added as needed.</p>
        <p>Please note that section numbering has been added to facilitate hypertextual references
          to the individual design principles. </p>
      </note>
      <p>The design principles described in this document are requirements whose compliance with is
        an overall goal for the specification. It is not necessarily the case that a specific
        feature meets the requirement. Instead, it should be viewed that the whole set of
        specifications related to this requirements document meet that overall goal specified in the
        design principle.</p>
      <div2 id="principal-technology-neutral">
        <head>Technology Neutral</head>
        <p>Applications should be free to implement XML processing using appropriate technologies
          such as SAX, DOM, or other infoset representations.</p>
      </div2>
      <div2 id="principal-platform-neutral">
        <head>Platform Neutral</head>
        <p>Application computing platforms should not be limited to any particular class of
          platforms such as clients, servers, distributed computing infrastructures, etc. In
          addition, the resulting specifications should not be swayed by the specifics of use in
          those platform.</p>
      </div2>
      <div2 id="principal-small-simple">
        <head>Small and Simple</head>
        <p>The language should be as small and simple as practical. It should be "small" in the
          sense that simple processing should be able to stated in a compact way and "simple" in the
          sense the specification of more complex processing steps do not require arduous
          specification steps in the <termref def="spec-lang">XML Pipeline Specification
            Document</termref>.</p>
      </div2>
      <div2 id="principal-infoset-processing">
        <head>Infoset Processing</head>
        <p>At a minimum, an XML document is represented and manipulated as an <termref def="infoset"
            >XML Information Set</termref>. The use of supersets, augmented information sets, or
          data models that can be represented or conceptualized as information sets should be
          allowed, and in some instances, encouraged (e.g. for the XPath 2.0 Data Model).</p>
        <p diff="add">Relates to <specref ref="usability-XPath"/></p>
      </div2>
      <div2 id="principal-core-plus">
        <head>Straightforward Core Implementation</head>
        <p>It should be relatively easy to implement a conforming implementation of the language but
          it should also be possible to build a sophisticated implementation that implements its own
          optimizations and integrates with other technologies.</p>
      </div2>
      <div2 id="principal-interoperability">
        <head>Address Practical Interoperability</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> must be able to be exchanged
          between different software systems with a minimum expectation of the same result for the
          pipeline given that the <termref def="pipeline-env">XML Pipeline Environment</termref> is
          the same. A reasonable resolution to platform differences for binding or serialization of
          resulting infosets should be expected to be address by this specification or by re-use of
          existing specifications.</p>
      </div2>
      <div2 id="principal-validation">
        <head>Validation of XML Pipeline Documents by a Schema</head>
        <p>The <termref def="spec-lang">XML Pipeline Specification Document</termref> should be able
          to be validated by both W3C XML Schema and RelaxNG.</p>
        <p diff="add">Probably should add Schematron. <bibref ref="Schematron"/></p>
      </div2>
      <div2 id="principal-existing-specs">
        <head>Reuse and Support for Existing Specifications</head>
        <p><termref def="xml-pipeline">XML Pipelines</termref> need to support existing XML
          specifications and reuse common design patterns from within them. In addition, there must
          be support for the use of future specifications as much as possible.</p>
      </div2>
      <div2 id="principal-arbitrary-components">
        <head>Arbitrary Components</head>
        <p>The specification should allow use <emph diff="add">of</emph> any component technology
          that can consume or produce <termref def="infoset">XML Information Sets</termref>.</p>
      </div2>
      <div2 id="principal-io-control">
        <head>Control of Inputs and Outputs</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> must allow control over specifying
          both the inputs and outputs of any process within the pipeline. This applies to the inputs
          and outputs of both the <termref def="xml-pipeline">XML Pipeline</termref> and its
          containing steps. It should also allow for the case where there might be multiple inputs
          and outputs.</p>
      </div2>
      <div2 id="principal-flow-error-control">
        <head>Control of Flow and Errors</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> must allow control <emph diff="add"
            >of</emph> the explicit and implicit handling of the flow of documents between steps.
          When errors occur, these must be able to be handled explicitly to allow alternate courses
          of action within the <termref def="xml-pipeline">XML Pipeline</termref>.</p>
      </div2>
    </div1>
    <div1 id="requirements">
      <head>Requirements</head>
      <note>
        <p>In this section, Editor's Notes appended to each sub-section provide commentary on the
          status of each requirement. In particular, the editors have made note of whether a
          requirement has been demonstrably "<emph>Satisfied</emph>" or whether it remains
            "<emph>Unsatisfied</emph>". In the case of requirements that remain Unsatisfied, the
          editors intend to record potential solutions, in the form of proposals for new steps or
          changes to existing steps. In the case of demonstrably Satisfied requirements, the editors
          intend to provide examples, or links to examples, especially those in <titleref
            href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>.</p>
      </note>
      <div2 id="req-standard-names">
        <head>Standard Names in Step Inventory</head>
        <p>XProc must have standard names for atomic steps that correspond with, but not limited to,
          the following specifications <bibref ref="xml-core-wg"/>:</p>
        <ulist>
          <item>
            <p>XML Base <bibref ref="XMLBase"/></p>
          </item>
          <item>
            <p>XInclude <bibref ref="XInclude"/></p>
          </item>
          <item>
            <p>XSLT <bibref ref="XSLT-1.0"/>, <bibref ref="XSLT-2.0"/></p>
          </item>
          <item>
            <p>XSL FO <bibref ref="Serialization"/></p>
          </item>
          <item>
            <p>XQuery <bibref ref="XQuery-1.0"/></p>
          </item>
          <item diff="add">
            <p>XPath and Functions <bibref ref="XPath1.0"/>, <bibref ref="XPath-2.0"/><bibref
                ref="XPath-Functions"/></p>
          </item>
          <item>
            <p>XML Schema <bibref ref="XMLSchema1"/><bibref ref="XMLSchema2"/></p>
          </item>
          <item>
            <p>RELAX NG. <bibref ref="RELAX-NG"/></p>
          </item>
          <item diff="add">
            <p>Schematron <bibref ref="Schematron"/></p>
          </item>
          <item diff="add">
            <p>HTTP Request and Authentication <bibref ref="RFC-2616"/>
              <bibref ref="RFC-2616"/></p>
          </item>
        </ulist>
        <ednote role="satisfied" diff="add" id="sat-standard-names">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is satisfied. </edtext>
        </ednote>
      </div2>
      <div2 id="req-new-components-steps">
        <head>Allow Defining New Components and Steps</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> must allow applications to define
          and share new <termref def="step">steps</termref> that use new or existing <termref
            def="component">components</termref>. <bibref ref="xml-core-wg"/></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>The ability to define additional step types is <titleref
              href="http://www.w3.org/TR/xproc/#implementation-defined"
              >Implementation-defined</titleref>. </edtext>
        </ednote>
      </div2>
      <div2 id="req-minimal-components">
        <head>Minimal Component Support for Interoperability</head>
        <p>There must be a minimal inventory of <termref def="component">components</termref>
          defined by the specification that are required to be supported to facilitate
          interoperability of <termref def="xml-pipeline">XML Pipelines</termref>.</p>
        <p>XProc identifies its <titleref href="http://www.w3.org/TR/xproc/#std-components">Standard
            Step Library</titleref> and subdivides it into <titleref
            href="http://www.w3.org/TR/xproc/#std-required">Required Steps</titleref> and <titleref
            href="http://www.w3.org/TR/xproc/#std-optional">Optional Steps</titleref>. </p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>Minimal Component Support has been defined. </edtext>
        </ednote>
      </div2>
      <div2 id="req-allow-composition">
        <head>Allow Pipeline Composition</head>
        <p>Mechanisms for <termref def="xml-pipeline">XML Pipeline</termref> composition for re-use
          or re-purposing must be provided within the <termref def="spec-lang">XML Pipeline
            Specification Document</termref>.</p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>See <titleref href="http://www.w3.org/TR/xproc/#ex1">Example 1. A simple, linear
              XInclude/Validate pipeline</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="req-iteration">
        <head>Iteration of Documents and Elements</head>
        <p><termref def="xml-pipeline">XML Pipelines</termref> should allow iteration of a specific
          set of <termref def="step">steps</termref> over a collection of documents and or elements
          within a document.</p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is satisfied. Both p:for-each and p:viewport process a sequence
            of documents. Relates to <specref ref="newsteps-iteration"/></edtext>
        </ednote>
      </div2>
      <div2 id="req-conditional-processing">
        <head>Conditional Processing of Inputs</head>
        <p>To allow run-time selection of <termref def="step">steps</termref>, <termref
            def="xml-pipeline">XML Pipelines</termref> should provide mechanisms for conditional
          processing of documents or elements within documents based on expression evaluation.
            <bibref ref="xml-core-wg"/></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is satisfied. See <titleref
              href="http://www.w3.org/TR/xproc/#fig-style-proc">Figure 2, “A validate and transform
              pipeline”</titleref>. </edtext>
        </ednote>
      </div2>
      <div2 id="req-error-handling-fallback">
        <head>Error Handling and Fall-back</head>
        <p><termref def="xml-pipeline">XML Pipelines</termref> must provide mechanisms for
          addressing error handling and fall-back behaviors. <bibref ref="xml-core-wg"/></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is at least partially satisfied by XProc: All steps have an
            implicit output port for reporting errors; error handling and fallback are manageable
            through use of <titleref href="http://www.w3.org/TR/xproc/#p.try">p:try</titleref>. and
            p:catch. Relates to <specref ref="integration-fallback"/>
          </edtext>
        </ednote>
      </div2>
      <div2 id="req-xdm">
        <head>Support for the XPath 2.0 Data Model</head>
        <p diff="add">Relates to <specref ref="usability-XPath"/></p>
        <p><termref def="xml-pipeline">XML Pipelines</termref> must support the XPath 2.0 Data Model
          to allow support for XPath 2.0, XSLT 2.0, and XQuery as steps.</p>
        <note>
          <p>At this point, there is no consensus in the working group that minimal conforming
            implementations are required to support the XPath 2.0 Data Model.</p>
        </note>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is satisfied, with the caveats noted in <titleref
              href="http://www.w3.org/TR/xproc/#xpath-context">2.6 XPaths in XProc</titleref>. There
            have been suggestions that support for the XPath 2.0 Data Model should be required.
          </edtext>
        </ednote>
      </div2>
      <div2 id="req-allow-optimization">
        <head>Allow Optimizations</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> should not inhibit a sophisticated
          implementation from performing parallel operations, lazy or greedy processing, and other
          optimizations. <bibref ref="xml-core-wg"/></p>
        <ednote diff="add">
          <name>Partially Satisfied</name>
          <date>20120407</date>
          <edtext>This requirement is partially satisfied, with the caveats noted in <titleref
              href="http://www.w3.org/TR/xproc/#parallelism">H Sequential steps, parallelism, and
              side-effects</titleref>. That is, XProc does not <emph>inhibit</emph> sophisticated
            implementations; pipelines which take advantage of implementation features may be less
            interoperable. See Editors' Notes under <specref ref="req-streaming-pipes"/></edtext>
        </ednote>
      </div2>
      <div2 id="req-streaming-pipes">
        <head>Streaming XML Pipelines</head>
        <p>An <termref def="xml-pipeline">XML Pipeline</termref> should allow for the existence of
          streaming pipelines in certain instances as an optional optimization. <bibref
            ref="xml-core-wg"/></p>
        <ednote diff="add">
          <name>Unsatisfied</name>
          <date>20120407</date>
          <edtext>This requirement neither explicitly satisfied nor unsatisfied by anything in the
            language or an existence proof, except as noted <titleref href="#TBD">7.1.23
              p:split-sequence</titleref>. </edtext>
        </ednote>
        <ednote diff="add">
          <edtext>We observe that streaming, parallel processing and clustering are optimizations
            that may impose requirements on various aspects of processor implementation and pipeline
            design. Notably, any step, atomic or otherwise, that buffers its input or output can be
            an impediment to streaming. Documentation about the streamability of each atomic step
            may be warranted. Pipeline design can also affect the ability to process a stream, or to
            process parallel streams. The editors note the absence of streaming XProc processors or
            exemplars of parallel pipelines from which to interpolate requirements. The editors
            therefore request that the WG engage in a targeted discussion of the design principles
            and requirements incumbent upon XProc in support of Streaming, Parallel Processing and
            Clustering. See Usability: <specref ref="usability-streaming"/> . See also Use Cases:
              <specref ref="use-case-large-document-transform"/> and <specref ref="use-case-add-nav"
            />. </edtext>
        </ednote>
      </div2>
    </div1>
    <div1 id="use-cases">
      <head>Use cases</head>
      <p>This section contains a set of use cases that supported our requirements and informed our
        design. While there was a want to address all the use cases listed in this document, in the
        end, the first version may not have solved all the following use cases. Those unsolved use
        cases may be migrated into <emph>XProc V.next</emph>.</p>
      <note>
        <p>In this section, Editor's Notes appended to each sub-section provide commentary on the
          status of each Use Case. In particular, the editors have made note of whether a Use Case
          has been demonstrably "<emph>Satisfied</emph>" or whether it remains
            "<emph>Unsatisfied</emph>". A "TBD" anotation indicates that the status has yet to be
          ascertained. Some use cases may be only partially satisfied.</p>
        <p>In the case of requirements that remain Unsatisfied, the editors intend to record
          potential solutions, in the form of proposals for new steps or changes to existing steps.
          In the case of demonstrably Satisfied requirements, the editors intend to provide
          illustrative examples, or links to examples, especially those in the <titleref
            href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>.</p>
        <p>Note that these determinations of status are subject to change, especially in the early
          stages of the development of this document. -- MM</p>
      </note>
      <div2 id="use-case-apply-sequence">
        <head>Apply a Sequence of Operations</head>
        <p>Apply a sequence of operations such XInclude, validation, and transformation to a
          document, aborting if the result or an intermediate stage is not valid.</p>
        <p>(source: <bibref ref="xml-core-wg"/>)</p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is satisfied by <titleref>Example 1. A simple, linear
              XInclude/Validate pipeline</titleref> in the <titleref
              href="http://www.w3.org/TR/xproc/#introduction">Introduction</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-xinclude">
        <head>XInclude Processing</head>
        <olist>
          <item>
            <p>Retrieve a document containing XInclude instructions.</p>
          </item>
          <item>
            <p>Locate documents to be included.</p>
          </item>
          <item>
            <p>Perform XInclude inclusion.</p>
          </item>
          <item>
            <p>Return a single XML document.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is satisfied by <titleref>Example 1. A simple, linear
              XInclude/Validate pipeline</titleref> in the <titleref
              href="http://www.w3.org/TR/xproc/#introduction">Introduction</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-parse-validate-transform">
        <head>Parse/Validate/Transform</head>
        <olist>
          <item>
            <p>Parse the XML.</p>
          </item>
          <item>
            <p>Perform XInclude.</p>
          </item>
          <item>
            <p>Validate with Relax NG, possibly aborting if not valid.</p>
          </item>
          <item>
            <p>Validate with W3C XML Schema, possibly aborting if not valid.</p>
          </item>
          <item>
            <p>Transform.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0012.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Norm
            Walsh)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is almost satisfied by Examples 1-3 in the <titleref
              href="http://www.w3.org/TR/xproc/#introduction">Introduction</titleref>. The example
            does not include Relax NG validation, but it could have, and Schematron as well.
          </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-document-aggregation">
        <head>Document Aggregation</head>
        <olist>
          <item>
            <p>Locate a collection of documents to aggregate.</p>
          </item>
          <item>
            <p>Perform aggregation under a new document element.</p>
          </item>
          <item>
            <p>Return a single XML document.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is satisfied, as exemplified in <titleref
              href="http://www.w3.org/TR/xproc/#p.for-each">p:for-each</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-simple-command-line">
        <head>Single-file Command-line Document Processing</head>
        <olist>
          <item>
            <p>Read a DocBook document.</p>
          </item>
          <item>
            <p>Validate the document.</p>
          </item>
          <item>
            <p>Process it with XSLT.</p>
          </item>
          <item>
            <p>Validate the resulting XHTML.</p>
          </item>
          <item>
            <p>Save the HTML file using HTML serialization.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>Although the processing scenario described above is exemplified in <titleref
              href="http://www.w3.org/TR/xproc/#p.for-each">p:for-each</titleref>, the command-line
            requirement is considered to be implementation defined. ["How outside values are
            specified for pipeline parameters on the pipeline initially invoked by the processor is
            implementation-defined. In other words, the command line options, APIs, or other
            mechanisms available to specify such parameter values are outside the scope of [XProc
            1.0]."]</edtext>
        </ednote>
      </div2>
      <div2 id="use-case-multiple-command-line">
        <head>Multiple-file Command-line Document Generation</head>
        <olist>
          <item>
            <p>Read a list of source documents.</p>
          </item>
          <item>
            <p>For each document in the list:</p>
            <olist>
              <item>
                <p>Read the document.</p>
              </item>
              <item>
                <p>Perform a series of XSLT transformations.</p>
              </item>
              <item>
                <p>Serialize each result.</p>
              </item>
            </olist>
          </item>
          <item>
            <p>Alternatively, aggregate the resulting documents and serialize a single result.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>Although the processing scenario described above is exemplified in <titleref
              href="http://www.w3.org/TR/xproc/#p.for-each">p:for-each</titleref>, the command-line
            requirement is considered to be implementation defined. ["How outside values are
            specified for pipeline parameters on the pipeline initially invoked by the processor is
            implementation-defined. In other words, the command line options, APIs, or other
            mechanisms available to specify such parameter values are outside the scope of [XProc
            1.0]."]</edtext>
        </ednote>
      </div2>
      <div2 id="use-case-extract-mathml">
        <head>Extracting MathML</head>
        <p>Extract MathML fragments from an XHTML document and render them as images. Employ an SVG
          renderer for SVG glyphs embedded in the MathML.</p>
        <p>(source: <bibref ref="xml-core-wg"/>)</p>
        <ednote diff="add">
          <name>TBD</name>
          <date>20120407</date>
          <edtext>This use case is [not] satisfied. Describe a step that performs these steps.
          </edtext>
        </ednote>
        <p diff="add">We could refactor this use case, using p:viewport to extract MathML. We could
          model the rendering steps, but the existence of implementations is beyond the scope of
          XProc itself. That is, steps 2 is a black box to us; we simply don't care whether it
          works, so long as we can model it.</p>
        <olist diff="add">
          <item>
            <p>Extract MathML fragments from an XHTML document </p>
          </item>
          <item>
            <p>Transform each MathML element into one or more substitutes:</p>
            <olist>
              <item>
                <p>Apply a computation (e.g. compute the kernel of a matrix).</p>
              </item>
              <item>
                <p>Render extracted fragments as JPEG images. </p>
              </item>
              <item>
                <p>Employ an SVG renderer for SVG glyphs embedded in the MathML.</p>
              </item>
              <item>
                <p>Render using TeX</p>
              </item>
              <item>
                <p>Render using eqn/troff</p>
              </item>
            </olist>
          </item>
          <item>
            <p>Replace MathML fragments with computed and/or rendered equivalents.</p>
          </item>
        </olist>
        <eg xml:space="preserve" diff="add">Please provide an example of a step that responds to this use case.</eg>
      </div2>
      <div2 id="use-case-style-browser">
        <head>Style an XML Document in a Browser</head>
        <p>Style an XML document in a browser with one of several different stylesheets without
          having multiple copies of the document containing different xml-stylesheet directives.</p>
        <p>(source: <bibref ref="xml-core-wg"/>)</p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is satisfied, as exemplified in <titleref
              href="http://www.w3.org/TR/xproc/#p.for-each">p:for-each</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-run-program">
        <head>Run a Custom Program</head>
        <p>Run a program of your own, with some parameters, on an XML file and display the result in
          a browser.</p>
        <p>(source: <bibref ref="xml-core-wg"/>)</p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120412</date>
          <edtext>This use case is satisfied, as exemplified in the following example.</edtext>
        </ednote>
        <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?> 
&lt;p:declare-step
    xmlns:c="http://www.w3.org/ns/xproc-step" 
    xmlns:p="http://www.w3.org/ns/xproc"
    xmlns:cx="http://xmlcalabash.com/ns/extensions" 
    version="1.0" exclude-inline-prefixes="cx c p"> 

    &lt;p:input port="source"> 
      &lt;p:inline> 
        &lt;test/> 
      &lt;/p:inline> 
    &lt;/p:input>

    &lt;p:output port="result"/> 
    &lt;p:exec command="/bin/cat" result-is-xml="true"/>
&lt;/p:declare-step> </eg>
        <p>will generate</p>
        <eg xml:space="preserve">&lt;c:result xmlns:c="http://www.w3.org/ns/xproc-step"> 
    &lt;test/> 
&lt;/c:result></eg>
      </div2>
      <div2 id="use-case-xinclude-dsig">
        <head>XInclude and Sign</head>
        <olist>
          <item>
            <p>Process an XML document through XInclude.</p>
          </item>
          <item>
            <p>Transform the result with XSLT using a fixed transformation.</p>
          </item>
          <item>
            <p>Digitally sign the result with XML Signatures.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2006Feb/0062.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Henry
            Thompson)</loc></p>
        <ednote diff="add">
          <name>XInclude Satisfied</name>
          <date/>
          <edtext>This use case is satisfied.</edtext>
        </ednote>
        <ednote diff="add">
          <name>XML Signatures Unsatisfied</name>
          <date/>
          <edtext>This use case is not satisfied. The editors note that this Use Case cannot be
            satisfied unless/until a new <code>sign</code> step is created. Accordingly, a
              <code>sign</code> step has been included in the list of proposed new steps. The chair
            has noted that design and implementation of a <code>sign</code> step could prove
            difficult and that another group is likely better equipped to produce a solution.
            Discuss. </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-make-absolute-urls">
        <head>Make Absolute URLs</head>
        <olist>
          <item>
            <p>Process an XML document through XInclude.</p>
          </item>
          <item>
            <p>Remove any xml:base attributes anywhere in the resulting document.</p>
          </item>
          <item>
            <p>Schema validate the document with a fixed schema.</p>
          </item>
          <item>
            <p>For all elements or attributes whose type is xs:anyURI, resolve the value against the
              base URI to create an absolute URI. Replace the value in the document with the
              resulting absolute URI.</p>
          </item>
        </olist>
        <p>This example assumes preservation of infoset ([base URI]) and PSVI ([type definition])
          properties from step to step. Also, there is no way to reorder these steps as the schema
          doesn't accept xml:base attributes but the expansion requires xs:anyURI typed values.</p>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2006Feb/0062.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Henry
            Thompson)</loc></p>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120407</date>
          <edtext>This use case is satisfied, as exemplified in <titleref href="#TBD">7.2.10
              p:xsl-formatter</titleref></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-simple-transform-service">
        <head>A Simple Transformation Service</head>
        <p diff="add">Alex to refactor these use cases: <ulist>
            <item>
              <p><specref ref="use-case-simple-transform-service"/></p>
            </item>
            <item>
              <p><specref ref="use-case-ajax-server"/></p>
            </item>
            <item>
              <p><specref ref="use-case-metadata"/></p>
            </item>
          </ulist></p>
        <olist>
          <item>
            <p>Extract XML document (XForms instance) from an HTTP request body</p>
          </item>
          <item>
            <p>Execute XSLT transformation on that document.</p>
          </item>
          <item>
            <p>Call a persistence service with resulting document</p>
          </item>
          <item>
            <p>Return the XML document from persistence service (new XForms instance) as the HTTP
              response body.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Alex to write example and description of persistence. </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-handheld-service" diff="del">
        <head>Service Request/Response Handling on a Handheld</head>
        <p>Allow an application on a handheld device to construct a pipeline, send the pipeline and
          some data to the server, allow the server to process the pipeline and send the result
          back.</p>
        <p>(source: <bibref ref="xml-core-wg"/>)</p>
        <ednote diff="add">
          <name>TBD</name>
          <date>20120419</date>
          <edtext>This use case is UNSATISFIED and deemed not worth the effort to prove. The Use
            Case is underspecified and we estimate that it would cost up to 1/2 day to create
            example of working pipeline in mobile browser, as suggested by VT.</edtext>
        </ednote>
      </div2>
      <div2 id="use-case-web-service">
        <head>Interact with Web Service (Tide Information)</head>
        <olist>
          <item>
            <p>Parse the incoming XML request.</p>
          </item>
          <item>
            <p>Construct a URL to a REST-style web service at the NOAA (see <loc
                xmlns:xlink="http://www.w3.org/1999/xlink"
                href="http://tidesonline.nos.noaa.gov/geographic.html" xlink:type="simple"
                xlink:show="replace" xlink:actuate="onRequest">website</loc>).</p>
          </item>
          <item>
            <p>Parse the resulting invalid HTML document with by translating and fixing the HTML to
              make it XHTML (e.g. use TagSoup or tidy).</p>
          </item>
          <item>
            <p>Extract the tide information from a plain-text table of data from document by
              applying a regular expression and creating markup from the matches.</p>
          </item>
          <item>
            <p>Use XQuery to select the high and low tides.</p>
          </item>
          <item>
            <p>Formulate an XML response from that tide information.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0021.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Alex
            Milowski)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Alex to write a pipeline to demonstrate.</edtext>
        </ednote>
      </div2>
      <div2 id="use-case-rss-descriptions">
        <head>Parse and/or Serialize RSS descriptions</head>
        <p>Parse descriptions:</p>
        <olist>
          <item>
            <p>Iterate over the RSS description elements and do the following:</p>
            <olist>
              <item>
                <p>Gather the text children of the 'description' element.</p>
              </item>
              <item>
                <p>Parse the contents with a simulated document element in the XHTML namespace.</p>
              </item>
              <item>
                <p>Send the resulting children as the children of the 'description element.</p>
              </item>
            </olist>
          </item>
          <item>
            <p>Apply rest of pipeline steps.</p>
          </item>
        </olist>
        <p>Serialize descriptions</p>
        <olist>
          <item>
            <p>Iterate over the RSS description elements and do the following:</p>
            <olist>
              <item>
                <p>Serialize the children elements.</p>
              </item>
              <item>
                <p>Generate a new child as a text children containing the contents (escaped
                  text).</p>
              </item>
            </olist>
          </item>
          <item>
            <p>Apply rest of pipeline steps.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0021.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Alex
            Milowski)</loc></p>
        <ednote diff="add">
          <name>Alex Milowski</name>
          <name>Satisfied</name>
          <date/>
          <edtext>This use case is satisfied, as exemplified in the following example:</edtext>
        </ednote>
        <p>Part 1: Parsing the descriptions:</p>
        <eg>&lt;?xml version="1.0" encoding="UTF-8"?> &lt;p:declare-step
          xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
          version="1.0" type="e:get-rss" xmlns:e="http://example.org/steps"> &lt;p:output
          port="result"/> &lt;p:http-request> &lt;p:input port="source"> &lt;p:inline> &lt;c:request
          method="GET" href="http://rss.cnn.com/rss/cnn_topstories.rss"/> &lt;/p:inline>
          &lt;/p:input> &lt;/p:http-request> &lt;p:viewport match="description">
          &lt;p:unescape-markup/> &lt;/p:viewport> &lt;/p:declare-step></eg>
        <p>Part 2: Escaping the description markup:</p>
        <eg>&lt;?xml version="1.0" encoding="UTF-8"?> &lt;p:declare-step
          xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
          version="1.0" xmlns:e="http://example.org/steps"> &lt;p:output port="result"/>
          &lt;p:import href="use-case-5-15.xpl"/> &lt;e:get-rss/> &lt;p:viewport
          match="description"> &lt;p:escape-markup/> &lt;/p:viewport> &lt;/p:declare-step></eg>
      </div2>
      <div2 id="use-case-collections">
        <head>XQuery and XSLT 2.0 Collections</head>
        <p>In XQuery and XSLT 2.0 there is the idea of an input and output collection and a pipeline
          must be able to consume or produce collections of documents both as inputs or outputs of
          steps as well as whole pipelines.</p>
        <p>For example, for input collections:</p>
        <olist>
          <item>
            <p>Accept a collection of documents.</p>
          </item>
          <item>
            <p>Apply a single XSLT 2.0 transformation that processes the collection and produces
              another collection.</p>
          </item>
          <item>
            <p>Serialize the collection to files or URIs.</p>
          </item>
        </olist>
        <p>For example, for output collections:</p>
        <olist>
          <item>
            <p>Accept a single document as input.</p>
          </item>
          <item>
            <p>Apply an XQuery that produces a sequence of documents (a collection).</p>
          </item>
          <item>
            <p>Serialize the collection to files or URIs.</p>
          </item>
        </olist>
        <ednote diff="add">
          <name>Satisfied</name>
          <date>20120425</date>
          <edtext>This use case is satisfied, as exemplified the sample pipeline.</edtext>
        </ednote>
        <eg xml:space="preserve">&lt;p:pipeline name="main" version="1.0"
           xmlns:cx="http://xmlcalabash.com/ns/extensions"
           xmlns:p="http://www.w3.org/ns/xproc">

&lt;p:declare-step type="cx:collection-manager">
  &lt;p:input port="source" sequence="true"/>
  &lt;p:output port="result" sequence="true" primary="false"/>
  &lt;p:option name="href" required="true"/>
&lt;/p:declare-step>

&lt;cx:collection-manager name="cxmgr" href="http://example.org/collection">
 &lt;p:input port="source">
   &lt;p:inline>&lt;doc1/>&lt;/p:inline>
   &lt;p:inline>&lt;doc2/>&lt;/p:inline>
   &lt;p:inline>&lt;doc3/>&lt;/p:inline>
 &lt;/p:input>
&lt;/cx:collection-manager>

&lt;p:xslt>
 &lt;p:input port="source">
   &lt;p:pipe step="cxmgr" port="result"/>
 &lt;/p:input>
 &lt;p:input port="stylesheet">
   &lt;p:inline>
     &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
        &lt;xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes"/>
        &lt;xsl:param name="collection" select="'http://example.org/collection'"/>
        &lt;xsl:template match="/">
         &lt;collection uri="{$collection}">
           &lt;xsl:value-of select="count(collection($collection))"/>
         &lt;/collection>
        &lt;/xsl:template>
     &lt;/xsl:stylesheet>
   &lt;/p:inline>
 &lt;/p:input>
&lt;/p:xslt>

&lt;/p:pipeline>
</eg>
      </div2>
      <div2 id="use-case-ajax-server" diff="chg">
        <head>An AJAX Server</head>
        <olist>
          <item>
            <p>Receive XML request with word to complete.</p>
          </item>
          <item>
            <p>Call a sub-pipeline that retrieves list of completions for that word.</p>
          </item>
          <item>
            <p>Format resulting document with XSLT.</p>
          </item>
          <item>
            <p>Serialize response to XML.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>REFACTOR</name>
          <date/>
          <edtext>This use case to be refactored into <specref
              ref="use-case-simple-transform-service"/>
          </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-dynamic-xquery">
        <head>Dynamic XQuery</head>
        <olist>
          <item>
            <p>Dynamically create an XQuery query using XSLT, based on input XML document.</p>
          </item>
          <item>
            <p>Execute the XQuery against a database.</p>
          </item>
          <item>
            <p>Construct an XHTML result page using XSLT from the result of the query.</p>
          </item>
          <item>
            <p>Serialize response to HTML.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Norm to write a pipeline to demonstrate.</edtext>
        </ednote>
        <p>This pipeline accepts a "uri" document on the source port, uses that URI to construct a
          (brain-dead simple) query against a database, runs that query, and styles the result.</p>
        <eg xml:space="preserve">&lt;p:declare-step name="main" version="1.0"
               xmlns:c="http://www.w3.org/ns/xproc-step"
               xmlns:ml="http://xmlcalabash.com/ns/extensions/marklogic"
               xmlns:p="http://www.w3.org/ns/xproc">
&lt;p:input port="source">
 &lt;p:inline>
   &lt;uri>/2003/08/20/fungus&lt;/uri>
 &lt;/p:inline>
&lt;/p:input>
&lt;p:output port="result"/>
&lt;p:input port="parameters" kind="parameter"/>

&lt;p:declare-step type="ml:adhoc-query">
  &lt;p:input port="source"/>
  &lt;p:input port="parameters" kind="parameter"/>
  &lt;p:output port="result" sequence="true"/>
  &lt;p:option name="host"/>
  &lt;p:option name="port"/>
  &lt;p:option name="user"/>
  &lt;p:option name="password"/>
  &lt;p:option name="content-base"/>
  &lt;p:option name="wrapper"/>
&lt;/p:declare-step>

&lt;p:template>
 &lt;p:input port="template">
   &lt;p:inline>
     &lt;c:xquery>
       doc("/production{string(/uri)}.xml")
     &lt;/c:xquery>
   &lt;/p:inline>
 &lt;/p:input>
 &lt;p:input port="source">
   &lt;p:pipe step="main" port="source"/>
 &lt;/p:input>
&lt;/p:template>

&lt;ml:adhoc-query host="localhost" port="8404" user="admin" password="password"/>

&lt;p:xslt>
 &lt;p:input port="stylesheet">
   &lt;p:document href="essay.xsl"/>
 &lt;/p:input>
&lt;/p:xslt>

&lt;/p:declare-step>
</eg>
      </div2>
      <div2 id="use-case-rw-non-xml">
        <head>Read/Write Non-XML File</head>
        <p>Relates to <specref ref="input-arch-content"/> and <specref ref="use-case-rw-non-xml"/>
          and <specref ref="use-case-non-xml-production"/></p>
        <olist>
          <item>
            <p>Read a CSV <bibref ref="CSV" diff="add"/> file and convert it to XML.</p>
          </item>
          <item>
            <p>Process the document with XSLT.</p>
          </item>
          <item>
            <p>Convert the result to a CSV format using text serialization.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>UNSATISFIED</name>
          <date>20120407</date>
          <edtext>This use case is UNSATISFIED. Relates to XProc Architecture: <specref
              ref="input-arch-content"/>. An example, possibly relying on a shell command for
            conversion to/from CSV format could be constructed, but that would miss the point; XProc
            could/should have native ability to convert to/from trivial data formats such as CSV and
            JSON. Presumably there are algorithmic transforms. Vojtech to provide reference to XML
            Prague paper.</edtext>
        </ednote>
        <p diff="add">The specific use case described in 5.19 (converting a CSV file to XML) can be
          solved by using XSLT 2.0 to tokenize the CSV data and turn it into XML. The example below
          uses the stylesheet developed by Andrew Welsh
          (http://andrewjwelch.com/code/xslt/csv/csv-to-xml_v2.html):</p>
        <eg xml:space="preserve" diff="add">&lt;p:declare-step >
 &lt;p:output port="result"/>
 &lt;p:option name="pathToCSV" required="true"/>

 &lt;p:xslt template-name="main">
   &lt;p:input port="source">
     &lt;p:empty/>
   &lt;/p:input>
   &lt;p:input port="stylesheet">
     &lt;p:document href="http://andrewjwelch.com/code/xslt/csv/csv-to-xml_v2.xslt"/>
   &lt;/p:input>
   &lt;!-- note that relative paths are resolved against the stylesheet's base URI -->
   &lt;p:with-param name="pathToCSV" select="$pathToCSV"/>
 &lt;/p:xslt>
&lt;/p:declare-step></eg>
        <p diff="add">In this solution, the stylesheet loads the CSV file. I think it should be
          straightforward to modify the pipeline/stylesheet so that the pipeline itself loads the
          CSV file (using p:data or p:http-request) and passes the c:data-wrapped representation to
          the stylesheet.</p>
      </div2>
      <div2 id="use-case-update-insert-db">
        <head>Update/Insert Document in Database</head>
        <olist>
          <item>
            <p>Receive an XML document to save.</p>
          </item>
          <item>
            <p>Check the database to see if the document exists.</p>
          </item>
          <item>
            <p>If the document exists, update the document.</p>
          </item>
          <item>
            <p>If the document does not exists, add the document.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date>20120419</date>
          <edtext>This use case is TBD.. There is no specific language in <titleref
              href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref> to
            suggest communication with a database engine. Certainly, there are no references to SQL
            or other database languages. Examples available from Norm, Vojtech. Requirement for new
            atomic steps for database access? This is an open issue.</edtext>
        </ednote>
        <eg xml:space="preserve">Need an example showing a step accessing a DB.</eg>
      </div2>
      <div2 id="use-case-content-depend">
        <head>Content-Dependent Transformations</head>
        <olist>
          <item>
            <p>Receive an XML document to format.</p>
          </item>
          <item>
            <p>If the document is XHTML, apply a theme via XSLT and serialize as HTML.</p>
          </item>
          <item>
            <p>If the document is XSL-FO, apply an XSL FO processor to produce PDF.</p>
          </item>
          <item>
            <p>Otherwise, serialize the document as XML.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Vojtech to write pipeline to demonstrate.</edtext>
        </ednote>
        <p>This one is a little tricky as XProc does not support specifying serialization options on
          output ports dynamically. Because of that, it is not possible to write a pipeline with a
          single "result" output port that uses different serialization options that depend on the
          (dynamic) data content type. One solution is to have multiple output ports ("result-html",
          "result-xml", ...) with different serialization options, but that's probably silly and too
          inconvenient to work with (plus it does not work with non-XML data). Another solution is
          not to have any output ports at all and use p:store instead. The drawback of this is that
          p:store writes the data to an external location and therefore breaks the pipeline flow,
          but you can have multiple p:store steps with different serialization options, or you can
          even set the serialization options on p:store dynamically. Because the p:xsl-formatter
          renders the XSL-FO document to an external location, I went for the p:store solution:
          <eg xml:space="preserve">&lt;p:declare-step            
           xmlns:html="http://www.w3.org/1999/xhtml"
           xmlns:fo="http://www.w3.org/1999/XSL/Format">

 &lt;p:input port="source"/>
 &lt;p:option name="output" required="true"/>

 &lt;p:choose>
   &lt;p:when test="/html:html">
     &lt;!-- apply a theme using XSLT and serialize as HTML -->
     &lt;p:xslt>
       &lt;p:input port="stylesheet">
         &lt;p:document href="style.xsl"/>
       &lt;/p:input>
       &lt;p:input port="parameters">
         &lt;p:empty/>
       &lt;/p:input>
     &lt;/p:xslt>
     &lt;p:store method="html">
       &lt;p:with-option name="href" select="$output"/>
     &lt;/p:store>
   &lt;/p:when>
   &lt;p:when test="/fo:root">
     &lt;!-- apply an XSL-FO processor-->
     &lt;p:xsl-formatter>
       &lt;p:with-option name="href" select="$output"/>
       &lt;p:input port="parameters">
         &lt;p:empty/>
       &lt;/p:input>
     &lt;/p:xsl-formatter>
   &lt;/p:when>
   &lt;p:otherwise>
     &lt;!-- serialize as XML -->
     &lt;p:store>
       &lt;p:with-option name="href" select="$output"/>
     &lt;/p:store>
   &lt;/p:otherwise>
 &lt;/p:choose>
&lt;/p:declare-step>
</eg></p>
      </div2>
      <div2 id="use-case-config-depend">
        <head>Configuration-Dependent Transformations</head>
        <p>Mobile example:</p>
        <olist>
          <item>
            <p>Receive an XML document to format.</p>
          </item>
          <item>
            <p>If the configuration is "desktop browser", apply desktop XSLT and serialize as
              HTML.</p>
          </item>
          <item>
            <p>If the configuration is "mobile browser", apply mobile XSLT and serialize as
              XHTML.</p>
          </item>
        </olist>
        <p>News feed example:</p>
        <olist>
          <item>
            <p>Receive an XML document in Atom format.</p>
          </item>
          <item>
            <p>If the configuration is "RSS 1.0", apply "Atom to RSS 1.0" XSLT.</p>
          </item>
          <item>
            <p>If the configuration is "RSS 2.0", apply "Atom to RSS 2.0" XSLT.</p>
          </item>
          <item>
            <p>Serialize the document as XML.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Vojtech to write pipeline to demonstrate.</edtext>
        </ednote>
        <p>The newsfeed example (the mobile example is just a combination of the newsfeed example
          and 5.21):</p>
        <eg xml:space="preserve">&lt;p:pipeline >

 &lt;p:option name="configuration" required="true"/>

 &lt;p:choose>
   &lt;p:when test="$configuration='RSS 1.0'">
     &lt;p:xslt>
       &lt;p:input port="stylesheet">
         &lt;p:document href="atom-to-rss-10.xsl"/>
       &lt;/p:input>
     &lt;/p:xslt>
   &lt;/p:when>
   &lt;p:when test="$configuration='RSS 2.0'">
     &lt;p:xslt>
       &lt;p:input port="stylesheet">
         &lt;p:document href="atom-to-rss-20.xsl"/>
       &lt;/p:input>
     &lt;/p:xslt>
   &lt;/p:when>
 &lt;/p:choose>
&lt;/p:pipeline>

</eg>
      </div2>
      <div2 id="use-case-xml-rpc">
        <head>Response to XML-RPC Request</head>
        <olist>
          <item>
            <p>Receive an XML-RPC request.</p>
          </item>
          <item>
            <p>Validate the XML-RPC request with a RelaxNG schema.</p>
          </item>
          <item>
            <p>Dispatch to different sub-pipelines depending on the content of
              /methodCall/methodName.</p>
          </item>
          <item>
            <p>Format the sub-pipeline response to XML-RPC format via XSLT.</p>
          </item>
          <item>
            <p>Validate the XML-RPC response with an W3C XML Schema.</p>
          </item>
          <item>
            <p>Return the XML-RPC response.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Duplicates <specref ref="use-case-simple-transform-service"/> and
              <specref ref="use-case-ajax-server"/>. Some conditional sub-pipeline. Vojtech to write
            pipeline to demonstrate.</edtext>
        </ednote>
        <p diff="add">This pipeline takes an XML-RPC request document and invokes a method (an XProc
          pipeline) based on the value of /methodCall/methodName. Because there is no standard
          p:eval step for dynamic evaluation of XProc pipelines, we have to use p:choose which lists
          all possible pipelines statically. </p>
        <p diff="add">The pipeline below is rather simplistic in the sense that it does not try to
          interpret XMLRPC's "int", "string", "struct", etc. elements. The input data is passed in
          the original XMLRPC format to the invoked pipelines, and likewise, the pipelines are
          expected to represent their results in XMLRPC format.</p>
        <eg xml:space="preserve">&lt;p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
           version="1.0"
           xmlns:ex="http://www.example.org">

 &lt;!-- Defines various 'method' pipelines in the "http://www.example.org" namespace.
      Pipeline interface contract:
      - a single (primary) input port
      - a single (primary output port)
      - expect a single &lt;params> input document
      - produce a single &lt;params> or &lt;fault> output document
 -->
 &lt;p:import href="method-library.xpl"/>

 &lt;p:pipeline type="ex:invoke-method">
   &lt;p:variable name="method" select="/methodCall/methodName"/>

   &lt;p:identity>
     &lt;p:input port="source" select="/methodCall/params"/>
   &lt;/p:identity>

   &lt;p:try>
     &lt;p:group>
       &lt;!-- Note: the p:choose could be replaced with a single call
            to p:eval if we had such a step -->
       &lt;p:choose>
         &lt;p:when test="$method = 'method1'">
           &lt;ex:method1/>
         &lt;/p:when>
         &lt;p:when test="$method = 'method2'">
           &lt;ex:method2/>
         &lt;/p:when>
         &lt;p:otherwise>
           &lt;p:template name="error-message">
             &lt;p:input port="template">
               &lt;p:inline>
                 &lt;message>Unsupported method: {$method}&lt;/message>
               &lt;/p:inline>
             &lt;/p:input>
             &lt;p:with-param name="method" select="$method"/>
           &lt;/p:template>
           &lt;p:error code="ex:error">
             &lt;p:input port="source">
               &lt;p:pipe step="error-message" port="result"/>
             &lt;/p:input>
           &lt;/p:error>
         &lt;/p:otherwise>
       &lt;/p:choose>
     &lt;/p:group>

     &lt;p:catch name="catch">
       &lt;p:template>
         &lt;p:input port="source">
           &lt;p:pipe step="catch" port="error"/>
         &lt;/p:input>
         &lt;p:input port="template">
           &lt;p:inline>
             &lt;fault>
               &lt;value>
                 &lt;struct>
                   &lt;member>
                     &lt;name>faultCode&lt;/name>
                     &lt;value>&lt;int>-1&lt;/int>&lt;/value>
                   &lt;/member>
                   &lt;member>
                     &lt;name>faultString&lt;/name>
                     &lt;value>&lt;string>{string(/*)}&lt;/string>&lt;/value>
                   &lt;/member>
                 &lt;/struct>
               &lt;/value>
             &lt;/fault>
           &lt;/p:inline>
         &lt;/p:input>
       &lt;/p:template>
     &lt;/p:catch>
   &lt;/p:try>
   &lt;p:wrap-sequence wrapper="methodResponse"/>
 &lt;/p:pipeline>

 &lt;p:validate-with-relax-ng>
   &lt;p:input port="schema">
     &lt;p:data href="xmlrpc.rnc" content-type="text/plain"/>
   &lt;/p:input>
 &lt;/p:validate-with-relax-ng>

 &lt;ex:invoke-method/>

 &lt;p:validate-with-xml-schema>
   &lt;p:input port="schema">
     &lt;p:document href="xmlrpc-response.xsd"/>
   &lt;/p:input>
 &lt;/p:validate-with-xml-schema>

&lt;/p:pipeline>
</eg>
      </div2>
      <div2 id="use-case-import-ingestion">
        <head>Database Import/Ingestion</head>
        <p>Import example:</p>
        <olist>
          <item>
            <p>Read a list of source documents.</p>
          </item>
          <item>
            <p>For each document in the list:</p>
            <olist>
              <item>
                <p>Validate the document.</p>
              </item>
              <item>
                <p>Call a sub-pipeline to insert content into a relational or XML database.</p>
              </item>
            </olist>
          </item>
        </olist>
        <p>Ingestion example:</p>
        <olist>
          <item>
            <p>Receive a directory name.</p>
          </item>
          <item>
            <p>Produce a list of files in the directory as an XML document.</p>
          </item>
          <item>
            <p>For each element representing a file:</p>
            <olist>
              <item>
                <p>Create an iTQL query using XSLT.</p>
              </item>
              <item>
                <p>Query the repository to check if the file has been uploaded.</p>
              </item>
              <item>
                <p>Upload if necessary.</p>
              </item>
              <item>
                <p>Inspect the file to check the metadata type.</p>
              </item>
              <item>
                <p>Transform the document with XSLT.</p>
              </item>
              <item>
                <p>Make a SOAP call to ingest the document.</p>
              </item>
            </olist>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. A db Access Requirement emerges from combining <specref
              ref="use-case-update-insert-db"/> with <specref ref="use-case-import-ingestion"/>.
            Someone to write up a proposal. MM to create related topics.</edtext>
        </ednote>
      </div2>
      <div2 id="use-case-metadata" diff="chg">
        <head>Metadata Retrieval</head>
        <p diff="add">Relates to <specref ref="input-arch-content"/></p>
        <olist>
          <item>
            <p>Call a SOAP service with metadata format as a parameter.</p>
          </item>
          <item>
            <p>Create an iTQL query with XSLT.</p>
          </item>
          <item>
            <p>Query a repository for the XML document.</p>
          </item>
          <item>
            <p>Load a list of XSLT transformations from a configuration.</p>
          </item>
          <item>
            <p>Iteratively execute the XSLT transformations.</p>
          </item>
          <item>
            <p>Serialize the result to XML.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0020.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Erik
            Bruchez)</loc></p>
        <ednote diff="add">
          <name>REFACTOR</name>
          <date/>
          <edtext>This use case to be refactored into <specref
              ref="use-case-simple-transform-service"/>
          </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-non-xml-production">
        <head>Non-XML Document Production</head>
        <p>Relates to <specref ref="input-arch-content"/> and <specref ref="use-case-rw-non-xml"/>
          and <specref ref="use-case-non-xml-production"/></p>
        <olist>
          <item>
            <p>A non-XML document is fed into the process.</p>
          </item>
          <item>
            <p>That input is converted into a well-formed XML document.</p>
          </item>
          <item>
            <p>A table of contents is extracted.</p>
          </item>
          <item>
            <p>Pagination is performed.</p>
          </item>
          <item>
            <p>Each page is transformed into some output language.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0016.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Rui
            Lopes)</loc></p>
        <olist>
          <item>
            <p>Read a non-XML document.</p>
          </item>
          <item>
            <p>Transform.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0012.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Norm
            Walsh)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. See new steps. </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-computations" diff="del">
        <head>Integrate Computation Components (MathML)</head>
        <p diff="add"/>
        <olist>
          <item>
            <p>Select a MathML content element.</p>
          </item>
          <item>
            <p>For that element, apply a computation (e.g. compute the kernel of a matrix).</p>
          </item>
          <item>
            <p>Replace the input MathML with the output of the computation.</p>
          </item>
        </olist>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/0021.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Alex
            Milowski)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is [not] satisfied. Alex to write. See instead: refactoring at end
            of <specref ref="use-case-extract-mathml"/></edtext>
        </ednote>
      </div2>
      <div2 id="use-case-dsdl-validation">
        <head>Document Schema Definition Languages (DSDL) - Part 10: Validation Management</head>
        <p>This document provides a test scenario that will be used to create validation management
          scripts using a range of existing techniques, including those used for program
          compilation, etc.</p>
        <p>The steps required to validate our sample document are:</p>
        <olist>
          <item>
            <p>Use ISO 19757-4 Namespace-based Validation Dispatching Language (NVDL) to split out
              the parts of the document that are encoded using HTML, SVG and MathML from the bulk of
              the document, whose tags are defined using a user-defined set of markup tags.</p>
          </item>
          <item>
            <p>Validate the HTML elements and attributes using the HTML 4.0 DTD (W3C XML DTD).</p>
          </item>
          <item>
            <p>Use a set of Schematron rules stored in check-metadata.xml to ensure that the
              metadata of the HTML elements defined using Dublin Core semantics conform to the
              information in the document about the document's title and subtitle, author, encoding
              type, etc.</p>
          </item>
          <item>
            <p>Validate the SVG components of the file using the standard W3C schema provided in the
              SVG 1.2 specification.</p>
          </item>
          <item>
            <p>Use the Schematron rules defined in SVG-subset.xml to ensure that the SVG file only
              uses those features of SVG that are valid for the particular SVG viewer available to
              the system.</p>
          </item>
          <item>
            <p>Validate the MathML components using the latest version of the MathML schema (defined
              in RELAX-NG) to ensure that all maths fragments are valid. The schema will make use
              the datatype definitions in check-maths.xml to validate the contents of specific
              elements.</p>
          </item>
          <item>
            <p>Use MathML-SVG.xslt to transform the MathML segments to displayable SVG and replace
              each MathML fragment with its SVG equivalent.</p>
          </item>
          <item>
            <p>Use the ISO 19757-8 Document Schema Renaming Language (DSRL) definitions in
              convert-mynames.xml to convert the tags in the local nameset to the form that can be
              used to validate the remaining part of the document using docbook.dtd.</p>
          </item>
          <item>
            <p>Use the IS0 19757-7 Character Repertoire Definition Language (CRDL) rules defined in
              mycharacter-checks.xml to validate that the correct character sets have been used for
              text identified as being Greek and Cyrillic.</p>
          </item>
          <item>
            <p>Convert the Docbook tags to HTML so that they can be displayed in a web browser using
              the docbook-html.xslt transformation rules.</p>
          </item>
        </olist>
        <p>Each validation script should allow the four streams produced by step 1 to be run in
          parallel without requiring the other validations to be carried out if there is an error in
          another stream. This means that steps 2 and 3 should be carried out in parallel to steps 4
          and 5, and/or steps 6 and 7 and/or steps 8 and 9. After completion of step 10 the HTML
          (both streams), and SVG (both streams) should be recombined to produce a single stream
          that can fed to a web browser. The flow is illustrated in the following diagram:</p>
        <p><graphic xmlns:xlink="http://www.w3.org/1999/xlink" alt="DSDL use case graphic"
            source="dsdl.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/></p>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2005Dec/att-0007/Part10Reqs.htm"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Martin
            Bryan)</loc></p>
        <ednote diff="add">
          <name>TBD</name>
          <date/>
          <edtext>This use case is not satisfied. Proposed new step <specref ref="step-nvdl"/>
            relates to this Use Case. Should we allow steps to have varying # of outputs. Norm to
            write up an explanation of related problems. p:manifold? Henry doubts it's worth the
            effort. </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-large-document-transform">
        <head>Large-Document Subtree Iteration</head>
        <p diff="add">Relates to <specref ref="newsteps-iteration"/></p>
        <p>Relates to <specref ref="usability-XPath"/></p>
        <p>Running XSLT on a very large document isn't typically practical. In these cases, it is
          often the case that a particular element, that may be repeated over-and-over again, needs
          to be transformed. Conceptually, a pipeline could limit the transformation to a subtree
          by:</p>
        <olist>
          <item>
            <p>Limiting the transform to a subtree of the document identified by an XPath.</p>
          </item>
          <item>
            <p>For each subtree, cache the subtree and build a whole document with the identified
              element as the document element and then run a transform to replace that subtree in
              the original document.</p>
          </item>
          <item>
            <p>For any non-matches, the document remains the same and "streams" around the
              transform.</p>
          </item>
        </olist>
        <p>This allows the transform and the tree building to be limited to a small subtree and the
          rest of the process to stream. As such, an arbitrarily large document can be processed in
          a bounded amount of memory.</p>
        <p><loc xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2006Jan/0005.html"
            xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">(source: Alex
            Milowski)</loc></p>
        <ednote diff="add">
          <name>Alex Milowski</name>
          <name>Satisfied</name>
          <date>30 May 2012</date>
          <edtext>This use case is satisfied, as exemplified in the example below. Merge with 5.30
          </edtext>
        </ednote>
        <eg>&lt;?xml version="1.0" encoding="UTF-8"?> &lt;p:declare-step
          xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
          version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"> &lt;p:input port="source">
          &lt;p:inline> &lt;html xmlns="http://www.w3.org/1999/xhtml"> &lt;head>&lt;title>Test
          Document&lt;/title>&lt;/head> &lt;body> &lt;div class="main"> &lt;p>I can be arbitrarily
          large.&lt;/p> &lt;/div> &lt;/body> &lt;/html> &lt;/p:inline> &lt;/p:input> &lt;p:output
          port="result"/> &lt;p:insert position="first-child" match="/xhtml:html/xhtml:body">
          &lt;p:input port="insertion" xmlns="http://www.w3.org/1999/xhtml"> &lt;p:inline> &lt;ul
          class="navigation"> &lt;li>&lt;a href="/about/">About&lt;/a>&lt;/li> &lt;li>&lt;a
          href="/xml/">Fantastic XML Stuff&lt;/a>&lt;/li> &lt;li>&lt;a href="/cats/">Pictures of
          Cats&lt;/a>&lt;/li> &lt;/ul> &lt;/p:inline> &lt;/p:input> &lt;/p:insert>
          &lt;/p:declare-step> </eg>
      </div2>
      <div2 id="use-case-add-nav">
        <head>Adding Navigation to an Arbitrarily Large Document</head>
        <p>Relates to <specref ref="usability-XPath"/></p>
        <p>For a particular website, every XHTML document needs to have navigation elements added to
          the document. The navigation is static text that surrounds the body of the document. This
          navigation is added by:</p>
        <olist>
          <item>
            <p>Matching the head and body elements using a XPath expression that can be
              streamed.</p>
          </item>
          <item>
            <p>Inserting a stub for a transformation for including the style and surrounding
              navigation of the site.</p>
          </item>
          <item>
            <p>For each of the stubs, transformations insert the markup using a subtree expansion
              that allows the rest of the document to stream.</p>
          </item>
        </olist>
        <p>In the end, the pipeline allows arbitrarily large XHTML document to be processed with a
          near-constant cost.</p>
        <p>(source: Alex Milowski)</p>
        <ednote diff="add">
          <name>Alex Milowski</name>
          <name>Satisfied</name>
          <date>30 May 2012</date>
          <edtext>This use case is satisfied, as exemplified in the example above. </edtext>
        </ednote>
      </div2>
      <div2 id="use-case-fallback-choice">
        <head>Fallback to Choice of XSLT Processor</head>
        <p diff="add">Relates to <specref ref="integration-fallback"/></p>
        <p>A step in a pipeline produces multiple output documents. In XSLT 2.0, this is a standard
          feature of all XSLT 2.0 processors. In XSLT 1.0, this is not standard.</p>
        <p>A pipeline author wants to write a pipeline that, at compile-time, the implementation
          chooses XSLT 2.0 when possible and degrades to XSLT 1.0 when XSLT 2.0 is not supported. </p>
        <p>In the case of XSLT 1.0, the step will use XSLT extensions to support the multiple output
          documents--which again may fail. Fortunately, the XSLT 1.0 transformation can be written
          to test for this.</p>
        <p>(source: Alex Milowski)</p>
        <ednote diff="add">
          <name>UNSATISFIED</name>
          <date/>
          <edtext>This use case is [not] satisfied, as exemplified in <titleref href="#TBD"
              >TBD</titleref>. Try/catch no good. Vojtech &amp; Norm. XSLT 1.0 processor does not
            handle. </edtext>
        </ednote>
        <p>The pipeline below does the following:</p>
        <olist>
          <item>
            <p>Checks if XSLT 2.0 is supported. </p>
          </item>
          <item>
            <p>If XSLT 2.0 is available, it applies an XSLT 2.0 stylesheet to the input XML
              document. The stylesheet uses xsl:result-document to generate secondary output
              documents. </p>
          </item>
          <item>
            <p>If XSLT 2.0 is not available, it applies an XSLT 1.0 stylesheet. The stylesheet uses
              either the exsl:document or result:write extension (whichever is available) to
              generate secondary output documents.</p>
          </item>
        </olist>
        <p>The pipeline has two output ports: the "result" output port for the primary result of the
          XSLT transformation, and "secondary" for the secondary documents.</p>
        <p>...the pipeline almost works. The problem is with the XSLT 1.0 transformation, because
          the secondary documents do not appear on the "secondary" step of the p:xslt step. This is
          actually a requirement made by the XProc specification: "If XSLT 1.0 is used, an empty
          sequence of documents must appear on the secondary port." The exact behavior of
          exsl:document and result:write in the XProc context is implementation-defined; in most
          cases, the generated documents will be simply written to the specified external
          location.</p>
        <eg xml:space="preserve">&lt;p:pipeline name="main"
           xmlns:ex="http://www.example.org" >

 &lt;p:output port="secondary" sequence="true">
   &lt;p:pipe step="process" port="secondary"/>
 &lt;/p:output>

 &lt;p:declare-step type="ex:is-xslt20-supported">
   &lt;p:output port="result"/>
   &lt;p:try>
     &lt;p:group>
       &lt;p:xslt version="2.0">
         &lt;p:input port="source">&lt;p:inline>&lt;foo/>&lt;/p:inline>&lt;/p:input>
         &lt;p:input port="stylesheet">
           &lt;p:inline>
             &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
               &lt;xsl:template match="/">
                 &lt;true>&lt;xsl:value-of select="1 to 2"/>&lt;/true>
               &lt;/xsl:template>
             &lt;/xsl:stylesheet>
           &lt;/p:inline>
         &lt;/p:input>
         &lt;p:input port="parameters">&lt;p:empty/>&lt;/p:input>
       &lt;/p:xslt>
     &lt;/p:group>
     &lt;p:catch>
       &lt;p:identity>
         &lt;p:input port="source">
           &lt;p:inline>&lt;false/>&lt;/p:inline>
         &lt;/p:input>
       &lt;/p:identity>
     &lt;/p:catch>
   &lt;/p:try>
 &lt;/p:declare-step>


 &lt;ex:is-xslt20-supported/>

 &lt;p:choose name="process">
   &lt;p:when test="/true">
     &lt;p:output port="result" primary="true"/>
     &lt;p:output port="secondary" sequence="true">
       &lt;p:pipe step="xslt" port="secondary"/>
     &lt;/p:output>

     &lt;p:xslt name="xslt" version="2.0">
       &lt;p:input port="source">&lt;p:pipe step="main" port="source"/>&lt;/p:input>
       &lt;p:input port="stylesheet">
         &lt;p:inline>
           &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
             &lt;xsl:template name="generate-secondary-content">
               &lt;doc>Hello world!&lt;/doc>
             &lt;/xsl:template>

             &lt;xsl:template match="/">
               &lt;xsl:result-document href="foo.xml">
                 &lt;xsl:call-template name="generate-secondary-content"/>
               &lt;/xsl:result-document>
               &lt;ignored/>
             &lt;/xsl:template>
           &lt;/xsl:stylesheet>
         &lt;/p:inline>
       &lt;/p:input>
     &lt;/p:xslt>
   &lt;/p:when>

   &lt;p:otherwise>
     &lt;p:output port="result" primary="true"/>
     &lt;p:output port="secondary" sequence="true">
       &lt;p:pipe step="xslt" port="secondary"/>
     &lt;/p:output>

     &lt;p:xslt name="xslt" version="1.0">
       &lt;p:input port="source">&lt;p:pipe step="main" port="source"/>&lt;/p:input>
       &lt;p:input port="stylesheet">
         &lt;p:inline>
           &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                           xmlns:exsl="http://exslt.org/common"
                           xmlns:redirect="http://xml.apache.org/xalan/redirect"
                           extension-element-prefixes="exsl redirect" version="1.0">
             &lt;xsl:template name="generate-secondary-content">
               &lt;doc>Hello world!&lt;/doc>
             &lt;/xsl:template>

             &lt;xsl:template match="/">
               &lt;exsl:document href="foo.xml">
                 &lt;xsl:call-template name="generate-secondary-content"/>
                 &lt;xsl:fallback>
                   &lt;redirect:write file="foo.xml">
                     &lt;xsl:call-template name="generate-secondary-content"/>
                   &lt;/redirect:write>
                 &lt;/xsl:fallback>
               &lt;/exsl:document>
               &lt;ignored/>
             &lt;/xsl:template>
           &lt;/xsl:stylesheet>
         &lt;/p:inline>
       &lt;/p:input>
     &lt;/p:xslt>
   &lt;/p:otherwise>
 &lt;/p:choose>

&lt;/p:pipeline></eg>
      </div2>
      <div2 id="use-case-no-fallback-error">
        <head>No Fallback for XQuery Causes Error</head>
        <p diff="add">Relates to <specref ref="integration-fallback"/></p>
        <p>As the final step in a pipeline, XQuery is required to be run. If the XQuery step is not
          available, the compilation of the pipeline needs to fail. Here the pipeline author has
          chosen that the pipeline must not run if XQuery is not available.</p>
        <p>(source: Alex Milowski)</p>
        <ednote diff="add">
          <name>Alex Milowski</name>
          <name>SATISFIED</name>
          <date/>
          <edtext>This use case is satisfied, as exemplified in the following example. Step
            available. Fails at run time rather than compile time. </edtext>
        </ednote>
        <eg>&lt;p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
          xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"> &lt;p:output port="result"/>
          &lt;p:template> &lt;p:input port="template"> &lt;p:inline> &lt;root> Is XQuery available :
          { $has-xquery } &lt;/root> &lt;/p:inline> &lt;/p:input> &lt;p:input port="source">
          &lt;p:empty/> &lt;/p:input> &lt;p:with-param name="has-xquery"
          select="p:step-available('p:xquery')"/> &lt;/p:template> &lt;/p:declare-step></eg>
      </div2>
    </div1>
  </body>
  <back>
    <div1 id="references">
      <head>Normative References</head>
      <div2 id="refs-documents">
        <head>Reference Documents</head>
        <blist>
          <bibl xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xproc/"
            id="xproc" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest" diff="add"
              ><titleref href="http://www.w3.org/TR/xproc/" diff="add">XProc: An XML Pipeline
              Language</titleref></bibl>
          <bibl xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://www.w3.org/TR/xproc-requirements/" xlink:type="simple" xlink:show="replace"
            xlink:actuate="onRequest" id="xproc-req"><titleref
              href="http://www.w3.org/TR/xproc-requirements/" diff="add">XML Processing Model
              Requirements and Use Cases</titleref></bibl>
          <bibl id="RFC-2119" href="http://www.ietf.org/rfc/rfc2119.txt">[RFC 2119] <titleref
              href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate
              Requirement Levels</titleref>. S. Bradner. Network Working Group, IETF, Mar 1997.
          </bibl>
        </blist>
        <blist>
          <bibl href="XML processor profiles" id="xml-proc-profiles"><titleref
              href="XML processor profiles">XML processor profiles</titleref>. Henry S. Thompson,
            Norman Walsh, James Fuller. W3C Working Draft 24 January 2012. </bibl>
          <bibl xmlns:xlink="http://www.w3.org/1999/xlink"
            href="http://www.w3.org/TR/proc-model-req/" id="xml-core-wg" xlink:type="simple"
            xlink:show="replace" xlink:actuate="onRequest">
            <titleref xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">XML Processing
              Model Requirements</titleref>. Dmitry Lenkov, Norman Walsh, editors. W3C Working Group
            Note 05 April 2004</bibl>
        </blist>
      </div2>
      <div2 id="ref-core-xml">
        <head>Core XML Specifications</head>
        <blist>
          <bibl id="XML1.0" href="http://www.w3.org/TR/REC-xml/">[XML-1.0] <titleref
              href="http://www.w3.org/TR/REC-xml/">Extensible Markup Language (XML) 1.0 (Fifth
              Edition).</titleref> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, et. al. editors.
            W3C Recommendation 26 November 2008. </bibl>
          <bibl id="Namespaces1.0" href="http://www.w3.org/TR/REC-xml-names/">[Namespaces-1.0]
              <titleref href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML 1.0 (Third
              Edition).</titleref> Tim Bray, Dave Hollander, Andrew Layman, et. al., editors. W3C
            Recommendation 8 December 2009. </bibl>
        </blist>
        <blist>
          <bibl id="XML1.1" href="http://www.w3.org/TR/xml11/">[XML-1.1] <titleref
              href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1 (Second
              Edition).</titleref> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, et. al. editors.
            W3C Recommendation 16 August 2006. </bibl>
          <bibl id="Namespaces1.1" href="http://www.w3.org/TR/xml-names11/">[Namespaces-1.1]
              <titleref href="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1 (Second
              Edition).</titleref> Tim Bray, Dave Hollander, Andrew Layman, et. al., editors. W3C
            Recommendation 16 August 2006. </bibl>
        </blist>
        <blist>
          <bibl id="XMLBase" href="http://www.w3.org/TR/xmlbase/">[XML Base] <titleref
              href="http://www.w3.org/TR/xmlbase/">XML Base (Second Edition).</titleref> Jonathan
            Marsh and Richard Tobin, editors. W3C Recommendation. 28 January 2009. </bibl>
          <bibl id="xml-id" href="http://www.w3.org/TR/xml-id/">[xml:id] <titleref
              href="http://www.w3.org/TR/xml-id/">xml:id Version 1.0.</titleref> Jonathan Marsh,
            Daniel Veillard, and Norman Walsh, editors. W3C Recommendation. 9 September 2005.</bibl>
          <bibl id="XInclude" href="http://www.w3.org/TR/xinclude/"> [XInclude] <titleref
              href="http://www.w3.org/TR/xinclude/">XML Inclusions (XInclude) Version 1.0 (Second
              Edition).</titleref> Jonathan Marsh, David Orchard, and Daniel Veillard, editors. W3C
            Recommendation. 15 November 2006. </bibl>
        </blist>
      </div2>
      <div2 id="ref-xml-models">
        <head>XML Data Model and XML Information Set</head>
        <blist>
          <bibl id="XDM-1.0" href="http://www.w3.org/TR/xpath-datamodel/">[XQuery 1.0 and XPath 2.0
            Data Model (XDM)] <titleref href="http://www.w3.org/TR/xpath-datamodel/">XQuery 1.0 and
              XPath 2.0 Data Model (XDM).</titleref> Mary Fernández, Ashok Malhotra, Jonathan Marsh,
            et. al., editors. W3C Recommendation. 23 January 2007. </bibl>
          <bibl xmlns:xlink="http://www.w3.org/1999/xlink" href="http://www.w3.org/TR/xml-infoset/"
            id="xml-infoset-rec" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">
            <titleref xlink:type="simple" xlink:show="new" xlink:actuate="onRequest">XML Information
              Set (Second Edition)</titleref> John Cowan, Richard Tobin, editors. W3C Working Group
            Note 04 February 2004</bibl>
        </blist>
      </div2>
      <div2 id="ref-xpath-xquery">
        <head>XPath and XQuery</head>
        <blist>
          <bibl id="XPath1.0" href="http://www.w3.org/TR/xpath">[XPath-1.0] <titleref
              href="http://www.w3.org/TR/xpath">XML Path Language (XPath) Version 1.0.</titleref>
            James Clark and Steve DeRose, editors. W3C Recommendation. 16 November 1999. </bibl>
          <bibl href="http://www.w3.org/TR/xpath20/" id="XPath-2.0">[XPath 2.0] <titleref
              href="http://www.w3.org/TR/xpath20/">XML Path Language (XPath) 2.0.</titleref> Anders
            Berglund, Scott Boag, Don Chamberlin, et. al., editors. W3C Recommendation. 23 January
            2007. </bibl>
          <bibl id="XQuery-1.0" href="http://www.w3.org/TR/xquery/">[XQuery-1.0] <titleref
              href="http://www.w3.org/TR/xquery/">XQuery 1.0: An XML Query Language.</titleref>
            Scott Boag, Don Chamberlin, Mary Fernández, et. al., editors. W3C Recommendation. 23
            January 2007. </bibl>
          <bibl id="XPath-Functions" href="http://www.w3.org/TR/xpath-functions/">[XPath-Functions]
              <titleref href="http://www.w3.org/TR/xpath-functions/">XQuery 1.0 and XPath 2.0
              Functions and Operators.</titleref> Ashok Malhotra, Jim Melton, and Norman Walsh,
            editors. W3C Recommendation. 23 January 2007. </bibl>
        </blist>
      </div2>
      <div2 id="ref-xslt">
        <head>Style, Transform, Serialize</head>
        <blist>
          <bibl href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/" id="xml-stylesheet"
              ><titleref href="http://www.w3.org/TR/2010/REC-xml-stylesheet-20101028/">Associating
              Style Sheets with XML documents 1.0 (Second Edition)</titleref>. James Clark, Simon
            Pieters, Henry S. Thompson. W3C Recommendation 28 October 2010</bibl>
          <bibl id="xsl-1.1" href="http://www.w3.org/TR/xsl/">[XSL 1.1] <titleref
              href="http://www.w3.org/TR/xsl/">Extensible Stylesheet Language (XSL) Version 1.1.
            </titleref>Anders Berglund, editor. W3C Recommendation. 5 December 2006. </bibl>
          <bibl id="XSLT-1.0" href="http://www.w3.org/TR/xslt">[XSLT-1.0] <titleref
              href="http://www.w3.org/TR/xslt">XSL Transformations (XSLT) Version 1.0.</titleref>
            James Clark, editor. W3C Recommendation. 16 November 1999. </bibl>
          <bibl id="XSLT-2.0" href="http://www.w3.org/TR/xslt20/">[XSLT 2.0] <titleref
              href="http://www.w3.org/TR/xslt20/">XSL Transformations (XSLT) Version 2.0.</titleref>
            Michael Kay, editor. W3C Recommendation. 23 January 2007. </bibl>
          <bibl href="http://www.w3.org/TR/xslt-xquery-serialization/" id="Serialization"
            >[Serialization] <titleref href="http://www.w3.org/TR/xslt-xquery-serialization/">XSLT
              2.0 and XQuery 1.0 Serialization.</titleref> Scott Boag, Michael Kay, Joanne Tong,
            Norman Walsh, and Henry Zongaro, editors. W3C Recommendation. 23 January 2007. </bibl>
        </blist>
      </div2>
      <div2 id="ref-xml-schemas">
        <head>XML Schema Languages</head>
        <blist>
          <bibl id="XMLSchema1" href="http://www.w3.org/TR/xmlschema-1/">[W3C XML Schema: Part 1]
              <titleref href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures
              Second Edition.</titleref> Henry S. Thompson, David Beech, Murray Maloney, et. al.,
            editors. World Wide Web Consortium, 28 October 2004. </bibl>
          <bibl id="XMLSchema2" href="http://www.w3.org/TR/xmlschema-2/">[W3C XML Schema: Part 2]
              <titleref href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes Second
              Edition.</titleref> Paul V. Biron and Ashok Malhotra, editors. World Wide Web
            Consortium, 28 October 2004. </bibl>
        </blist>
        <blist>
          <bibl
            href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=52348"
            id="RELAX-NG">[RELAX NG] <titleref>ISO/IEC JTC 1/SC 34. ISO/IEC 19757-2:2008(E) Document
              Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based
              validation</titleref> -- RELAX NG 2008. </bibl>
          <bibl id="RELAX-NG-Compact-Syntax">[RELAX NG Compact Syntax] ISO/IEC JTC 1/SC 34. ISO/IEC
            19757-2:2003/Amd 1:2006 Document Schema Definition Languages (DSDL) — Part 2:
            Grammar-based validation — RELAX NG AMENDMENT 1 Compact Syntax 2006. </bibl>
          <bibl id="RELAX-NG-DTD-Compatibility">[RELAX NG DTD Compatibility] RELAX NG DTD
            Compatibility. OASIS Committee Specification. 3 December 2001. </bibl>
        </blist>
        <blist>
          <bibl id="Schematron">[Schematron] ISO/IEC JTC 1/SC 34. ISO/IEC 19757-3:2006(E) <titleref
              href="http://dsdl.org/">Document Schema Definition Languages (DSDL) — Part 3:
              Rule-based validation — Schematron</titleref> 2006. </bibl>
        </blist>
      </div2>
      <div2 id="ref-identifiers-names">
        <head>Identifiers and Names</head>
        <ednote>
          <name id="Identifiers">Identifiers</name>
          <edtext>Identifier: "In metadata, an identifier is a language-independent label, sign or
            token that uniquely identifies an object within an identification scheme. The suffix
            identifier is also used as a representation term when naming a data element. [...] In
            computer science, identifiers (IDs) are lexical tokens that name entities. The concept
            is analogous to that of a "name." Identifiers are used extensively in virtually all
            information processing systems. Naming entities makes it possible to refer to them,
            which is essential for any kind of symbolic processing. [...] In computer languages,
            identifiers are tokens (also called symbols) which name language entities. Some of the
            kinds of entities an identifier might denote include variables, types, labels,
            subroutines, and packages. In most languages, some character sequences have the lexical
            form of an identifier but are known as keywords." -- WikiPedia 10 Apr 2012 </edtext>
        </ednote>
        <blist>
          <bibl id="RFC-2396" href="http://www.ietf.org/rfc/rfc2396.txt">[RFC 2396] <titleref
              href="http://www.ietf.org/rfc/rfc2396.txt">Uniform Resource Identifiers (URI): Generic
              Syntax. </titleref>T. Berners-Lee, R. Fielding, and L. Masinter. Network Working
            Group, Internet Engineering Task Force. , Aug 1998. </bibl>
          <bibl id="RFC-3986" href="http://www.ietf.org/rfc/rfc3986.txt">[RFC 3986] <titleref
              href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986: Uniform Resource Identifier
              (URI): General Syntax.</titleref> T. Berners-Lee, R. Fielding, and L. Masinter,
            editors. Internet Engineering Task Force. January, 2005. </bibl>
          <bibl id="RFC-3987" href="http://www.ietf.org/rfc/rfc3987.txt">[RFC 3987] <titleref
              href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987: Internationalized Resource
              Identifiers (IRIs).</titleref> M. Duerst and M. Suignard, editors. Internet
            Engineering Task Force. January, 2005. </bibl>
          <bibl href="http://www.w3.org/TR/2008/NOTE-leiri-20081103/" id="LEIRI" diff="add"
              ><titleref>Legacy extended IRIs for XML resource identification</titleref>. Henry S.
            Thompson, Richard Tobin, Norman Walsh. W3C Working Group Note 3 November 2008 </bibl>
        </blist>
        <blist>
          <bibl href="http://tools.ietf.org/html/rfc2141" id="URN-syntax" diff="add"><titleref
              href="http://tools.ietf.org/html/rfc2141">URN Syntax</titleref>. R. Moats. IETF
            Request for Comments: 2141. PROPOSED STANDARD. Internet Engineering Task Force. May
            1997.</bibl>
          <bibl href="http://tools.ietf.org/html/rfc1737" id="URN-function"><titleref
              href="http://tools.ietf.org/html/rfc1737">Functional Requirements for Uniform Resource
              Names</titleref>. Informational Request for Comments: 1737. K. Sollins, L. Masinter.
            Internet Engineering Task Force. December 1994</bibl>
          <bibl href="http://tools.ietf.org/html/rfc3187" id="RFC-3187"><titleref
              href="http://tools.ietf.org/html/rfc3187" id="ISBN-URN">Using International Standard
              Book Numbers as Uniform Resource Names</titleref>. J. Hakala, H. Walravens.
            Informational Request for Comments: 3187. Internet Engineering Task Force. Oct 2001. </bibl>
          <bibl id="RFC-4122" href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122] <titleref
              href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122: A Universally Unique IDentifier
              (UUID) URN Namespace.</titleref> P. Leach and M. Mealling, editors. Internet
            Engineering Task Force. July, 2005.</bibl>
        </blist>
        <blist>
          <bibl id="UUID" href="http://www.itu.int/ITU-T/studygroups/com17/oid.html">[UUID]
              <titleref href="http://www.itu.int/ITU-T/studygroups/com17/oid.html">ITU X.667:
              Information technology - Open Systems Interconnection - Procedures for the operation
              of OSI Registration Authorities: Generation and registration of Universally Unique
              Identifiers (UUIDs) and their use as ASN.1 Object Identifier components.</titleref>
            2004. </bibl>
        </blist>
      </div2>
      <div2 id="ref-http">
        <head>HTTP Request &amp; Authentication</head>
        <blist>
          <bibl id="RFC-2616" href="http://www.ietf.org/rfc/rfc2616.txt">[RFC 2616] <titleref
              href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616: Hypertext Transfer Protocol —
              HTTP/1.1.</titleref> R. Fielding, J. Gettys, J. Mogul, et. al., editors. Internet
            Engineering Task Force. June, 1999. </bibl>
          <bibl id="RFC-2617" href="http://www.ietf.org/rfc/rfc2617.txt">[RFC 2617] <titleref
              href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617: HTTP Authentication: Basic and
              Digest Access Authentication.</titleref> J. Franks, P. Hallam-Baker, J. Hostetler, S.
            Lawrence, P. Leach, A. Luotonen, L. Stewart. June, 1999 . </bibl>
        </blist>
      </div2>
      <div2 id="ref-char-encodings">
        <head>Character Encodings</head>
        <blist>
          <bibl id="RFC-3548" href="http://www.ietf.org/rfc/rfc3548.txt">[RFC 3548] <titleref
              href="http://www.ietf.org/rfc/rfc3548.txt">RFC 3548: The Base16, Base32, and Base64
              Data Encodings.</titleref> S. Josefsson, Editor. Internet Engineering Task Force.
            July, 2003. </bibl>
          <bibl id="Unicode-TR17" href="http://unicode.org/reports/tr17/">[Unicode TR#17] <titleref
              href="http://unicode.org/reports/tr17/">Unicode Technical Report #17: Character
              Encoding Model.</titleref> Ken Whistler, Mark Davis, and Asmus Freytag, authors. The
            Unicode Consortium. 11 November 2008. </bibl>
          <bibl id="uuencode"><titleref>ISO/IEC DIS 99452:1992, Information technology Portable
              Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std
              1003.21992)</titleref> and <titleref>X/Open CAE Specification, Commands and Utilities,
              Issue 4, 1992.</titleref></bibl>
        </blist>
      </div2>
      <div2 id="ref-media-types">
        <head>Media Types</head>
        <blist>
          <bibl id="IANA-MIME-Types" href="http://www.iana.org/assignments/media-types/">[IANA MIME
            Media Types] <titleref href="http://www.iana.org/assignments/media-types/">IANA MIME
              Media Types.</titleref> Internet Engineering Task Force. </bibl>
          <bibl id="RFC-1521" href="http://www.ietf.org/rfc/rfc1521.txt">[RFC 1521] <titleref
              href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521: MIME (Multipurpose Internet Mail
              Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet
              Message Bodies.</titleref> N. Borenstein, N. Freed, editors. Internet Engineering Task
            Force. September, 1993. </bibl>
          <bibl id="RFC-3023" href="http://www.ietf.org/rfc/rfc3023.txt">[RFC 3023] <titleref
              href="http://www.ietf.org/rfc/rfc3023.txt">RFC 3023: XML Media Types.</titleref> M.
            Murata, S. St. Laurent, and D. Kohn, editors. Internet Engineering Task Force. January,
            2001. </bibl>
          <bibl id="ZIP" href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT"><titleref
              href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">.ZIP File Format
              Specification Version 6.3.2</titleref>. Application Note. (c) September 28,
            2007.</bibl>
        </blist>
      </div2>
      <div2 id="ref-dsig">
        <head>Digital Signatures</head>
        <p>The following are listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML
            Pipeline Language</titleref>. Should the list broaden?</p>
        <blist>
          <bibl id="CRC32">[CRC32] “32-Bit Cyclic Redundancy Codes for Internet Applications”, The
            International Conference on Dependable Systems and Networks: 459.
            10.1109/DSN.2002.1028931. P. Koopman. June 2002.</bibl>
          <bibl id="MD5" href="http://www.ietf.org/rfc/rfc1321.txt">[MD5] <titleref
              href="http://www.ietf.org/rfc/rfc1321.txt">RFC 1321: The MD5 Message-Digest
              Algorithm.</titleref> R. Rivest. Network Working Group, IETF, April 1992. </bibl>
          <bibl id="SHA1" href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">[SHA1] <titleref
              href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">Federal Information Processing
              Standards Publication 180-1: Secure Hash Standard.</titleref> 1995.</bibl>
        </blist>
      </div2>
    </div1>
    <div1 id="non-normative-refs">
      <head>Non-Normative References</head>
      <div2 diff="add" id="ref-math">
        <head>Candidate Specification: Mathematics</head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref>.</p>
        <blist>
          <bibl href="http://www.w3.org/TR/MathML3/" id="MathML"><titleref
              href="http://www.w3.org/TR/MathML3/">Mathematical Markup Language (MathML) Version
              3.0</titleref>. Ron Ausbrooks, Stephen Buswell, David Carlisle, Giorgi Chavchanidze,
            Stéphane Dalmas, Stan Devitt, Angel Diaz, Sam Dooley, Roger Hunter, Patrick Ion, Michael
            Kohlhase, Azzeddine Lazrek, Paul Libbrecht, Bruce Miller, Robert Miner, Chris Rowley,
            Murray Sargent, Bruce Smith, Neil Soiffer, Robert Sutor, Stephen Watt. W3C
            Recommendation 21 October 2010.</bibl>
        </blist>
      </div2>
      <div2 diff="add" id="ref-EXI">
        <head>Candidate Specification: EXI</head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref></p>
        <p>The following are other XML-related specifications for which some form of processing
          support. </p>
        <blist>
          <bibl href="http://www.w3.org/TR/2011/REC-exi-20110310/" id="EXI"><titleref
              href="http://www.w3.org/TR/2011/REC-exi-20110310/">Efficient XML Interchange (EXI)
              Format 1.0</titleref>. John Schneider, Takuki Kamiya. W3C Recommendation 10 March
            2011. </bibl>
        </blist>
      </div2>
      <div2 diff="add" id="ref-html">
        <head>Candidate Specifications: HTML</head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref>.</p>
        <blist>
          <bibl href="http://www.w3.org/TR/html5/" id="HTML5"><titleref>A vocabulary and associated
              APIs for HTML and XHTML</titleref>. Ian Hickson. W3C Working Draft 29 March
            2012.</bibl>
        </blist>
      </div2>
      <div2 diff="add" id="ref-dsig-encrypt">
        <head>Candidate Specifications: Digital Signatures and Encryption</head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref>.</p>
        <blist>
          <bibl href="http://www.w3.org/2008/xmlsec/Drafts/c14n-20/" id="Canonocal-xml"><titleref
              href="http://www.w3.org/2008/xmlsec/Drafts/c14n-20/">Canonical XML Version
              2.0</titleref>. John Boyer, Glenn Marcy, Pratik Datta, Frederick Hirsch. W3C Editor's
            Draft 16 December 2011</bibl>
          <bibl href="http://www.w3.org/2008/xmlsec/Drafts/xmldsig-core-20/" id="XML-Sign-2.0"
              ><titleref href="http://www.w3.org/2008/xmlsec/Drafts/xmldsig-core-20/">XML Signature
              Syntax and Processing Version 2.0</titleref>. Editors: Donald Eastlake, Joseph Reagle,
            David Solo, Frederick Hirsch, Thomas Roessler, Kelvin Yiu, Pratik Datta, Scott Cantor,
            Authors: Mark Bartel, John Boyer, Barb Fox, Brian LaMacchia, Ed Simon. W3C Editor's
            Draft 18 January 2012</bibl>
          <bibl href="http://www.w3.org/2008/xmlsec/Drafts/xmldsig-xpath/" id="XML-Sign-XPath"
              ><titleref href="http://www.w3.org/2008/xmlsec/Drafts/xmldsig-xpath/">XML Signature
              Streaming Profile of XPath 1.0</titleref>. Pratik Datta Frederick Hirsch. Meiko
            JensenW3C Editor's Draft 13 December 2011. </bibl>
          <bibl href="http://www.w3.org/2008/xmlsec/Drafts/xmlenc-transform20/"
            id="XML-Sign-Transforms"><titleref
              href="http://www.w3.org/2008/xmlsec/Drafts/xmlenc-transform20/">XML Encryption 1.1
              CipherReference Processing using 2.0 Transforms</titleref>. Frederick Hirsch. W3C
            Editor's Draft 05 January 2012</bibl>
        </blist>
      </div2>
      <div2 diff="add" id="ref-semweb">
        <head>Candidate Specifications: Semantic Web </head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref>.</p>
        <p>The following are Semantic Web-related specifications for which some form of processing
          support. </p>
        <blist>
          <bibl href="http://www.w3.org/TR/rdf-syntax-grammar/" id="rdf-syntax"><titleref
              href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML Syntax Specification (Revised)
            </titleref>. Dave Beckett, Brian McBride. W3C Recommendation 10 February 2004. </bibl>
          <bibl href="http://www.w3.org/TR/rdf-schema/" id="rdf-schema"><titleref
              href="http://www.w3.org/TR/rdf-schema/">RDF Vocabulary Description Language 1.0: RDF
              Schema </titleref>. Dan Brickley, R.V. Guha, Brian McBride. W3C Recommendation 10
            February 2004.</bibl>
          <bibl href="http://www.w3.org/TR/grddl/" id="GRDDL"><titleref
              href="http://www.w3.org/TR/grddl/">Gleaning Resource Descriptions from Dialects of
              Languages (GRDDL)</titleref>. Dan Connolly W3C Recommendation 11 September 2007. </bibl>
          <bibl href="http://www.w3.org/TR/rdfa-syntax/"><titleref
              href="http://www.w3.org/TR/rdfa-syntax/" id="rdfa-syntax">RDFa in XHTML: Syntax and
              Processing</titleref>. A collection of attributes and processing rules for extending
            XHTML to support RDF. Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton. W3C
            Recommendation 14 October 2008</bibl>
          <bibl href="http://www.w3.org/TR/rif-in-rdf/" id="rif-in-rdf"><titleref
              href="http://www.w3.org/TR/rif-in-rdf/">RIF In RDF</titleref>. Sandro Hawke, W3C/MIT
            Axel Polleres. W3C Working Group Note 12 May 2011</bibl>
          <bibl href="http://www.w3.org/TR/rif-fld/" id="rif-fld"><titleref
              href="http://www.w3.org/TR/rif-fld/">RIF Framework for Logic Dialects </titleref>.
            Harold Boley, Michael Kifer. W3C Recommendation 22 June 2010</bibl>
          <bibl href="http://www.w3.org/TR/rif-bld/" id="rif-bld"><titleref
              href="http://www.w3.org/TR/rif-bld/">RIF Basic Logic Dialect</titleref>. Harold Boley,
            Michael Kifer. W3C Recommendation 22 June 2010.</bibl>
          <bibl href="http://www.w3.org/TR/skos-reference/" id="skos-reference"><titleref
              href="http://www.w3.org/TR/skos-reference/">SKOS Simple Knowledge Organization System
              Reference</titleref>. Alistair Miles, Sean Bechhofer. W3C Recommendation 18 August
            2009</bibl>
          <bibl href="http://www.w3.org/TR/rdf-sparql-query/" id="rdf-sparql-query"><titleref
              href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL Query Language for
            RDF</titleref>. Eric Prud'hommeaux, Andy Seaborne. W3C Recommendation 15 January
            2008</bibl>
        </blist>
      </div2>
      <div2 id="ref-email" diff="add">
        <head>Candidate Specification: Mail Messages</head>
        <blist>
          <bibl href="http://tools.ietf.org/html/draft-klyne-message-rfc822-xml-03" id="RFC-822"
              ><titleref href="http://tools.ietf.org/html/draft-klyne-message-rfc822-xml-03">An XML
              format for mail and other messages</titleref>. G. Klyne. Internet Engineering Task
            Force. Request for Comments. October 2002.</bibl>
        </blist>
      </div2>
      <div2 id="ref-non-xml" diff="add">
        <head>Candidate Non-XML Data Format Specifications</head>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref>.</p>
        <blist>
          <bibl href="http://tools.ietf.org/rfc/rfc4180.txt" id="CSV"><titleref
              href="http://tools.ietf.org/rfc/rfc4180.txt">Common Format and MIME Type for
              Comma-Separated Values (CSV) Files</titleref>. Y. Shafranovich. Internet Engineering
            Task Force. Request for Comments. October 2005.</bibl>
          <bibl href="http://www.ietf.org/rfc/rfc4627.txt" id="JSON"><titleref
              href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for
              JavaScript Object Notation (JSON)</titleref>. D. Crockford. Internet Engineering Task
            Force. July 2006 </bibl>
        </blist>
      </div2>
      <div2 id="ref-processors">
        <head>Reference Processors?</head>
        <p>The following are listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML
            Pipeline Language</titleref> but not normatively. </p>
        <blist>
          <bibl id="HTML-Tidy" href="http://tidy.sourceforge.net/">[HTML Tidy] <titleref
              href="http://tidy.sourceforge.net/">HTML Tidy Library Project. </titleref>SourceForge
            project. </bibl>
          <bibl id="TagSoup" href="http://ccil.org/~cowan/XML/tagsoup/">[TagSoup] <titleref
              href="http://ccil.org/~cowan/XML/tagsoup/">TagSoup - Just Keep On Truckin'.</titleref>
            John Cowan.</bibl>
          <bibl id="libhtml5" diff="add">HTML5 Parser </bibl>
        </blist>
        <p>A list of reference processors? </p>
        <p>The following are not listed in <titleref href="http://www.w3.org/TR/xproc/">XProc: An
            XML Pipeline Language</titleref> but not normatively. </p>
        <blist diff="add">
          <bibl id="Calabash"><titleref href="http://xmlcalabash.com/">Calabash</titleref>. Norm
            Walsh</bibl>
          <bibl id="Calumet"><titleref href="https://community.emc.com/community/edn/xmltech"
              >Calumet</titleref>. EMC XProc Pipeline Processing Engine</bibl>
          <bibl id="QuiXProc"><titleref href="http://code.google.com/p/quixproc/">QuiXProc
              Open</titleref>. Innovimax's GPL, Java implementation based on XML Calabash adding
            Streaming and Parallel Processing.</bibl>
          <bibl id="Tubular"><titleref href="http://code.google.com/p/tubular/">Tubular</titleref>.
            Tubular is a Java implementation based on immutable objects, in order to facilitate the
            addition of parallelism support, thus reducing the need for locking mechanisms.</bibl>
          <bibl id="XProcerity">XProcerity. XProcerity is a Java implementation focused primarily on
            high performance in multi-threaded environments, such as high-traffic enterprise web
            applications.</bibl>
          <bibl id="xprocxq"><titleref href="http://code.google.com/p/xprocxq/">xprocxq</titleref>.
            Jim Fuller's xprocxq is an experimental bootstrap implementation of W3C XProc Draft
            Specification, written in XQuery, for the eXist XML Database.</bibl>
        </blist>
      </div2>
    </div1>
    <div1 id="issues">
      <head>Unsatisfied V1 CR Issues</head>
      <p>The following are taken from the <titleref
          href="http://www.w3.org/XML/XProc/xproc-candidate-issues/">XProc Candidate Issues
          Document</titleref> as determined at the working group's October 31 f2f (minutes). Issue
        numbers refer to numbers given in the issues document. The editors intend to expand these
        notes and migrate them to later sections as and when appropriate.</p>
      <div2 id="issue-001">
        <head>Issue 001: p:template extension</head>
        <p><emph>Issue 001:</emph> extend our current p:template in order to have some higher level
          construct without going into FULL XSLT </p>
        <p>Relates to <specref ref="step-template"/></p>
      </div2>
      <div2 id="issue-004">
        <head>Issue 004: attribute value templates</head>
        <p><emph>Issue 004:</emph> allow attribute value templates within xproc elements</p>
      </div2>
      <div2 id="issue-006">
        <head>Issue 006: p:data/p:load harmonization</head>
        <p><emph>Issue 006:</emph> harmonize p:data and p:load</p>
        <p>Relates to <specref ref="step-data"/></p>
      </div2>
      <div2 id="issue-010">
        <head>Issue 010: document base URI</head>
        <p><emph>Issue 010:</emph> something about document base uri</p>
      </div2>
      <div2 id="issue-015">
        <head>Issue 015: JSON hack</head>
        <p><emph>Issue 015:</emph> JSON hack (V.next XOR closable.) </p>
      </div2>
      <div2 id="issue-016">
        <head>Issue 016: conditional output port</head>
        <p><emph>Issue 016:</emph> conditional output port (V.next XOR closable.) </p>
      </div2>
      <div2 id="issue-017">
        <head>Issue 017: p:store</head>
        <p><emph> Issue 017:</emph> simplified store step</p>
        <p>Relates to <specref ref="step-store"/></p>
      </div2>
    </div1>
    <div1 id="use-case-unsatisfied">
      <head>Unsatisfied V1 Requirements and Use Cases</head>
      <p>Sections 2-5 of the V1 <titleref href="http://www.w3.org/TR/xproc-requirements/">XML
          Processing Model Requirements and Use Cases</titleref> are included herein, annotated for
        review of requirements and use cases that have been left unsatisfied in V1. The editors hope
        to record which requirements and use cases have been satisfied by <titleref
          href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>, and to note
        which have not been satisfied. This should assist the working group in determining which
        requirements and use cases should be addressed in <emph>XProc V.next</emph>. </p>
      <p>To aid navigation, the requirements can be mapped to the use cases of this section as
        follows:</p>
      <table id="requirements-to-use-cases" role="requirements-to-use-cases"
        summary="Requirements and use cases" border="2" frame="border">
        <thead>
          <tr>
            <th>Requirement</th>
            <th>Use Case</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-standard-names"/></td>
            <td rowspan="1" colspan="1"><ulist>
                <item>
                  <p><specref ref="use-case-parse-validate-transform"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-xinclude"/></p>
                </item>
              </ulist>, </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-new-components-steps"/></td>
            <td rowspan="1" colspan="1"><ulist>
                <item>
                  <p><specref ref="use-case-run-program"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-computations"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-dynamic-xquery"/></p>
                </item>
              </ulist>, </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-minimal-components"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-parse-validate-transform"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-xinclude"/>
                  </p>
                </item>
                <item>
                  <p><specref ref="use-case-dynamic-xquery"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-allow-composition"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-xml-rpc"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-import-ingestion"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-rss-descriptions"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-config-depend"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-dynamic-xquery"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-iteration"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-document-aggregation"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-style-browser"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-rss-descriptions"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-multiple-command-line"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-make-absolute-urls"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-import-ingestion"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-config-depend"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-conditional-processing"/></td>
            <td rowspan="1" colspan="1"><ulist>
                <item>
                  <p><specref ref="use-case-document-aggregation"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-style-browser"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-content-depend"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-add-nav"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-config-depend"/></p>
                </item>
              </ulist>, </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-error-handling-fallback"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-no-fallback-error"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-fallback-choice"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-xdm"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-collections"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-allow-optimization"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-large-document-transform"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-add-nav"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-simple-command-line"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-multiple-command-line"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1"><specref ref="req-streaming-pipes"/></td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-large-document-transform"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-add-nav"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td>MathML</td>
            <td>
              <ulist>
                <item>
                  <p><specref ref="use-case-extract-mathml"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td>Digital Signatures</td>
            <td>
              <ulist>
                <item>
                  <p><specref ref="use-case-xinclude-dsig"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td>Non-XML</td>
            <td>
              <ulist>
                <item>
                  <p><specref ref="use-case-non-xml-production"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-rw-non-xml"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td>Web Services</td>
            <td>
              <ulist>
                <item>
                  <p><specref ref="use-case-web-service"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-simple-transform-service"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-ajax-server"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-metadata"/></p>
                </item>
                <item>
                  <p><specref ref="use-case-update-insert-db"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr>
            <td>Dynamic Inputs/Outputs</td>
            <td>
              <ulist>
                <item>
                  <p><specref ref="use-case-dsdl-validation"/></p>
                </item>
              </ulist>
            </td>
          </tr>
          <tr diff="del">
            <td rowspan="1" colspan="1">Unspecified</td>
            <td rowspan="1" colspan="1">
              <ulist>
                <item>
                  <p><specref ref="use-case-handheld-service"/></p>
                </item>
              </ulist>
            </td>
          </tr>
        </tbody>
      </table>
      <ednote id="req-to-use-case-table" diff="chg">
        <edtext>The above table is known to be incomplete and will be completed in a later draft. We
          note that many Use Cases are not associated with a Requirement, and welcome suggestions as
          to the correspondence to Requirements for Use Cases 5.4-8, 5.12-14, 5.17-21, 5.22, 5.25-26
          and 5.28.</edtext>
      </ednote>
    </div1>
    <div1 id="steps-categorized">
      <head>FYI: Categorized Steps</head>
      <p>Here is my first cut of the step inventory categorization for my action item. I've take
        this from information that was sent to me, source code, and documentation online [1]. I did
        not include the general categories we had on the wiki [2]. Those categories were "Sorting",
        "Validation with Error", "Map-reduce", "Iterate until condition", "Dynamic Pipeline
        Execution", "Long-form Viewport", and "e-mail." -- AM.</p>
      <p diff="add">Second cut. Completed list. Anotated. Minor reorganization coming. -- MM. </p>
      <p diff="add">These lists will be anotated and re-formatted later. -- MM.</p>
      <div2 diff="add">
        <head>Library and Pipeline Construction</head>
        <glist>
          <gitem>
            <label><code>5.9 </code>p:library</label>
          </gitem>
          <gitem>
            <label><code>5.16 </code>p:documentation</label>
          </gitem>
          <gitem>
            <label><code>5.17 </code>p:pipeinfo</label>
          </gitem>
          <gitem>
            <label><code>4.1 </code>p:pipeline</label>
          </gitem>
          <gitem>
            <label><code>5.8 </code>p:declare-step</label>
          </gitem>
          <gitem>
            <label><code>5.10 </code>p:import</label>
          </gitem>
        </glist>
        <glist>
          <gitem>
            <label><code>5.11 </code>p:pipe</label>
            <def>
              <p>Relates to <specref ref="step-pipe"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.12 </code>p:inline</label>
          </gitem>
          <gitem>
            <label><code>5.13 </code>p:document</label>
          </gitem>
          <gitem>
            <label><code>5.14 </code>p:data</label>
            <def>
              <p>Relates to <specref ref="step-data"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.15 </code>p:empty</label>
          </gitem>
        </glist>
      </div2>
      <div2 diff="add">
        <head>Core Pipeline Operations</head>
        <glist>
          <gitem>
            <label><code>4.2 </code>p:for-each</label>
          </gitem>
          <gitem>
            <label><code>4.3 </code>p:viewport</label>
            <def>
              <p>Relates to <specref ref="step-viewport"/></p>
            </def>
          </gitem>
        </glist>
        <glist>
          <gitem>
            <label><code>4.4 </code>p:choose</label>
          </gitem>
          <gitem>
            <label><code>4.4.1 </code>p:xpath-context</label>
          </gitem>
          <gitem>
            <label><code>4.4.2 </code>p:when</label>
          </gitem>
          <gitem>
            <label><code>4.4.3 </code>p:otherwise</label>
          </gitem>
        </glist>
        <glist>
          <gitem>
            <label><code>4.5 </code>p:group</label>
          </gitem>
          <gitem>
            <label><code>4.6 </code>p:try</label>
            <def>
              <p>Relates to <specref ref="step-try"/></p>
            </def>
          </gitem>
        </glist>
      </div2>
      <div2 diff="add">
        <head>Input Sources</head>
        <glist>
          <gitem>
            <label><code>5.1 </code>p:input</label>
            <def>
              <p>Relates to <specref ref="step-input"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.2 </code>p:iteration-source</label>
            <def>
              <p>Relates to <specref ref="step-iteration-source"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.3 </code>p:viewport-source</label>
          </gitem>
        </glist>
      </div2>
      <div2 diff="add">
        <head>Output Targets</head>
        <glist>
          <gitem>
            <label><code>5.4 </code>p:output</label>
          </gitem>
          <gitem>
            <label><code>5.6 </code>p:serialization</label>
            <def>
              <p>Relates to <specref ref="step-serialization"/></p>
            </def>
          </gitem>
        </glist>
      </div2>
      <div2 diff="add">
        <head>Variables, Options and Parameters</head>
        <glist>
          <gitem>
            <label><code>5.7.1 </code>p:variable</label>
            <def>
              <p>Relates to <specref ref="step-variable"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.7.2 </code>p:option</label>
            <def>
              <p>Relates to <specref ref="step-option"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>5.7.3 </code>p:with-option</label>
          </gitem>
          <gitem>
            <label><code>5.7.4 </code>p:with-param</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Micro-operations</head>
        <glist>
          <gitem>
            <label><code>7.1.1 </code>p:add-attribute</label>
          </gitem>
          <gitem>
            <label><code>7.1.2 </code>p:add-xml-base</label>
          </gitem>
          <gitem>
            <label><code>7.1.5 </code>p:delete</label>
          </gitem>
          <gitem>
            <label><code>7.1.12 </code>p:insert</label>
          </gitem>
          <gitem>
            <label><code>7.1.13 </code>p:label-elements</label>
          </gitem>
          <gitem>
            <label><code>7.1.15 </code>p:make-absolute-uris</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:namespace-delete</label>
          </gitem>
          <gitem>
            <label><code>7.1.16 </code>p:namespace-rename</label>
          </gitem>
          <gitem>
            <label><code>7.1.19 </code>p:rename</label>
          </gitem>
          <gitem>
            <label><code>7.1.20 </code>p:replace</label>
          </gitem>
          <gitem>
            <label><code>7.1.21 </code>p:set-attributes</label>
          </gitem>
          <gitem>
            <label><code>7.1.25 </code>p:string-replace</label>
            <def>
              <p>Relates to <specref ref="step-string-replace"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>7.1.27 </code>p:unwrap</label>
          </gitem>
          <gitem>
            <label><code>7.1.28 </code>p:wrap</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Transformation</head>
        <glist>
          <gitem>
            <label><code>7.1.30 </code>p:xinclude</label>
          </gitem>
          <gitem>
            <label><code>7.1.31 </code>p:xslt</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>p:template</label>
            <def>
              <p>Relates to <specref ref="step-template"/></p>
            </def>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Query</head>
        <glist>
          <gitem>
            <label><code>7.2.9 </code>p:xquery</label>
            <def>
              <p>Relates to <specref ref="step-template"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - - </code>ml:adhoc-query</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>ml:insert-document</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>ml:invoke-module</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Validation</head>
        <glist>
          <gitem>
            <label><code>7.2.4 </code>p:validate-with-relax-ng</label>
          </gitem>
          <gitem>
            <label><code>7.2.5 </code>p:validate-with-schematron</label>
          </gitem>
          <gitem>
            <label><code>7.2.6 </code>p:validate-with-xml-schema</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:nvdl</label>
            <def>
              <p>Relates to <specref ref="step-nvdl"/></p>
            </def>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Document Operations</head>
        <glist>
          <gitem>
            <label><code>7.1.3 </code>p:compare</label>
          </gitem>
          <gitem>
            <label><code>7.1.4 </code>p:count</label>
          </gitem>
          <gitem>
            <label><code>7.1.11 </code>p:identity</label>
          </gitem>
          <gitem>
            <label><code>7.1.9 </code>p:filter</label>
          </gitem>
          <gitem>
            <label><code>7.2.2 </code>p:hash</label>
          </gitem>
          <gitem>
            <label><code>7.2.10 </code>p:xsl-formatter</label>
          </gitem>
          <gitem>
            <label><code>- - -- </code>cx:delta-xml</label>
          </gitem>
          <gitem>
            <label><code>- - -- </code>cxu:pretty-print</label>
          </gitem>
          <gitem>
            <label><code>- - -- </code>cxu:css-formatter</label>
          </gitem>
          <gitem>
            <label><code>- - -- </code>emx:get-base-uri</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>File &amp; Directory Operations</head>
        <p>Relates to <specref ref="newsteps-directory-operations"/></p>
        <glist>
          <gitem>
            <label><code>- - - </code>cxf:copy</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:delete</label>
          </gitem>
          <gitem>
            <label><code>7.1.6 </code>p:directory-list</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:head</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:info</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:mkdir</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:move</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:tail</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:tempfile</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxf:touch</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:unzip</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:zip</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Image Operations</head>
        <glist>
          <gitem>
            <label><code>- - - </code>cx:metadata-extractor</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Sequence Operations</head>
        <glist>
          <gitem>
            <label><code>7.1.17 </code>p:pack</label>
          </gitem>
          <gitem>
            <label><code>7.1.23 </code>p:split-sequence</label>
          </gitem>
          <gitem>
            <label><code>7.1.29 </code>p:wrap-sequence</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Input / Output</head>
        <glist>
          <gitem>
            <label><code>7.1.10 </code>p:http-request</label>
          </gitem>
          <gitem>
            <label><code>7.1.14 </code>p:load</label>
            <def>
              <p>Relates to <specref ref="step-load"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>7.1.22 </code>p:sink</label>
            <def>
              <p>Relates to <specref ref="usability-primary-port"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>7.1.24 </code>p:store</label>
            <def>
              <p>Relates to <specref ref="step-store"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - -- </code>cx:uri-info</label>
          </gitem>
          <gitem>
            <label><code>- - -- </code>emx:fetch</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Encoding</head>
        <glist>
          <gitem>
            <label><code>7.1.8 </code>p:escape-markup</label>
          </gitem>
          <gitem>
            <label><code>7.1.26 </code>p:unescape-markup</label>
          </gitem>
          <gitem>
            <label><code>7.2.7 </code>p:www-form-urldecode</label>
          </gitem>
          <gitem>
            <label><code>7.2.8 </code>p:www-form-urlencode</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Execution Control</head>
        <glist>
          <gitem>
            <label><code>7 2.1 </code>p:exec</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Resource / Collection Management</head>
        <glist>
          <gitem>
            <label><code>- - - </code>cx:collection-manager</label>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Miscellaneous</head>
        <p>Relates to <specref ref="newsteps-cookie-operations"/> and <specref
            ref="newsteps-messaging"/></p>
        <glist>
          <gitem>
            <label><code>7.2.3 </code>p:uuid</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:get-cookies</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:set-cookies</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:send-mail</label>
          </gitem>
        </glist>
      </div2>
      <div2 diff="chg">
        <head>XProc Operations</head>
        <glist>
          <gitem>
            <label><code>7.1.18 </code>p:parameters</label>
            <def>
              <p>Relates to <specref ref="usability-parameters"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - - </code>p:in-scope-names</label>
            <def>
              <p>Relates to ???</p>
            </def>
          </gitem>
        </glist>
      </div2>
      <div2>
        <head>Environment</head>
        <p>Relates to <specref ref="newsteps-os-operations"/> and <titleref
            href="http://www.w3.org/TR/xproc/#environment">Environment</titleref></p>
        <glist>
          <gitem>
            <label><code>- - - </code>cx:java-properties</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxo:info</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxo:cwd</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cxo:env</label>
          </gitem>
        </glist>
      </div2>
      <div2 diff="chg">
        <head>Error / Message Handling</head>
        <glist>
          <gitem>
            <label><code>7.1.7 </code>p:error</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:eval</label>
            <def>
              <p>Relates to <specref ref="step-eval"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - - </code>emx:eval</label>
          </gitem>
          <gitem>
            <label><code>5.5 </code>p:log</label>
            <def>
              <p>Relates to <specref ref="newsteps-debugging"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:message</label>
            <def>
              <p>Relates to <specref ref="step-message"/></p>
            </def>
          </gitem>
          <gitem>
            <label><code>- - - </code>emc:message</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:report-errors</label>
          </gitem>
        </glist>
      </div2>
      <div2 diff="add">
        <head>Debugging</head>
        <p>Entirely speculative. Relates to <specref ref="newsteps-debugging"/>
        </p>
        <glist>
          <gitem>
            <label><code>- - - </code>dbxml:breakpoint</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>dbxml:comment</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>dbxml:debug</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>cx:message</label>
          </gitem>
          <gitem>
            <label><code>- - - </code>dbxml:trace</label>
          </gitem>
        </glist>
      </div2>
    </div1>
    <div1 diff="add" id="input-collected">
      <head>Collected Input</head>
      <div2 id="input-architecture">
        <head>Architecture</head>
        <div3 id="input-arch-content">
          <head>What Flows?</head>
          <p>Relates to the Principle: <specref ref="principal-flow-error-control"/> and <specref
              ref="ref-non-xml"/></p>
          <p>Should we open up the pipeline architecture to allow more than XML documents to flow
            through it? With respect to other media types (see below for some possibilities), there
            are a number of possibilities in general:</p>
          <olist>
            <item>
              <p>Allow staticly, only at the whole-pipeline margins </p>
            </item>
            <item>
              <p>Allow staticly, at the step level (i.e. step signatures include media types for all
                inputs and outputs)</p>
              <olist>
                <item>
                  <p>Reject any pipeline where the output media type doesn't match the media type of
                    the input to which its connected</p>
                  <olist>
                    <item>
                      <p>and any non-XML output must immediately be converted to XML</p>
                    </item>
                    <item>
                      <p>and foo--foo connections are allowed</p>
                    </item>
                  </olist>
                </item>
                <item>
                  <p>And auto-shim for every possible pair</p>
                </item>
                <item>
                  <p>And auto-shim only for other-XML and XML-other, so other1→other2 requires two
                    shims</p>
                </item>
              </olist>
            </item>
            <item>
              <p>Allow dynamically (e.g. from p:http-request)</p>
              <olist>
                <item>
                  <p>With a static declaration of the alternatives you expect, and anything else is
                    an error</p>
                </item>
                <item>
                  <p>With a pipeline fallback if all else fails, getting &lt;c:data
                    media-type=...>...&lt;/c:data></p>
                </item>
              </olist>
            </item>
          </olist>
          <p>Any shim-to-XML can be (?) configured wrt the target vocabulary (how?) We could
            identify shim tactics with QNames, similar to the way serialization methods are done in
            XProc already</p>
          <p>Allow non-XML (text/binary) to flow through a pipeline. The implementation would
            hex-encode non-XML whenever XML was expected This would, for example, allow
            xsl-formatter to produce the output on a port that could then be serialized by the
            pipeline. </p>
          <div4>
            <head>Sequences</head>
            <p>Allow the same thing XQuery/XSLT allow as values for variables.</p>
          </div4>
          <div4>
            <head>Sets of Documents</head>
            <p>Allow unbounded number of outputs from some steps? MZ says we need this for the NVDL
              use case [cross-reference needed]. Markup pipeline allowed this, subsequent steps need
              to access by name, where default naming is with the integers. . . <code>p:pack</code>
              could have more than two inputs, so you could do column-major packing . . .</p>
            <p>Relates to <specref ref="step-nvdl"/>.</p>
          </div4>
          <div4>
            <head>MetaData, HTML5, JSON, Plain Text</head>
            <p>Relates to <specref ref="ref-non-xml"/> and <specref ref="ref-html"/> and <specref ref="ref-semweb"/></p>
            <p>From Vojtech Toman: In my XML Prague paper "XProc: Beyond application/xml" I looked
              at one possible way of extending XProc to support non-XML media types. The basic idea
              is that XProc steps declare which media types they accept on their input ports and
              which media types they produce on their output ports. If it happens that data with a
              media type A (for instance, text/csv) arrives on an input port that expects media type
              B (for instance, application/xml), the XProc processor will try to convert the data to
              the expected media type. What kinds of conversions are supported and what do they look
              like is not covered in the paper, because that is an issue on its own. I was focusing
              just on the implications of this to the XProc processing model (which, it turns out,
              are actually not that big).</p>
            <p>You can find the conference proceedings here (my article is on page 27): <loc
                href="http://www.xmlprague.cz/2012/files/xmlprague-2012-proceedings.pdf"
                >http://www.xmlprague.cz/2012/files/xmlprague-2012-proceedings.pdf</loc></p>
          </div4>
        </div3>
        <div3 id="input-arch-events">
          <head>Events</head>
          <p>Support a more event-driven processing model?</p>
          <p>Can we suspend a pipeline waiting for something to happen? Some examples; wait for HTTP
            POST from github (notifications), jms queue listener, tcp socket listener</p>
          <p>Can we dump a partially evaluated pipeline instance for subsequent resumption?</p>
          <p>Does this relate to the proposed step <specref ref="step-eval"/>?</p>
        </div3>
        <div3>
          <head>Synchronization &amp; Concurrency</head>
          <p>Related-but-different, with pipeline-internal events, as it were Philip Fennel has done
            some work on XProc+SMIL. <bibref ref="SMIL"/></p>
          <p>Does this relate to <specref ref="integration-choreography"/>?</p>
        </div3>
      </div2>
      <div2 id="input-res-mgr">
        <head>Resource Management</head>
        <div3>
          <head>Add a Resource Manager</head>
          <p>Relates to <specref ref="newsteps-directory-operations"/>, and <specref
              ref="newsteps-os-operations"/></p>
          <ulist>
            <item>
              <p>Local store and retrieve. Build it, store it, get it back later, all under your
                control</p>
            </item>
            <item>
              <p>On-demand construction. Associate a pipeline with a URI into the manager, which
                will run if the URI is not there. Or not current -- you need to know what all the
                dependencies are, and check them</p>
            </item>
            <item>
              <p>Give URIs to step outputs. So you could point xinclude at a step output. Would you
                have to include a local catalog facility to make this really useful? </p>
            </item>
            <item>
              <p>Cache intermediate URIs</p>
            </item>
          </ulist>
          <p diff="add">Refactoring:</p>
          <ulist diff="add">
            <item>
              <p>Local store and retrieve is facilitated by <specref
                  ref="newsteps-directory-operations"/></p>
            </item>
            <item>
              <p>Assigning output to a URI can be accomodated by local/remote store and retrieve
                with http: and file: methods. </p>
            </item>
            <item>
              <p>XInclude relates markup to resources, not ports. In my understanding, using
                XInclude to point at a step output port via a contrived URI that is fronting for an
                application-defined 'resource manager' is not coherent. Steps have input and output
                ports. Some steps are capable of locale/remote storage and retrieval or resources.
                Resources have URIs. </p>
            </item>
          </ulist>
          <p>The canonical resource manager use case, to my mind, is the XInclude case. Consider
            this slightly contrived example.</p>
          <eg xml:space="preserve"> &lt;doc>Today's weather is
   &lt;xi:include href="todays-weather.xml"/>
 &lt;/doc>

pipeline.xpl:

 &lt;p:pipeline>
    ...

    &lt;ext:get-weather-based-on-params-or-locale-or-whatever
         base-uri="todays-weather.xml"/>

    &lt;p:xinclude>
      &lt;p:input port="source">
        &lt;p:document href="input.xml"/>
      &lt;/p:input>
    &lt;/p:xinclude>

    ...
 &lt;/p:pipeline>
</eg>
          <p>The idea is that the get-weather... step produces a document with the appropriate base
            URI and then when XInclude goes off to get that document, the pipeline provides the
            document generated by some other step in the pipeline. </p>
          <p>It's possible, for any given case, to imagine ways to rewrite the pipeline, but the
            general case remains: processing some documents will appeal to URIs and it would be
            useful to be able to generate the documents that should satisfy those URIs in other
            steps in the pipeline (consider synthesized stylesheets and schemas, for example). </p>
        </div3>
        <div3 id="dynamic-execution">
          <head>Dynamic pipeline execution</head>
          <p>Relates to <specref ref="usability-parameters"/> and <specref ref="usability-choose"/>
            and <specref ref="step-eval"/>
          </p>
          <p>Run a pipeline whose XML representation is input</p>
          <ulist>
            <item>
              <p>Dynamic evaluation. See <specref ref="step-eval"/></p>
            </item>
            <item>
              <p>Dynamic attribute values. Meaning? </p>
            </item>
            <item>
              <p>Support for 'depends-on' (or some mechanism for asserting dependencies that are not
                manifest in the data flow) </p>
            </item>
          </ulist>
          <div4>
            <head>Dynamic Manifolds</head>
            <p>Steps with varying numbers of inputs/outputs with dynamic names. </p>
            <p diff="add">On the face of it, the need is obvious. Dynamically defined pipelines that
              conceptually resemble manifolds for processing row-/column-major data. Most scripting
              languages can accomodate themselves to dynamically changing data structures, so why
              not XProc? It turns out that there are performance penalties associated with
              late-binding. First of all, there is a front-end cost associated with constructing the
              logical model of each manifold; that is why it pays to design your most commonly used
              manifolds carefully, test them rigorously, and compile them statically, to ensure
              optimal performance. Dynamic computation of manifold structure, and dynamic
              composition of port names actually impedes streaming pipeline execution by shifting
              the burden into the execution layer, where it is can be more fragile because various
              resources may not have been pre-arranged. -- MM </p>
          </div4>
        </div3>
        <div3>
          <head>Information caches</head>
          <p>Should we give access to MemCache and elasticache? </p>
          <p>Already possible from an extension step [reference needed], do we need more? </p>
          <p>Already possible using p:http-request?</p>
        </div3>
        <div3>
          <head>Environment</head>
          <p>Should we have a way of accessing environment information more generally?</p>
          <p>Relates to and <specref ref="newsteps-directory-operations"/> and <specref
              ref="newsteps-os-operations"/> and <specref ref="integration-debugging"/></p>
          <p>The following is a list of steps and functions that generate environment information. </p>
          <ulist>
            <item>
              <p><code>p:base-uri</code></p>
            </item>
            <item>
              <p><code>pos:env</code></p>
            </item>
            <item>
              <p><code>pos:cwd</code></p>
            </item>
            <item>
              <p><code>pos:info</code></p>
            </item>
            <item>
              <p><code>pxf:info</code></p>
            </item>
            <item>
              <p>
                <code>p:iteration-position</code>
              </p>
            </item>
            <item>
              <p><code>p:iteration-size</code></p>
            </item>
            <item>
              <p><code>p:pipeinfo</code></p>
            </item>
            <item>
              <p><code>p:resolve-uri</code></p>
            </item>
            <item>
              <p><code>p:step-available</code></p>
            </item>
            <item>
              <p><code>p:value-available</code></p>
            </item>
            <item>
              <p><code>p:system-property</code></p>
              <ulist>
                <item>
                  <p><code>p:episode</code></p>
                </item>
                <item>
                  <p><code>p:language</code></p>
                </item>
                <item>
                  <p><code>p:product-name</code></p>
                </item>
                <item>
                  <p><code>p:product-version</code></p>
                </item>
                <item>
                  <p><code>p:vendor</code></p>
                </item>
                <item>
                  <p><code>p:vendor-uri</code></p>
                </item>
                <item>
                  <p><code>p:version</code></p>
                </item>
                <item>
                  <p><code>p:xpath-version</code></p>
                </item>
                <item>
                  <p><code>p:psvi-supported</code></p>
                </item>
              </ulist>
            </item>
          </ulist>
        </div3>
        <div3>
          <head>Datatypes</head>
          <p>Data types for options and parameters</p>
          <p>Also, as I'm binding certain typed values to options (e.g. pulling a start time off the
            query parameters), I'd really like an easy way to say: "This option is typed as
            xs:dateTime. If the value does not cast properly, run this other part of the pipeline."
            One simple way we could accomplish this is to allow type errors within a certain portion
            of the pipeline to be caught and processed somehow. -- AM</p>
          <p>Suggested by MZ:</p>
          <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?> 
&lt;p:declare-step
      xmlns:p="http://www.w3.org/ns/xproc" 
      exclude-inline-prefixes="c xs"
      xmlns:c="http://www.w3.org/ns/xproc-step" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      version="1.0" xpath-version="2.0"> 
&lt;p:output port="result"/> 
&lt;p:group>
    &lt;p:choose> 
        &lt;p:variable name="a" select="'2012-02-30'"/> 
        &lt;p:when test="$a castable as xs:date"> 
            &lt;p:identity> 
                &lt;p:input port="source"> 
                    &lt;p:inline>
                        &lt;the-variable-is-castable-as-date/> 
                    &lt;/p:inline> 
                &lt;/p:input> 
            &lt;/p:identity>
        &lt;/p:when> 
    &lt;p:otherwise> 
        &lt;p:identity> 
            &lt;p:input port="source"> 
                &lt;p:inline>
                    &lt;the-variable-is-NOT-castable-as-date/> 
                &lt;/p:inline> 
            &lt;/p:input> 
        &lt;/p:identity>
    &lt;/p:otherwise> 
    &lt;/p:choose> 
&lt;/p:group> 
&lt;/p:declare-step> </eg>
          <p>Hmm... maybe. I had thought of more of a try/catch operation that would catch type
            errors. Using p:choose a lot can make simple pipelines very complicated. -- AM</p>
          <p>My initial thought was that we could state all the type pre-conditions and they then
            catch only executes when the typing fails. This would be a lot less complicated that
            trying to write all that into a test expression. Of course, not everything can be
            expressed as a simple type cast check. For example, range value checks would still need
            to be expressions. -- AM</p>
        </div3>
      </div2>
      <div2 id="input-integration">
        <head>Integration</head>
        <div3 id="integration-choreography">
          <head>XML Choreography</head>
          <p>The orchestration of XSLT/XQuery/.... XProc as the controller. Support for playing a
            useful standardised role in XRX. LQ. </p>
        </div3>
        <div3 id="integration-authentication">
          <head>Authentication</head>
          <p>Can we add some kind of authentication management which is out-of-band but available? </p>
          <p>Does this need to be in the language, or can it be implementation-defined? If it was in
            the language how would steps get at it?</p>
          <p>Presumably authentication can and should happen out-of-band. Perhaps in a layer that
            surrounds the processor and/or the data store. </p>
          <p>Does this relate to <specref ref="step-send-mail"/> or to <specref ref="ref-email"/>?
          </p>
        </div3>
        <div3 id="integration-clustering">
          <head>Clustering</head>
          <p>Relates to Principal: <specref ref="principal-platform-neutral"/>. </p>
          <p>Relates to Requirement: <specref ref="req-allow-optimization"/></p>
          <p>Do we need support for clustering?</p>
          <p><quote>Cluster analysis or <emph>clustering</emph> is the task of assigning a set of
              objects into groups (called clusters) so that the objects in the same cluster are more
              similar (in some sense or another) to each other than to those in other clusters.
              Clustering is a main task of explorative data mining, and a common technique for
              statistical data analysis used in many fields, including machine learning, pattern
              recognition, image analysis, information retrieval, and bioinformatics.</quote> --
            WikiPedia</p>
        </div3>
        <div3 id="integration-debugging">
          <head>Debugging</head>
          <p>Relates to the Principle: <specref ref="principal-flow-error-control"/></p>
          <p>How to make xproc development more amenable to debugging? </p>
          <p>Relates to <specref ref="newsteps-debugging"/></p>
          <ulist>
            <item>
              <p><code>pos:env</code></p>
            </item>
            <item>
              <p><code>pos:cwd</code></p>
            </item>
            <item>
              <p><code>p:pipeinfo</code></p>
            </item>
            <item>
              <p><code>pos:info</code></p>
            </item>
            <item>
              <p><code>pxf:info</code></p>
            </item>
            <item>
              <p><code>cx:eval</code></p>
            </item>
            <item>
              <p><code>p:error</code></p>
            </item>
            <item>
              <p><code>p:log</code></p>
            </item>
            <item>
              <p><code>cx:message</code></p>
            </item>
          </ulist>
          <p>From Norm: Here's a sketch for extending p:log. Change the content model as
            follows:</p>
          <eg> &lt;p:log port = NCName href? = anyURI> (p:assert | p:message)* &lt;/p:log> Where
            p:message is: &lt;p:message> text &lt;/p:message> and p:assert is: &lt;p:assert test =
            XPathExpression > text &lt;/p:assert> </eg>
          <p>Extend the semantics of p:log as follows: in addition to logging the document, each
            p:message and p:assert is evaluated once for each document in the order they appear as
            children of p:log. </p>
          <p>A p:message simply outputs its text content as a message. That could be to STDERR or to
            a dialog box or a log file, implementation defined.</p>
          <p>A p:assert evaluates the effective boolean value of the test expression. If the
            expression is true, nothing happens. If the expression is false, the text content of the
            message is output per p:message and an exception is raised. (Open question: should it be
            possible to catch that exception in a p:try; probably.) </p>
          <p>I think this would all be much more useful if it was possible to output something about
            the state of the system. I propose that variable references are interpolated in
            p:message/p:assert messages. We could go even further and say that the text is an XPath
            expression, but that will be a little weird as you'll have to quote strings and use
            concat a lot.</p>
          <p>And, if we're going to interpolate variable references, I propose that we define a few
            magic ones:</p>
          <ulist>
            <item>
              <p> $p:uri - the base URI of the document being logged</p>
            </item>
            <item>
              <p> $p:count - the number of the document being logged</p>
            </item>
          </ulist>
          <p>Maybe more. We should probably think about what makes the most sense here, expression
            or interpolation. I can see both sides, I think.</p>
        </div3>
        <div3 id="integration-fallback">
          <head>Fall-back Mechanism</head>
          <p>Relates to the Principles: <specref ref="principal-interoperability"/> and <specref
              ref="principal-flow-error-control"/></p>
          <p>Relates to Requirements: <specref ref="req-error-handling-fallback"/></p>
          <p>How to make xproc development more amenable to error recovery?</p>
        </div3>
        <div3 id="integration-test-suite">
          <head>Test Suite</head>
          <p>Relates to the Principles: <specref ref="principal-interoperability"/> and <specref
              ref="principal-flow-error-control"/></p>
          <p>Relates to Requirements: <specref ref="req-error-handling-fallback"/> and <specref
              ref="req-new-components-steps"/></p>
          <p>Presumably we require a test suite. Luckily, one exists. Let's set our goal and
            immediately claim victory. </p>
        </div3>
      </div2>
      <div2 id="input-usability">
        <head>Usability</head>
        <div3>
          <head id="usability-cross-platform">Cross platform pipelines</head>
          <p>Relates to Principle: <specref ref="principal-platform-neutral"/>, and proposed Steps:
              <specref ref="newsteps-os-operations"/></p>
          <p>Make it easier to create cross platform pipelines e.g. file.separator in file paths</p>
        </div3>
        <div3 id="usability-documentation">
          <head>Documentation Conventions</head>
          <p>Add a Note or another spec for documentation conventions. Parallel to Javadoc? add an
              <att>xml:lang</att> attribute to <code>p:documentaton</code> and recommend its use.
            See <loc href="https://community.emc.com/docs/DOC-8657"
              >https://community.emc.com/docs/DOC-8657</loc> for an example.</p>
          <div4>
            <head>p:documentation</head>
            <eg xml:space="preserve">&lt;p:documentation> 
&lt;div>&lt;head>This is my documentation&lt;/head> 
&lt;p>I can explain my pipeline here.&lt;/p>
&lt;/div>
 
[...] 

&lt;div>&lt;head>Extract metadata from image files&lt;/head> 
&lt;p>I can explain how I extract metadata from various image files. 
I probably have some details that need explanation.&lt;/p> 
&lt;/div> </eg>
          </div4>
        </div3>
        <div3 id="usability-verbosity">
          <head>Verbosity</head>
          <p>Can we simplify the markup? Is there a compact sytntax alternative? </p>
          <p>The following sub sections represent steps whose Usability is deemed to be affected by
            superfluous Verbosity, based upon comments gathered in mailing lists and elsewhere. The
            details need to be filled in with a description of the problem, a suggested revision and
            a justification.</p>
          <div4 id="step-data">
            <head>p:data</head>
            <p>Harmonize wth <specref ref="step-load"/></p>
            <eg>&lt;p:data href=... /></eg>
          </div4>
          <div4 id="step-data">
            <head>c:data</head>
            <p>It would be really, really nice if a step could output a reference. That way p:store,
              etc. can return a standardized reference to a resource created. It may be the case
              that c:data is the wrong element to use for this but it seems like it would be useful
              in some places where c:data is used.</p>
            <eg>&lt;c:data href="math.png" content-type="image/png"/></eg>
          </div4>
          <div4 id="step-input">
            <head>p:input</head>
            <eg xml:space="preserve">&lt;p:input port="source" href="…"/> 
&lt;p:input port="source" step="name" step-port="secondary"/> 
&lt;p:input port="source" step="name"/> 
&lt;p:input select= .... /> </eg>
          </div4>
          <div4 id="step-load">
            <head>p:load</head>
            <p>Harmonize wth <specref ref="step-data"/>. Should work like http-request.</p>
            <eg>&lt;p:load href=... /></eg>
          </div4>
          <div4 id="step-option">
            <head>p:option</head>
            <p>No information available.</p>
            <eg xml:space="preserve">&lt;p:option ... /></eg>
          </div4>
          <div4 id="step-pipe">
            <head>p:pipe</head>
            <eg xml:space="preserve">&lt;p:pipe step="name"/> </eg>
          </div4>
          <div4 id="step-serialization">
            <head>p:serialization </head>
            <eg xml:space="preserve">&lt;p:serialization ... /> </eg>
          </div4>
          <div4 id="step-store">
            <head>p:store</head>
            <p>Relates to <specref ref="input-arch-content"/></p>
            <p>An option on <code>p:store</code> to save decoded/binary data.</p>
            <eg xml:space="preserve">&lt;p:store ... /></eg>
          </div4>
          <div4 id="step-string-replace">
            <head>p:string-replace</head>
            <p>Improve <code>p:string-replace</code> quoting ugliness</p>
            <eg xml:space="preserve">&lt;p:string-replace ... /> </eg>
          </div4>
          <div4 id="step-template">
            <head>p:template</head>
            <p>Empty source on <code>p:template</code>. If you're fabricating from whole cloth, you
              have to waste space with a pointless &lt;foo/> What would be the downside of having
              the empty sequence as the default input in most/all cases? AM suggests that we allow
              this on a step-by-step basis</p>
            <eg xml:space="preserve">&lt;p:template ... /> </eg>
          </div4>
          <div4 id="step-try">
            <head>p:try</head>
            <p>Relates to Principle: <specref ref="principal-small-simple"/></p>
            <p><code>p:group</code> within <code>p:try</code> -- Could we remove this requirement?
              Is this a case of making life easier for implementors which confuses users? Or is it
              actually simpler to have the group/catch as the only top-level children?</p>
          </div4>
          <div4 id="step-variable">
            <head>p:variable</head>
            <ulist>
              <item>
                <p>p:variable templates</p>
              </item>
              <item>
                <p>Should we allow p:variable anywhere in groups?</p>
              </item>
              <item>
                <p>Adding a p:variable requires adding p:group…feels odd </p>
              </item>
              <item>
                <p>Allow variables to be visible in nested pipelines </p>
              </item>
            </ulist>
            <p>Explanation: Allow p:xpath-context/@select? Library-level (“global”) variables?
              And/or pipeline-level variables that would be visible also in nested pipelines? Not
              really a variable, but a p:option or p:parameter that’s visible across multiple
              pipelines. </p>
            <p>Example: A directory path shared by several steps that the pipeline user might want
              to override. A simple mechanism for constructing XML fragments using local context. (A
              single template? XQuery style curly braces?) </p>
            <p>Here’s a constructive example... Make p:rename/@new-name optional, so that it’s
              possible to move elements from namespace X that match a certain condition to namespace
              Y. This is currently quite difficult to do. Could you achieve this using @use-when?
            </p>
          </div4>
          <div4 id="step-viewport">
            <head>p:viewport</head>
            <ulist>
              <item>
                <p>Long form viewport With an intrinsic switch built-in</p>
              </item>
              <item>
                <p>p:viewport/@match </p>
                <p>p:viewport-source </p>
              </item>
            </ulist>
          </div4>
        </div3>
        <div3 id="usability-parameters">
          <head>Parameter Rules</head>
          <p>Now that we have a bunch of real pipelines, can we simplify the rules by limiting the
            allowed usage patterns? At least, get rid of the necessity for p:empty as the parameter
            input [when it's now required: someone to fill in]</p>
          <ulist>
            <item>
              <p>Data types for options and parameters</p>
            </item>
            <item>
              <p>Arbitrary data model fragments for parameters/options/variables</p>
            </item>
            <item>
              <p>Explore using maps to simplify the parameters story</p>
            </item>
          </ulist>
          <p>Here's the hard case that has to be handled: </p>
          <eg xml:space="preserve">&lt;p:pipeline> 
&lt;p:xslt> 
    &lt;p:input port="stylesheet"> 
        &lt;p:document href="docbook.xsl"/> 
    &lt;/p:input> 
&lt;/p:xslt> 
&lt;/p:pipeline> </eg>
          <p>Pass parameters to the pipeline and have those parameters available inside the
            stylesheet without enumerating all of them in the pipeline. How do I easily create a
            c:param-set for a hypothetical 'parameters' option without invoking even more magic than
            we currently have?</p>
        </div3>
        <div3 id="usability-choose">
          <head>Choose-style binding</head>
          <p>Suppose you have a pipeline with a step X, and depending on some dynamic condition, you
            want X to process documents (or entire sequences of documents) A, B, or C. Currently,
            the only way to do this is to use a p:choose a to duplicate the step X with different
            input bindings in each branch. This not only looks silly, but it is painful to write. </p>
          <p>One solution to this would be a choose-style binding (a wrapper around the existing
            bindings) that would dynamically select the bindings to use.</p>
          <eg xml:space="preserve">An example would help.</eg>
          <p>Does this relate to <specref ref="dynamic-execution"/></p>
        </div3>
        <div3>
          <head>Remove Restriction on variables/options/params</head>
          <p>Relates to <specref ref="input-arch-content"/></p>
          <p>Can we remove the restriction on variables/options/params being bound only to strings?
            What would be allowed:</p>
          <ulist>
            <item>
              <p>binaries - This would allow not only the possibility of binary resource files, but
                all would enable the ability to pass maps, which is where I think the real value-add
                comes in. </p>
            </item>
            <item>
              <p>sequences - Not just for strings, but for nodes and binaries as well.</p>
            </item>
          </ulist>
        </div3>
        <div3 id="usability-avt">
          <head>Attribute Value Templates</head>
          <p>Relates to <specref ref="issue-004"/></p>
          <eg xml:space="preserve">An example would help.</eg>
        </div3>
        <div3 id="usability-computed-URIs">
          <head>Loading computed URIs</head>
          <p>Lots of workarounds, but shouldn't need them. <emph>Attribute-value templates</emph>
            would solve this.</p>
          <eg xml:space="preserve">An example would help.</eg>
          <p>Does this relate to <specref ref="dynamic-execution"/></p>
        </div3>
        <div3 id="usability-optional-options">
          <head>Optional options for declared steps</head>
          <p>AM to complete. Simplify the task of passing "optional options" through a pipeline?
            Something that works from the command line but not internally to a library step???</p>
          <eg xml:space="preserve">An example would help.</eg>
        </div3>
        <div3 id="usability-output-signatures">
          <head>Output signatures for compound steps</head>
          <p>Relates to <specref ref="req-allow-composition"/></p>
          <p>The existing magic is not consistent or easily understandable</p>
          <eg xml:space="preserve">An example would help.</eg>
        </div3>
        <div3 id="usability-XPath">
          <head>XPath</head>
          <ulist>
            <item>
              <p>XPath Required?</p>
            </item>
            <item>
              <p>XPath 2.0 only?</p>
            </item>
            <item>
              <p>Custom XPath functions (ala xsl:function) using “simplified XProc steps” (whatever
                that means) </p>
              <p>A way of re-using pipelines. Or allowing pipelines to be imported into XQuery or
                XSLT</p>
            </item>
          </ulist>
        </div3>
        <div3 id="usability-filesets">
          <head>Simplify Use of File Sets</head>
          <p>Some mechanism for loading sets of documents. XProc, as currently defined, feels
            somewhat awkward: </p>
          <ulist>
            <item>
              <p>consider a xyz:documents element which roughly emulates apache ant filesets </p>
            </item>
            <item>
              <p>consider reusable file path structures </p>
            </item>
            <item>
              <p>consider providing conventions for making xproc scripts more cross platform e.g.
                file seperators</p>
            </item>
          </ulist>
          <eg xml:space="preserve">&lt;p:document href="/path/to/directory" include="*.xml"/> 
&lt;p:data href="/path/to/directory" include="*.xml"/></eg>
          <p>Does this relate to <specref ref="input-res-mgr"/>?</p>
        </div3>
        <div3 id="usability-streaming">
          <head>Streaming and Parallel Processing</head>
          <p>Unordered collections? </p>
          <p>Streaming is inhibited by the use of p:try/p:catch to capture validation errors
            (because p:try/p:catch mandates buffering). </p>
          <p diff="add">So, pipelines written to take advantage of streaming processors will want to
            avoid <code>p:try/p:catch</code>. That should be noted. What are other strategies that
            will work in a streaming context? Does <code>eval</code> do the job?-- MM</p>
          <p>Allow <code>p:for-each</code> to generate the result of each step in an unordered way
            (with a simple attribute <att>ordered</att>="<attval>true|false</attval>", the default
            being <code>true</code>).</p>
          <p>Does removing the "in order" from <titleref
              href="http://www.w3.org/TR/xproc/#p.for-each">4.2 p:for-each</titleref>
            <quote>For each declared output, the processor collects all the documents that are
              produced for that output from all the iterations, <emph>in order,</emph> into a
              sequence.</quote> solve the problem? </p>
          <p>Relates to Use Case: <specref ref="use-case-large-document-transform"/></p>
          <p>Relates to Use Case: <specref ref="use-case-add-nav"/></p>
        </div3>
        <div3 id="usability-primary-port" diff="add">
          <head>Required Primary Port</head>
          <ednote diff="add">
            <name>Candidate Use Case</name>
            <date>20120405</date>
            <edtext>Required Primary Port</edtext>
          </ednote>
          <p>(source: Alex Milowski)</p>
          <p>I find myself always frustrated when I have to use steps that have no primary output
            port defined. I usually have to do some sort of "fixup" in the pipeline just to make
            what I believe should be the minimum. I'm often using p:store or ml:insert-document
            (marklogic) and, while there is an output, it just isn't defined as primary. While you
            can say that is just a bad step definition, I think it is more than that. </p>
          <p>I think it would have been better to say that if your step produces any output, one of
            the ports must be defined as primary. This would also avoid pipeline re-arrangements
            after edits due to unconnected output ports. </p>
          <p>For example, consider these two snippets, which are not interchangeable in that the
            first has a single non-primary output and the second has a single primary output.</p>
          <eg xml:space="preserve">&lt;p:store .../> 
&lt;p:viewport match="/doc/section"> 
    &lt;p:store href="..."/>
&lt;/p:viewport></eg>
          <p>My contention is that by requiring when you have output you have one port designated as
            primary, a pipeline will be able to be manipulated with less additional surgery. In my
            case recently, it was the fact that I had following step structure:</p>
          <eg xml:space="preserve">&lt;p:store .../> 
&lt;p:xslt> 
    &lt;p:input port="source">
    &lt;p:pipe step="somewhere" port="result"/> 
&lt;/p:xslt></eg>
          <p>I then wrapped it with a viewport:</p>
          <eg xml:space="preserve">&lt;p:viewport> 
    &lt;p:store .../> 
&lt;/p:viewport> 
&lt;p:xslt> 
    &lt;p:input port="source">
    &lt;p:pipe step="somewhere" port="result"/> 
&lt;/p:xslt></eg>
          <p>and got errors as the primary output port isn't connected. I had to do this to fix
            it:</p>
          <eg xml:space="preserve">&lt;p:viewport> 
    &lt;p:store .../> 
&lt;/p:viewport> 
&lt;p:sink/> 
&lt;p:xslt>
    &lt;p:input port="source">
    &lt;p:pipe step="somewhere" port="result"/> 
&lt;/p:xslt> </eg>
          <p>With my proposal, I would have originally been required to write:</p>
          <eg xml:space="preserve">&lt;p:store../> 
&lt;p:sink/> 
&lt;p:xslt> 
    &lt;p:input port="source"> 
    &lt;p:pipe step="somewhere" port="result"/> 
&lt;/p:xslt></eg>
        </div3>
      </div2>
      <div2 id="input-new-steps">
        <head>New Steps</head>
        <div3>
          <head>Various Suggestions</head>
          <p>The following is a list of proposed steps which require explanation, justification and
            use cases. </p>
          <ulist>
            <item>
              <p>p:sax-filter</p>
            </item>
            <item>
              <p>p:sort</p>
            </item>
          </ulist>
        </div3>
        <div3 id="newsteps-os-operations">
          <head>OS Operations</head>
          <p>These steps are in the “proposed OS extension namespace”,
            http://exproc.org/proposed/steps/os, identified by the prefix “pos”.</p>
          <div4 id="step-cwd">
            <head>pos:cwd</head>
            <p>This function returns the “current working directory” of the processor. This function
              takes no arguments and does not depend on the context. This function should only be
              implemented by processors for which the concept of a “current working directory” is
              coherent. </p>
            <eg xml:space="preserve">&lt;p:declare-step type="pos:cwd">
     &lt;p:output port="result" sequence="true"/>
&lt;/p:declare-step></eg>
            <p>The pos:cwd step returns a single c:result containing the current working directory.
              On systems which have no concept of a working directory, this step returns the empty
              sequence. (This step duplicates the <code>cwd</code> attribute on the c:result from
              pos:info; it's just for convenience.)</p>
            <p>There are no standard XProc steps that change the working directory, so this function
              is likely to return the same value every time it is called. However, there is nothing
              which prevents an extension step from being defined which changes the current working
              directory, so it is not necessarily the case that the same value will always be
              returned.</p>
          </div4>
          <div4 id="step-env">
            <head>pos:env</head>
            <p>Returns information about the environment. On systems which nave no concept of an
              environment and environment variables, this step returns an empty c:result.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pos:env">
     &lt;p:output port="result"/>
&lt;/p:declare-step></eg>
            <p>The pos:env step returns information about the operating system environment. It
              returns a c:result containing zero or more c:env elements. Each c:env has
                <att>name</att> and <att>value</att> attributes containing the <attval>name</attval>
              and <attval>value</attval> of an environment variable.</p>
          </div4>
          <div4 id="step-info">
            <head>pos:info</head>
            <p>Returns information about the operating system.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pos:info">
     &lt;p:output port="result"/>
&lt;/p:declare-step></eg>
            <p>The pos:info step returns information about the operating system on which the
              processor is running. It returns a c:result element with attributes describing
              properties of the system. The exact set of properties returned is
              implementation-dependent. It should include the following properties:</p>
            <glist>
              <gitem>
                <label>file-separator</label>
                <def>
                  <p>The file separator; usually “/” on Unix, “\” on Windows.</p>
                </def>
              </gitem>
              <gitem>
                <label>path-separator</label>
                <def>
                  <p>The path separator; usually “:” on Unix, “;” on Windows.</p>
                </def>
              </gitem>
              <gitem>
                <label>os-architecture</label>
                <def>
                  <p>The operating system architecture, for example “i386”.</p>
                </def>
              </gitem>
              <gitem>
                <label>os-name</label>
                <def>
                  <p>The name of the operating system, for example “Mac OS X”.</p>
                </def>
              </gitem>
              <gitem>
                <label>os-version</label>
                <def>
                  <p>The version of the operating system, for example “10.5.6”.</p>
                </def>
              </gitem>
              <gitem>
                <label>cwd</label>
                <def>
                  <p>The current working directory.</p>
                </def>
              </gitem>
              <gitem>
                <label>user-name</label>
                <def>
                  <p>The login name of the effective user, for example “ndw”.</p>
                </def>
              </gitem>
              <gitem>
                <label>user-home</label>
                <def>
                  <p>The home diretory of the effective user, for example “/home/ndw”.</p>
                </def>
              </gitem>
            </glist>
          </div4>
        </div3>
        <div3 id="newsteps-directory-operations">
          <head>Directory Operations</head>
          <p>The following list is informed by Calabash and <titleref
              href="http://exproc.org/proposed/steps/">eXProc Proposed Steps</titleref>
          </p>
          <p>These steps are in the “proposed file utilities extension namespace”,
            http://exproc.org/proposed/steps/file, identified by the prefix “pxf”.</p>
          <p>Relates to <specref ref="input-res-mgr"/></p>
          <div4 id="step-copy">
            <head>pxf:copy</head>
            <p>Copies a file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:copy">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="target" required="true"/>                     &lt;!-- boolean -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:copy copies the file named in href to the new name specified in target. If
              the target is a directory, the step attempts to move the file into that directory,
              preserving its base name. If the copy is successful, the step returns a c:result
              element containing the absolute URI of the target. If an error occurs, the step fails
              if fail-on-error is true; otherwise, the step returns a c:error element which may
              contain additional, implementation-defined information about the nature of the
              error.</p>
            <glist>
              <gitem>
                <label>err:FU01</label>
                <def>
                  <p>Occurs if the file named in href does not exist or cannot be copied to the
                    specified target.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-cd">
            <head>pxf:chdir</head>
            <p>This function changes the “current working directory” of the processor. This function
              takes one argument and does not depend on the context. This function should only be
              implemented by processors for which the concept of a “current working directory” is
              coherent. </p>
            <p>There are currently no standard XProc steps that change the working directory.
              However, there is nothing which prevents an extension step from being defined which
              changes the current working directory.</p>
          </div4>
          <div4 id="step-delete">
            <head>pxf:delete</head>
            <p>Deletes a file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:delete">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="recursive" select="'false'"/>                 &lt;!-- boolean -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:delete step attempts to delete the file or directory named in href. If the
              file or directory is successfully deleted, the step returns a c:result element
              containing the absolute URI of the deleted file. If href specifies a directory, it can
              only be deleted if the recursive option is true or if the directory is empty. If an
              error occurs, the step fails if fail-on-error is true; otherwise, the step returns a
              c:error element which may contain additional, implementation-defined information about
              the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01</label>
                <def>
                  <p>Occurs if the file named in href does not exist or cannot be deleted.</p>
                </def>
              </gitem>
              <gitem>
                <label>err:FU02</label>
                <def>
                  <p>Occurs if the step attempts to delete a directory that is not empty and the
                    recursive option is not true.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-head">
            <head>pxf:head</head>
            <p>Returns the first few lines of <emph>text</emph> file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:head">
     &lt;p:output port="result"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="count" required="true"/>                      &lt;!-- int -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>Returns the first count lines of the file named in href. If count is negative, the
              step returns all except those first lines. The step returns a c:result element
              containing one c:line for each line. Lines are identified as described in ???, 2.11
              End-of-Line Handling. If an error occurs, the step fails if fail-on-error is true;
              otherwise, the step returns a c:error element which may contain additional,
              implementation-defined information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in href does not exist or cannot be read..</p>
                </def>
              </gitem>
              <gitem>
                <label>err:FU03:</label>
                <def>
                  <p>Occurs if the file named in href does not appear to be a text file. The exact
                    conditions that constitute “does not appear to be” are
                    implementation-defined.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-fileinfo">
            <head>pxf:info</head>
            <p>Returns information about a file or directory.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:info">
     &lt;p:output port="result" sequence="true"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The info step returns information about the file or directory named in href. The step
              returns a c:directory for directories, a c:file for ordinary files, or a c:other for
              other kinds of filesystem objects. Implementations may also return more specific
              types, for example c:device, so anything other than c:directory or c:file must be
              interpreted as “other”. If the document doesn't exist, an empty sequence is returned. </p>
            <p>The document element of the result, if there is one, will have the following
              attributes:</p>
            <table>
              <thead>
                <tr>
                  <th>Attribute</th>
                  <th>Type</th>
                  <th>Description</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>readable</td>
                  <td>xs:boolean</td>
                  <td>“true” if the object is readable.</td>
                </tr>
                <tr>
                  <td>writable</td>
                  <td>xs:boolean</td>
                  <td>“true” if the object is writable.</td>
                </tr>
                <tr>
                  <td>hidden</td>
                  <td>xs:boolean</td>
                  <td>“true” if the object is hidden.</td>
                </tr>
                <tr>
                  <td>last-modified</td>
                  <td>xs:dateTime</td>
                  <td>The last modification time of the object expressed in UTC.</td>
                </tr>
                <tr>
                  <td>size</td>
                  <td>xs:integer</td>
                  <td>The size of the object in bytes.</td>
                </tr>
              </tbody>
            </table>
            <p>If the value of a particular attribute is unknown or inapplicable for the particular
              kind of object, or in the case of boolean attributes, if it's false, then the
              attribute is not present. Additional implementation-defined attributes may be present,
              but they must be in a namespace. If the <att>href</att> attribute specified is not a
                <code>file:</code> URI, then the result is implementation-defined. </p>
            <p>If an error occurs, the step fails if fail-on-error is true; otherwise, the step
              returns a c:error element which may contain additional, implementation-defined
              information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in href does not exist or cannot be read..</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-mkdir">
            <head>pxf:mkdir</head>
            <p>Creates a directory.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:mkdir">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:mkdir step creates a directory with the name in href. If the name includes
              more than one directory component, all of the intermediate components are created. The
              path separator is implementation-defined. The step returns a c:result element
              containing the absolute URI of the directory created. </p>
            <p>If an error occurs, the step fails if fail-on-error is true; otherwise, the step
              returns a c:error element which may contain additional, implementation-defined
              information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in <att>href</att> does not exist or cannot be
                    created.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-move">
            <head>pxf:move</head>
            <p>Moves (renames) a file or directory.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:move">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="target" required="true"/>                     &lt;!-- boolean -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:move step attempts to move (rename) the file specified in the <att>href</att>
              option to the new name specified in the <att>target</att> option. If the target is a
              directory, the step attempts to move the file into that directory, preserving its base
              name. If the move is successful, the step returns a c:result element containing the
              absolute URI of the new name of the file. The original file is effectively removed. </p>
            <p>If the <att>fail-on-error</att> option is <attval>true</attval>, then the step will
              fail if a file with the name specified in the <att>target</att> option already exists,
              or if the file specified in <att>href</att> does not exist or cannot be moved. If the
                <att>fail-on-error</att> option is <attval>false</attval>, the step returns a
              c:error element which may contain additional, implementation-defined information about
              the nature of the error. </p>
            <p>If the <att>href</att> option specifies a directory, device, other special kind of
              object, the results are implementation-defined.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in <att>href</att> does not exist or if the file named
                    in <att>target</att> cannot be created..</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-tail">
            <head>pxf:tail</head>
            <p>Returns the last few lines of a text file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:tail">
     &lt;p:output port="result"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="count" required="true"/>                      &lt;!-- int -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>Returns the last count lines of the file named in href. If count is negative, the
              step returns all except those last lines. The step returns a c:result element
              containing one c:line for each line. Lines are identified as described in ???, 2.11
              End-of-Line Handling. </p>
            <p>If an error occurs, the step fails if fail-on-error is true; otherwise, the step
              returns a c:error element which may contain additional, implementation-defined
              information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in href does not exist or cannot be read.</p>
                </def>
              </gitem>
              <gitem>
                <label>err:FU03:</label>
                <def>
                  <p>Occurs if the file named in href does not appear to be a text file. The exact
                    conditions that constitute “does not appear to be” are
                    implementation-defined.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-tempfile">
            <head>pxf:tempfile</head>
            <p>Creates a temporary file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:tempfile">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="prefix"/>                                     &lt;!-- string -->
     &lt;p:option name="suffix"/>                                     &lt;!-- string -->
     &lt;p:option name="delete-on-exit"/>                             &lt;!-- boolean -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:tempfile step creates a temporary file. The temporary file is guaranteed not
              to already exist when pxf:tempfile is called. The file is created in the directory
              specified by the <att>href</att> option. If <att>prefix</att> is specified, the file's
              name will begin with that prefix. If <att>suffix</att> is specified, the file's name
              will end with that suffix. </p>
            <p>The step returns a c:result element containing the absolute URI of the temporary
              file. If the delete-on-exit option is true, then the temporary file will automatically
              be deleted when the processor terminates. </p>
            <p>If an error occurs, the step fails if fail-on-error is true; otherwise, the step
              returns a c:error element which may contain additional, implementation-defined
              information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in <att>href</att> does not exist or cannot be
                    read..</p>
                </def>
              </gitem>
              <gitem>
                <label>err:FU04:</label>
                <def>
                  <p>Occurs if it is not possible to create a file in the <att>href</att>
                    directory.</p>
                </def>
              </gitem>
            </glist>
          </div4>
          <div4 id="step-touch">
            <head>pxf:touch</head>
            <p>Update the modification time of a file.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxf:touch">
     &lt;p:output port="result" primary="false"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="timestamp"/>                                  &lt;!-- xs:dateTime -->
     &lt;p:option name="fail-on-error" select="'true'"/>              &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The pxf:touch step “touches” the file named in <att>href</att>. The file will be
              created if it does not exist. If <att>timestamp</att> is specified, the modification
              time of the file will be updated to the specified time. If unspecified, the current
              date and time will be used. The step returns a c:result element containing the
              absolute URI of the touched file. </p>
            <p>If an error occurs, the step fails if fail-on-error is true; otherwise, the step
              returns a c:error element which may contain additional, implementation-defined
              information about the nature of the error.</p>
            <glist>
              <gitem>
                <label>err:FU01:</label>
                <def>
                  <p>Occurs if the file named in <att>href</att> does not exist or cannot be
                    changed..</p>
                </def>
              </gitem>
            </glist>
          </div4>
        </div3>
        <div3 id="newsteps-zip-operations">
          <head>Zip Operations</head>
          <p>These steps are in the “proposed extension namespace”,
            http://exproc.org/proposed/steps, identified by the prefix “pxp”.</p>
          <div4 id="step-unzip">
            <head>pxp:unzip</head>
            <p><code>unzip</code> A step for extracting information out of ZIP archives.</p>
            <p>From <loc href="http://exproc.org/proposed/steps/other.html"
                >http://exproc.org/proposed/steps/other.html</loc></p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxp:unzip">
     &lt;p:output port="result"/>
     &lt;p:option name="href" required="true"/>      &lt;!-- anyURI -->
     &lt;p:option name="file"/>                      &lt;!-- string -->
     &lt;p:option name="content-type"/>              &lt;!-- string -->
&lt;/p:declare-step></eg>
            <p>The value of the <code>href</code> option must be an IRI. It is a dynamic error if
              the document so identified does not exist or cannot be read. The value of the
                <code>file</code> option, if specified, must be the fully qualified path-name of a
              document in the archive. It is dynamic error if the value specified does not identify
              a file in the archive. The output from the <code>pxp:unzip</code> step must conform to
              the ziptoc.rnc schema. If the <code>file</code> option is specified, the selected file
              in the archive is extracted and returned:</p>
            <ulist>
              <item>
                <p>If the content-type is not specified, or if an XML content type is specified, the
                  file is parsed as XML and returned. It is a dynamic error if the file is not
                  well-formed XML. </p>
              </item>
              <item>
                <p>If the content-type specified is not an XML content type, the file is base64
                  encoded and returned in a single c:data element.</p>
              </item>
            </ulist>
            <p>If the file option is not specified, a table of contents for the archive is returned.
              For example, the contents of the XML Calabash 0.8.5 distribution archive might be
              reported like this:</p>
            <eg xml:space="preserve">&lt;c:zipfile xmlns:c="http://www.w3.org/ns/xproc-step"
           href="http://xmlcalabash.com/download/calabash-0.8.5.zip">
   &lt;c:directory name="calabash-0.8.5/" date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:directory name="calabash-0.8.5/docs/" date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="11942" size="36677" name="calabash-0.8.5/docs/CDDL+GPL.txt"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="928" size="2110" name="calabash-0.8.5/docs/ChangeLog"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="6817" size="17987" name="calabash-0.8.5/docs/GPL.txt"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="494" size="830" name="calabash-0.8.5/docs/NOTICES"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:directory name="calabash-0.8.5/lib/" date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="389650" size="407421" name="calabash-0.8.5/lib/calabash.jar"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="1237" size="2493" name="calabash-0.8.5/README"
           date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:directory name="calabash-0.8.5/xpl/" date="2008-11-04T19:29:20.000-05:00"/>
   &lt;c:file compressed-size="175" size="255" name="calabash-0.8.5/xpl/pipe.xpl"
           date="2008-11-04T19:29:20.000-05:00"/>
&lt;/c:zipfile></eg>
            <div5>
              <head>Thoughts from Vojtech</head>
              <p>- I think for non-XML data, the step should behave as p:data or p:http-request.
                Right now, the pxp:unzip spec says that: "If the content-type specified is not an
                XML content type, the file is base64 encoded and returned in a single c:data
                element." This obviously does not match the behavior of p:data wrt text media types.
                The pxp:unzip step also does not insert the "content-type" and "encoding" attributes
                on the c:data wrapper. </p>
              <p>- What happens if the file specified through the "file" option is not found in the
                archive (I assume a dynamic error)? </p>
            </div5>
          </div4>
          <div4 id="step-zip">
            <head>pxp:zip</head>
            <p><code>zip</code> A step for creating ZIP archives.</p>
            <p>From <loc href="http://exproc.org/proposed/steps/other.html"
                >http://exproc.org/proposed/steps/other.html</loc></p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxp:zip">
     &lt;p:input port="source" sequence="true" primary="true"/>
     &lt;p:input port="manifest"/>
     &lt;p:output port="result"/>
     &lt;p:option name="href" required="true"/>                       &lt;!-- anyURI -->
     &lt;p:option name="compression-method"/>                         &lt;!-- "stored" | "deflated" -->
     &lt;p:option name="compression-level"/>                          &lt;!-- "smallest" | "fastest" | "default" | "huffman" | "none" -->
     &lt;p:option name="command" select="'update'"/>                  &lt;!-- "update" | "freshen" | "create" | "delete" -->
&lt;/p:declare-step></eg>
            <p>The ZIP archive is identified by the <code>href</code>. The manifest (described
              below) provides the list of files to be processed in the archive. The command
              indicates the nature of the processing: “update”, “freshen”, “create”, or “delete”. If
              files are added to the archive, compression-method indicates how they should be added:
              “stored” or “deflated”. For deflated files, the compression-level identifies the kind
              of compression: “smallest”, “fastest”, “default”, “huffman”, or “none”. The entries
              identified by the manifest are processed. The manifest must conform to the following
              schema:</p>
            <eg xml:space="preserve">default namespace c="http://www.w3.org/ns/xproc-step"

start = zip-manifest

zip-manifest =
   element c:zip-manifest {
      entry*
   }

entry =
   element c:entry {
      attribute name { text }
    &amp; attribute href { text }
    &amp; attribute comment { text }?
    &amp; attribute method { "deflated" | "stored" }
    &amp; attribute level { "smallest" | "fastest" | "huffman" | "default" | "none" }
      empty
   }
</eg>
            <p>For example:</p>
            <eg xml:space="preserve">&lt;zip-manifest xmlns="http://www.w3.org/ns/xproc-step">
  &lt;entry name="file1.xml" href="http://example.org/file1.xml" comment="An example file"/>
  &lt;entry name="path/to/file2.xml" href="http://example.org/file2.xml" method="stored"/>
&lt;/zip-manifest></eg>
            <p>If the command is “delete”, then file1.xml and path/to/file2.xml will be deleted from
              the archive. Otherwise, the file that appears on the source port that has the base URI
              http://example.org/file1.xml will be stored in the archive as file1.xml (using the
              default method and level), the file that appears on the source port that has the base
              URI http://example.org/file2.xml will be stored in the archive as path/to/file2.xml
              without being compressed. </p>
            <p>A c:zipfile description of the archive content is produced on the result port.</p>
            <div5>
              <head>Thoughts from Vojtech</head>
              <p>- What about source files that are not included in the pxp:zip manifest? Is that an
                error or do they end up in the ZIP archive under their original base URI? </p>
              <p>- Serialization. At the moment, pxp:zip does not allow to specify how XML documents
                are serialized in the ZIP archive. I ended up with adding serialization options to
                pxp:zip which are applied to each XML file and are therefore archive-global. It
                might be useful, though, to be able to specify different serialization options per
                file - but that would probably require putting the serialization options into the
                pxp:zip manifest somehow. </p>
              <p>- Not sure about the compression level names "smallest" | "fastest" | "default" |
                "huffman" | "none". They are a direct lift from the Java java.util.zip.Deflater API.
                Plus, the "huffman" constant is not a compression level, but a compression strategy.
                I think it should not be in the list. </p>
              <p>- The pxp:zip step returns a c:zipfile representation of the ZIP archive on the
                "result" port. While I understand that this might be useful, it is not consistent
                with existing standard steps that write output to an external location (p:store,
                p:xsl-formatter) and that return a URI reference to the external data. </p>
              <p>it would be nice if it were possible to compress non-XML data as well (in a similar
                way that p:http-request allows sending non-XML request bodies). Otherwise things
                such as creating an EPUB with images would still be impossible with standard
                XProc.</p>
            </div5>
          </div4>
        </div3>
        <div3 id="newsteps-cookie-operations">
          <head>Cookie Operations</head>
          <div4 id="step-get-cookies">
            <head>cx:get-cookies</head>
            <p>Get the cookies returned by the previous HTTP request.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="cx:get-cookies">
     &lt;p:output port="result"/>
     &lt;p:option name="cookies"/>                                    &lt;!-- string -->
&lt;/p:declare-step>
</eg>
          </div4>
          <div4 id="step-set-cookies">
            <head>cx:set-cookies</head>
            <p>Set cookies for subsequent HTTP requests.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="cx:set-cookies">
     &lt;p:input port="source"/>
     &lt;p:option name="cookies"/>                                    &lt;!-- string -->
&lt;/p:declare-step>
</eg>
          </div4>
        </div3>
        <div3 id="new-steps-eval">
          <head>Dynamic pipeline evaluation</head>
          <div4 id="step-apply">
            <head>xyz:apply</head>
            <p>Run a static, known step, whose type is computed dynamically.</p>
            <eg xml:space="preserve">An example would help.</eg>
          </div4>
          <div4 id="step-eval">
            <head>cx:eval</head>
            <p>Compile a pipeline and run it.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="cx:eval">
     &lt;p:input port="pipeline"/>
     &lt;p:input port="source" sequence="true"/>
     &lt;p:input port="options"/>
     &lt;p:output port="result"/>
     &lt;p:option name="step"/>                                       &lt;!-- QName -->
     &lt;p:option name="detailed"/>                                   &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>In the simplest case, where the specified pipeline has a single input and a single
              output, the document(s) on the source port are passed to the pipeline, processed, and
              the results are passed back on the result port. </p>
            <p>If the pipeline specified has multiple inputs or outputs, then the inputs and outputs
              have to be “multiplexed” on the single port. If this is the case, you must specify
              that the detailed option is “true”, and encode the input using cx:document. Each input
              must be wrapped in cx:document with a port attribute that identifies the port to which
              that document is to be sent. Each output will be wrapped in a cx:document element
              identifying the port from which it came. </p>
            <p>If the pipeline has options, they are passed to the options port. Each options
              document must have cx:options as its document element and consist entirely of
              cx:option elements with name and value attributes that specify options and their
              values. </p>
            <p>If the pipeline is a p:library, then the step to evaluate may be specified using the
              step option. If the pipeline is a library and no step option is specified, the first
              step in the library will be selected.</p>
          </div4>
        </div3>
        <div3 id="newsteps-validate">
          <head>Validation Operations</head>
          <div4 id="step-nvdl">
            <head>pxp:nvdl</head>
            <p>Relates to Use Case: <specref ref="use-case-dsdl-validation"/></p>
            <p>These steps are in the “proposed extension namespace”,
              http://exproc.org/proposed/steps, identified by the prefix “pxp”.</p>
            <p>A step for performing NVDL (Namespace-based Validation Dispatching Language)
              validation over mixed-namespace documents. </p>
            <eg xml:space="preserve">&lt;p:declare-step type="pxp:nvdl">
     &lt;p:input port="source" primary="true"/>
     &lt;p:input port="nvdl"/>
     &lt;p:input port="schemas" sequence="true"/>
     &lt;p:output port="result"/>
     &lt;p:option name="assert-valid" select="'true'"/>               &lt;!-- boolean -->
&lt;/p:declare-step></eg>
            <p>The source document is validated using the namespace dispatching rules contained in
              the nvdl document. The dispatching rules may contain URI references that point to the
              actual schemas to be used. As long as these schemas are accessible, it is not
              necessary to pass anything on the schemas port. However, if one or more schemas are
              provided on the schemas port, then these schemas should be used in validation. This
              requirement is expressed only as a “should” and not a “must” because XProc version 1.0
              does not mandate that implementations support caching of documents so that requests
              for a URI by one step can automatically access the result of some other step if that
              result had a base URI identical to the requested document. </p>
            <p>However, it's not clear that the schemas port has any value if the implementation
              does not support this behavior. The value of the assert-valid option must be a
              boolean. It is a dynamic error if the assert-valid option is true and the input
              document is not valid. The output from this step is a copy of the input, possibly
              augmented by application by schema processing. The output of this step may include
              PSVI annotations.</p>
          </div4>
        </div3>
        <div3 id="newsteps-messaging">
          <head>Messaging Operation</head>
          <div4 id="step-send-mail">
            <head>cx:send-mail</head>
            <p>A step to handle SMTP and sending e-mail messages.</p>
            <eg xml:space="preserve">&lt;p:declare-step type="cx:send-mail">
     &lt;p:input port="source" sequence="true"/>
     &lt;p:output port="result"/>
&lt;/p:declare-step></eg>
            <p>The first document on the source port is expected to conform to <titleref
                href="http://tools.ietf.org/html/draft-klyne-message-rfc822-xml-03">An XML format
                for mail and other messages</titleref>. Any additional documents are treated as
              attachments. The <att>em:content</att> may contain either text or HTML. To send some
              other type as the first message body, you must leave the em:content element out of the
              first document and supply the body as a second document.</p>
          </div4>
        </div3>
        <div3 id="newsteps-dsig">
          <head>Digital Signatures</head>
          <div4 id="step-sign">
            <head>xyz:sign</head>
            <p>The <emph>xyz</emph> namespace is speculative.</p>
            <p>Based upon review of existing Use Case, a new <code>p:sign</code> step is required to
              satisfy <specref ref="use-case-xinclude-dsig"/></p>
          </div4>
        </div3>
        <div3>
          <head>File Sets</head>
          <div4>
            <head>xyz:documents</head>
            <p>Relates to <specref ref="usability-filesets"/></p>
            <p>Consider a xyz:documents element which roughly emulates apache ant filesets </p>
          </div4>
        </div3>
        <div3 id="newsteps-iteration">
          <head>Iteration</head>
          <p>Repeat a [step | group] until some XPath expression is satisfied, feeding its output
            back as its input after the first go-around. Special built-in support for iterate to
            fixed-point? </p>
          <p>A way to merge the context defined by elements <code>p:xpath-context</code>,
              <code>p:viewport-source</code>, <code>p:iteration-source</code> ?</p>
          <p>The <emph>xyz</emph> namespace is speculative.</p>
          <div4 id="step-iterate">
            <head>xyz:iterate</head>
            <p>Compound step like xsl:iterate (XSLT 3.0)</p>
          </div4>
          <div4 id="step-iteration-source">
            <head>p:iteration-source</head>
            <p>p:iteration-source </p>
          </div4>
          <div4 id="step-until-unchange">
            <head>xyz:until-unchanged</head>
            <p>Iterate-to-fixed-point already implemented as an extension step in Calabash:
              ex:until-unchanged</p>
          </div4>
        </div3>
        <div3 id="newsteps-debugging">
          <head>Debugging Operations</head>
          <p>These are highly speculative steps hypothesized by an editor. -- MM</p>
          <p>Relates to <specref ref="integration-debugging"/></p>
          <p>The <emph>dbxml</emph> namespace is speculative.</p>
          <p>We note steps and functions which provide access to a variety of information that is
            useful in debugging:</p>
          <ulist>
            <item>
              <p>Processor XPath Context</p>
            </item>
            <item>
              <p>Step XPath Context</p>
            </item>
            <item>
              <p>p:log </p>
            </item>
            <item>
              <p>p:documentation</p>
            </item>
            <item>
              <p><titleref href="http://www.w3.org/TR/xproc/#xpath-extension-functions">XPath
                  Extension Functions</titleref></p>
              <ulist>
                <item>
                  <p>p:pipeinfo</p>
                </item>
                <item>
                  <p>p:step-available</p>
                </item>
                <item>
                  <p>p:value-available</p>
                </item>
                <item>
                  <p>p:iteration-position</p>
                </item>
                <item>
                  <p>p:iteration-size</p>
                </item>
                <item>
                  <p>p:base-uri</p>
                </item>
                <item>
                  <p>p:version-available</p>
                </item>
                <item>
                  <p>p:xpath-version-available</p>
                </item>
              </ulist>
            </item>
          </ulist>
          <div4 id="step-breakpoint">
            <head>dbxml:breakpoint</head>
            <p>Set a breakpoint, optionally based upon a condition, that will cause pipeline
              operation to pause at the breakpoint, possibly requiring user intervention to continue
              and/or issuing a message. </p>
          </div4>
          <div4>
            <head>dbxml:comment</head>
            <p>Like xsl:comment. Include a comment in the output stream. </p>
          </div4>
          <div4 id="step-debug">
            <head>dbxml:debug</head>
            <p>Set debug scope and declare its mode. Provides advice to a processor to facilitate
              targeted debugging. Allows programmers to leave an audit trail for quality assurance
              purposes. The mode could be an NMTOKEN list representing, for example, levels of
              verbosity. Implies the existence of a processor debug state stack. </p>
          </div4>
          <div4 id="step-message">
            <head>dbxml:message</head>
            <p>Like xsl:message. Issue a debugging message, typically including dynamic
              representation of one or more execution variables or functions to assist in the
              debugging process. A message may be a simple text message or a complex XML document.
              Presumes ability to resolve references to named variables in the pipeline and
              processor environments. Presumably these messages would be issued conditionally, which
              mechanism is extant. The output port(s) would likely depend on the application. </p>
          </div4>
          <div4 id="step-trace">
            <head>dbxml:trace</head>
            <p>Provides advice to an XProc processor to produce implementation-defined traces of
              pipeline execution. </p>
            <ulist>
              <item>
                <p>XProc Call Stack</p>
              </item>
              <item>
                <p>XPath Call Stack</p>
              </item>
              <item>
                <p>XQuery Call Stack</p>
              </item>
              <item>
                <p>XQuery/Xpath contexts</p>
              </item>
              <item>
                <p>Step inputs, outputs</p>
              </item>
              <item>
                <p>Variables and parameters in scope</p>
              </item>
            </ulist>
          </div4>
          <div4 id="step-tracediff">
            <head>dbxml:tracediff</head>
            <p>Produces a diff of two trace reports to compare iterative reports.</p>
          </div4>
        </div3>
      </div2>
    </div1>
    <div1 id="contributors">
      <head>Contributors</head>
      <p diff="chg">Members of the Working Group contributed to this specification as noted
        throughout. </p>
      <ulist diff="chg">
        <item>
          <p>Erik Bruchez provided use cases.</p>
        </item>
        <item>
          <p>Alex Milowski produced the original XProc Requirements and Use Cases Working Draft and
            provided many use cases.</p>
        </item>
        <item>
          <p>Henry Thompson provided use cases.</p>
        </item>
        <item>
          <p>Norm Walsh contributed details of steps that are implemented in Calabash and provided
            use cases.</p>
        </item>
        <item>
          <p>Mohamed Zergaoui contributed through email and working group discussion.</p>
        </item>
      </ulist>
    </div1>
  </back>
</spec>
