Test with-input-select-001.xml is expected to pass.
<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result" sequence="true"/>
<p:option name="blank" select="''"/>
<p:option name="class" select="concat($blank, 'b')"/>
<p:identity>
<p:with-input port="source" select="//c:chapter[@class=$class]">
<p:inline>
<document xmlns="http://www.w3.org/ns/xproc-step">
<chapter class="a">one</chapter>
<chapter class="a">two</chapter>
<chapter class="b">three</chapter>
</document>
</p:inline>
</p:with-input>
</p:identity>
<p:wrap-sequence wrapper="c:result"/>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/*">
<s:assert test="self::c:result">The pipeline root is not c:result.</s:assert>
<s:assert test="count(c:chapter) = 1">There should be 1 chapter.</s:assert>
<s:assert test="c:chapter = 'three'">The value should be three.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Added attribute 'queryBinding' to schematron's schema.
Add tests for @select on p:with-input