http-directory-list-004
Tests p:directory-list with an http URI pointing to XML that’s really XHTML.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-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:option name="WHOST"
select="'http://localhost:8246'" static="true"/>
<p:directory-list xmlns:cx="http://xmlcalabash.com/ns/extensions"
path="{$WHOST}/docs/helloworld.xml"
override-content-types="[['.*.xml', 'application/xhtml+xml']]" detailed="true"
max-depth="unbounded"/>
</p:declare-step>
Result
<c:directory xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:t="http://xproc.org/ns/testsuite/3.0" xml:base="http://apache2/docs/"
name="helloworld.xml" cx:date="2026-11-21T15:03:09Z"
last-modified="2026-04-20T12:35:56Z" cx:etag='"ce-64fe38a480cb5"' size="206"
content-type="application/xml">
<c:file xml:base="helloworld.png"
name="helloworld.png" cx:date="2026-11-21T15:03:09Z"
last-modified="2026-04-20T12:35:56Z" cx:etag='"31f7-64fe38a480cb5"' size="12791"
content-type="image/png"/>
</c:directory>
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/ns/xproc-step"
prefix="c"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:directory">Root element is not c:directory.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/c:directory">
<s:assert test="@content-type='application/xml'">Incorrect content type</s:assert>
<s:assert test="c:file/@name='helloworld.png'">No image</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 28 Oct 2026, Norm Tovey-Walsh
- Initial commit.