Depends with p:choose

<p:declare-step xml:id="b2-choose"
		xmlns:p="http://www.w3.org/ns/xproc">
  <p:input port="parameters" kind="parameter"/>

  <p:xinclude>
    <p:input port="source">
      <p:document href="langspec.xml"/>
    </p:input>
  </p:xinclude>

  <p:validate-with-relax-ng>
    <p:input port="schema">
      <p:document href="../schema/dbspec.rng"/>
    </p:input>
  </p:validate-with-relax-ng>

  <p:xslt>
    <p:input port="stylesheet">
      <p:document href="../style/dbspec.xsl"/>
    </p:input>
  </p:xslt>

  <p:store name="store" href="langspec.html"/>

  <p:choose>
    <p:xpath-context>
      <p:pipe step="store" port="result"/>
    </p:xpath-context>
    <p:when test="/this-will-always-be-empty">
      <p:error code="hcf">
        <p:input port="source">
          <p:inline><message>This can't happen.</message></p:inline>
        </p:input>
      </p:error>
    </p:when>
    <p:otherwise>
      <p:exec result-is-xml="false"
              source-is-xml="false"
              command="/Users/ndw/bin/tidy"
              args="langspec.html">
        <p:input port="source"><p:empty/></p:input>
      </p:exec>
      <p:sink/>
    </p:otherwise>
  </p:choose>

</p:declare-step>