<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/basex-file-touch-005.xml"
        name="basex-file-touch-005.xml"
        expected="pass"
        features="basex-collector p:file-touch p:file-info">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>p:file-touch (BaseX) 005 (AB)</t:title>
      <t:revision-history xmlns:p="http://www.w3.org/ns/xproc">
         <t:revision>
            <t:date>2026-10-25</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Transformed mechanically from ab-file-touch-005.xml</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:err="http://www.w3.org/ns/xproc-error">
      <p>Tests p:file-touch for non existing resource</p>
   </t:description>
   <t:file-environment xmlns:err="http://www.w3.org/ns/xproc-error"/>
   <t:pipeline xmlns:err="http://www.w3.org/ns/xproc-error">
      <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"/>
         <p:file-touch href="basex://XProcUnitTestDB/testfolder/file.txt" name="touch"/>
         <p:file-info href="basex://XProcUnitTestDB/testfolder/file.txt" depends="touch"/>
      </p:declare-step>
   </t:pipeline>
   <t:schematron xmlns:err="http://www.w3.org/ns/xproc-error">
      <s:schema xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://purl.oclc.org/dsdl/schematron"
                queryBinding="xslt2">
         <s:ns uri="http://www.w3.org/ns/xproc-step" prefix="c"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="c:file">Root element is not c:file.</s:assert>
               <s:assert test="c:file/@name='file.txt'">c:file/@name is not 'file.txt'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="basex-file-touch-005.xml">
      <c:file xmlns:c="http://www.w3.org/ns/xproc-step"
              type="binary"
              content-type="text/plain"
              modified-date="2026-11-21T15:02:46.774Z"
              size="0"
              xml:base="basex://XProcUnitTestDB/testfolder/file.txt/testfolder/file.txt"
              name="file.txt"/>
   </t:result>
</t:test>
