ab-inline-018
Tests expand-text on p:input/p:inline
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:input port="source">
<p:inline expand-text="false"
content-type="application/json">{"key" : "value"}</p:inline>
</p:input>
<p:output port="result"/>
<p:cast-content-type content-type="application/xml"/>
</p:declare-step>
Result
<map xmlns="http://www.w3.org/2005/xpath-functions"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<string key="key">value</string>
</map>
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 uri="http://www.w3.org/2005/xpath-functions"
prefix="fn"/>
<s:pattern>
<s:rule context="/">
<s:assert test="fn:map">The document root is not 'map'.</s:assert>
<s:assert test="fn:map/fn:string[@key='key']">There is no "string"-child with attribute "key" equals "key".</s:assert>
<s:assert test="fn:map/fn:string[@key='key']/text()='value'">The text value of "string" is not "value".</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 04 Jun 2024, Achim Berndzen
- Added test.