<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/asciidoctor-001.xml"
        name="asciidoctor-001.xml"
        expected="pass">
   <t:info>
      <t:title>asciidoctor-001</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-02-21</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 Asciidoctor creates DocBook.</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/asciidoctor.xpl"/>
         <p:output port="result" sequence="true"/>
         <cx:asciidoctor>
            <p:with-input>
               <p:inline content-type="text/plain">
This is a paragraph.
      </p:inline>
            </p:with-input>
         </cx:asciidoctor>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
         <s:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="db:simpara">The root is wrong.</s:assert>
               <s:assert test="db:simpara = 'This is a paragraph.'">The paragraph is wrong</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="asciidoctor-001.xml">
      <simpara xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink">This is a paragraph.</simpara>
   </t:result>
</t:test>
