asciidoc-py/asciidoc-py2

a2x outputs badly formed XML

kszafran opened this issue · 1 comments

When using this asciidoc file as input (truncated to a minimal example):

= This does not work...

[tag]#*# [tag]#*#

I get an error trying to generate a PDF file through the DocBook toolchain:

$ a2x -fpdf buggy.adoc
a2x: ERROR: "xmllint" --nonet --noout --valid "/Users/kszafran/asciidoctor-bug/buggy.xml" returned non-zero exit status 1

If you take look at the intermediary DocBook XML you can see it's not well formed (phrase and emphasis elements are intertwined):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<?asciidoc-toc?>
<?asciidoc-numbered?>

<article lang="en">
<articleinfo>
    <title>This does not work&#8230;</title>
</articleinfo>
<simpara><phrase role="tag"><emphasis role="strong"></phrase> <phrase role="tag"></emphasis></phrase></simpara>
</article>

I'm using a2x 8.6.9.