cache-006

Tests that the document can be removed from the cache.

Test cache-006.xml is expected to fail with error code cxerr:XI0038.

The pipeline

<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:cxerr="http://xmlcalabash.com/ns/error" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:import href="https://xmlcalabash.com/ext/library/cache.xpl"/>
   <p:output port="result"/>
   <cx:cache-delete name="cache-delete" fail-if-not-in-cache="true" href="https://xmlcalabash.com/does/not/exist.xml">
      <p:with-input>
         <irrelevant/>
      </p:with-input>
   </cx:cache-delete>
   <p:try>
      <p:xinclude depends="cache-delete">
         <p:with-input>
            <doc xmlns:xi="http://www.w3.org/2001/XInclude">
               <xi:include href="https://xmlcalabash.com/does/not/exist.xml"/>
            </doc>
         </p:with-input>
      </p:xinclude>
      <p:catch code="err:XC0029">
         <p:identity>
            <p:with-input>
               <correct/>
            </p:with-input>
         </p:identity>
      </p:catch>
   </p:try>
</p:declare-step>

Revision history

10 May 2026, Norm Tovey-Walsh

Fixed title.

29 Nov 2024, Norm Tovey-Walsh

Created test.