<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" code="err:XD0050"
        xmlns:err="http://www.w3.org/ns/xproc-error"
        xmlns:t="http://xproc.org/ns/testsuite/3.0">
  <t:info>
    <t:title>expand-templates-002</t:title>
    <t:revision-history>
      <t:revision>
        <t:date>2026-05-10</t:date>
        <t:author>
          <t:name>Norm Tovey-Walsh</t:name>
        </t:author>
        <t:description xmlns="http://www.w3.org/1999/xhtml">
          <p>Fixed title.</p>
        </t:description>
      </t:revision>
      <t:revision>
        <t:date>2025-11-15</t:date>
        <t:author>
          <t:name>Norm Tovey-Walsh</t:name>
        </t:author>
        <t:description xmlns="http://www.w3.org/1999/xhtml">
          <p>Created test.</p>
        </t:description>
      </t:revision>
    </t:revision-history>
  </t:info>
  <t:description xmlns="http://www.w3.org/1999/xhtml">
    <p>Tests ex:expand-template.</p>
  </t:description>
  <t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:ex="http://exproc.org/ns/steps"
                name="main" version="3.0">
  <p:import href="https://xmlcalabash.com/ext/library/expand-templates.xpl"/>
  <p:output port="result"/>

  <ex:expand-templates>
    <p:with-input>
      <p:inline exclude-inline-prefixes="#all"
                ><doc><sum>{{$x+4}}</sum><greeting>{{$greeting}}</greeting></doc></p:inline>
    </p:with-input>
    <p:with-option name="variables"
                   select="map{'y':3}"/>
  </ex:expand-templates>
</p:declare-step>
  </t:pipeline>
</t:test>
