Name

cx:asciidoctor — Convert AsciiDoc text to XML.

Synopsis

<p:declare-step type="cx:asciidoctor" xmlns:cx="http://xmlcalabash.com/ns/extensions">
     <p:input port="source"/>
     <p:output port="result"/>
     <p:option name="allow-read-uri"/>                             <!-- boolean -->
     <p:option name="attribute-missing"/>                          <!-- string -->
     <p:option name="attribute-undefined"/>                        <!-- string -->
     <p:option name="backend"/>                                    <!-- string -->
     <p:option name="title"/>                                      <!-- string -->
     <p:option name="doctype"/>                                    <!-- string -->
     <p:option name="imagesdir"/>                                  <!-- string -->
     <p:option name="source-language"/>                            <!-- string -->
     <p:option name="source-highlighter"/>                         <!-- string -->
     <p:option name="max-include-depth"/>                          <!-- integer -->
     <p:option name="sectnumlevels"/>                              <!-- integer -->
     <p:option name="hardbreaks"/>                                 <!-- boolean -->
     <p:option name="cache-uri"/>                                  <!-- boolean -->
     <p:option name="hide-uri-scheme"/>                            <!-- boolean -->
     <p:option name="appendix-caption"/>                           <!-- string -->
     <p:option name="math"/>                                       <!-- string -->
     <p:option name="skip-front-matter"/>                          <!-- boolean -->
     <p:option name="setanchors"/>                                 <!-- boolean -->
     <p:option name="untitled-label"/>                             <!-- string -->
     <p:option name="ignore-undefined"/>                           <!-- boolean -->
     <p:option name="toc-placement"/>                              <!-- string -->
     <p:option name="toc2-placement"/>                             <!-- string -->
     <p:option name="showtitle"/>                                  <!-- boolean -->
     <p:option name="toc"/>                                        <!-- boolean -->
     <p:option name="localdate"/>                                  <!-- dateTime -->
     <p:option name="localtime"/>                                  <!-- dateTime -->
     <p:option name="docdate"/>                                    <!-- dateTime -->
     <p:option name="doctime"/>                                    <!-- dateTime -->
     <p:option name="stylesheet"/>                                 <!-- string -->
     <p:option name="stylesdir"/>                                  <!-- string -->
     <p:option name="linkcss"/>                                    <!-- boolean -->
     <p:option name="copycss"/>                                    <!-- boolean -->
     <p:option name="icons"/>                                      <!-- string -->
     <p:option name="iconfont-remote"/>                            <!-- boolean -->
     <p:option name="iconfont-cdn"/>                               <!-- anyURI -->
     <p:option name="iconfont-name"/>                              <!-- string -->
     <p:option name="data-uri"/>                                   <!-- boolean -->
     <p:option name="iconsdir"/>                                   <!-- string -->
     <p:option name="numbered"/>                                   <!-- boolean -->
     <p:option name="linkattrs"/>                                  <!-- boolean -->
     <p:option name="experimental"/>                               <!-- boolean -->
     <p:option name="nofooter"/>                                   <!-- boolean -->
     <p:option name="compat-mode"/>                                <!-- string -->
     <p:option name="header-footer" select="'true'"/>              <!-- boolean -->
     <p:option name="template-dirs"/>                              <!-- string -->
     <p:option name="template-engine"/>                            <!-- string -->
     <p:option name="safe"/>                                       <!-- string -->
     <p:option name="eruby"/>                                      <!-- string -->
     <p:option name="compact"/>                                    <!-- boolean -->
     <p:option name="base-dir"/>                                   <!-- string -->
     <p:option name="template-cache"/>                             <!-- boolean -->
     <p:option name="parse-header-only"/>                          <!-- boolean -->
</p:declare-step>

Description

This step converts AsciiDoc documents into XML or HTML.

The cx:asciidoctor step defines a rather startling number of options. The list is intended to be comprehensive with respect to the attributes and options that can be passed to the asciidoctorj formatter. The names reflect the names used by the project, as far as I can tell. They are: allow-read-uri, appendix-caption, attribute-missing, attribute-undefined, backend, base-dir, cache-uri, compact, compat-mode, copycss, data-uri, docdate, doctime, doctype, eruby, experimental, hardbreaks, header-footer, hide-uri-scheme, iconfont-cdn, iconfont-name, iconfont-remote, icons, iconsdir, ignore-undefined, imagesdir, linkattrs, linkcss, localdate, localtime, math, max-include-depth, nofooter, numbered, parse-header-only, safe, sectnumlevels, setanchors, showtitle, skip-front-matter, source-highlighter, source-language, stylesdir, stylesheet, template-cache, template-dirs, template-engine, title, toc, toc-placement, toc2-placement, untitled-label

This step sets the “header-footer” option to “true” by default because otherwise the resulting XML is often not well-formed.

It's quite possible that some of the options are non-sensical in this context. You can't, for example, parse and then interrogate the resulting Java object that represents document so options designed for that purpose aren't going to do anything useful. Options that don't make sense may be removed in the future. Once I've figured out which ones they are.

Usage

To use this step, you must include its declaration in your pipeline. You can copy the declaration above or import a library that defines this step, such as

http://xmlcalabash.com/extension/steps/asciidoctor.xpl

Implementation

This step is implemented by the xmlcalabash1-asciidoctor module. The jar file from that project must be in the class path in order to use this step.