<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ebnf-convert-003.xml"
        name="ebnf-convert-003.xml"
        expected="pass">
   <t:info>
      <t:title>ebnf-convert-003</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-02-24</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 that cx:ebnf-convert accepts explicit type not ixml.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      name="main"
                      version="3.0">
         <p:import href="https://xmlcalabash.com/ext/library/ebnf-convert.xpl"/>
         <p:output port="result" sequence="true"/>
         <cx:ebnf-convert notation="abnf">
            <p:with-input port="source">
               <p:inline content-type="text/plain">
   Thing         = letter ":" letters

   letter        = %x41-5A / %x61-7A   ; A-Z / a-z
   letters       = letter optional
   optional      = *(letter)
      </p:inline>
            </p:with-input>
         </cx:ebnf-convert>
         <p:wrap-sequence wrapper="wrapper"/>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <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="contains(wrapper, '::=')">Grammar is wrong.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="ebnf-convert-003.xml">
      <wrapper>/* converted on Sat Jul 18, 2026, 16:01 (UTC) by abnf-to-w3c v0.72 which is Copyright (c) 2011-2025 by Gunther Rademacher &lt;grd@gmx.net&gt; */

Thing    ::= letter ':' letters
letter   ::= [A-Za-z]
letters  ::= letter optional
optional ::= letter*</wrapper>
   </t:result>
</t:test>
