Defining the validate-twice-with-surgery pipeline

This pipeline validates twice, once without requiring validity (the '*' in the first validation step below) and once requiring it (the 'valid' in the second validation step below). In between all element infoitems not known to the schema are discarded. For a discussion of how this can be used to support versioning of XML languages, see Versioning made easy. You can see below both the XML form and a snapshot of the pipeline authoring tool display for this pipeline.

<p:pipeline xmlns:p="http://www.w3.org/2002/02/xml-pipeline"
            xmlns:pe="http://ns.markuptechnology.com/runtime/pipelines/v1">
 <p:processdef name="eliminate" definition="MT_Eliminate"/>
 <p:processdef name="validate" definition="MT_W3C_XML_Schema_1.0"/>
 <p:process type="validate">
  <p:input label="$IN"/>
  <p:input name="schema" label="schemaDoc"/>
  <p:param name="validity" select="*"/>
  <p:output label="#i2.1"/>
 </p:process>
 <p:process type="eliminate">
  <p:input label="#i2.1"/>
  <p:param name="select" select="*[pe:validity()='notKnown']"/>
  <p:output label="#i4.1"/>
 </p:process>
 <p:process type="validate">
  <p:input label="#i4.1"/>
  <p:input name="schema" label="schemaDoc"/>
  <p:param name="validity" select="valid"/>
  <p:output label="$OUT"/>
 </p:process>
</p:pipeline>
Snapshot of GUI for V2S pipeline