ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
65 stars 38 forks source link

Different handling of empty or whitespace-only artwork for text vs html output #1143

Open jennifer-richards opened 1 month ago

jennifer-richards commented 1 month ago

Describe the issue

In an XML draft with the following

<figure><artwork><![CDATA[
]]></artwork></figure>

running xml2rfc is inconsistent about whether this is allowed. E.g., text output works:

$ xml2rfc --text draft.xml
 Created file draft.txt

but html does not:

$ xml2rfc --html draft.xml
/Users/jennifer/Downloads/draft.xml(470): Error: Expected ascii-art artwork for <artwork type="">, but found b'<artwork xmlns:xi="http://www.w3.org/2001/XInclude" align="left" pn="section-3.1-3">\n </artwork>\n      '...
Not creating output file due to errors (see above)
Unable to complete processing draft.xml

I'm not sure whether this should be allowed or not, but it should be consistent between output formats.

Code of Conduct