Tests that XMLn’t works.
Test xmlnt-001.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
<p:output port="result" sequence="true"/>
<p:identity>
<p:with-input>
<p:document href="../documents/xmlnt/simple.xml" parameters="map { 'cx:xmlnt': 'entities' }"/>
</p:with-input>
</p:identity>
<p:cast-content-type content-type="text/plain"/>
<p:wrap-sequence wrapper="wrapper"/>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="wrapper">The root is wrong.</s:assert>
<s:assert test="starts-with(wrapper, '<doc a=')">The wrapper doesn’t wrap the doc</s:assert>
<s:assert test="matches(wrapper, 'testing
\s+with a newline')">Attribute doesn’t have a newline</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.