with-input-select-012
Tests select on p:with-input/@select resulting in a map is "application/json"
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input select="map{'key' : 'value'}">
<doc/>
</p:with-input>
</p:identity>
<p:identity>
<p:with-input>
<result>{p:document-property(., 'content-type')}</result>
</p:with-input>
</p:identity>
</p:declare-step>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">application/json</result>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:pattern>
<s:rule context="/">
<s:assert test="result">Document root is not 'result'.</s:assert>
<s:assert test="result/text()='application/json'">'result' does not a text child with value 'application/json'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 27 Nov 2021, Achim Berndzen
- Fixed test as consequence of pr#1042.
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 04 Aug 2019, Achim Berndzen
- Changed test: Result of select="p:document-property..." is a JSON documents too.
- 12 Jan 2019, Achim Berndzen
- Added test