mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

ex.xml(37): Error: Did not expect element postal there #149

Closed cameronelliott closed 2 years ago

cameronelliott commented 2 years ago

To help us debug your issue please add these details.

What went wrong?

I built a very minimal .md from the fantastic documentation. (These docs are inspiring me to do much better on my projects!)

I wanted to see if I could use a block, as I want to include non-IETF references (OASIS MQTT).

So I threw a the exact block in from the docs. Interestingly, mmark adds a element from the example, when going from .md -> .xml

xml2rfc --v2 and --v3 fail to process example build from docs, including the empty

I get this error from xml2rfc: ex.xml(37): Error: Did not expect element postal there

What version of mmark are you using?

mmark 2.2.17 xml2rfc 3.11.1

What is the most minimal markdown snippets that shows the problem?

%%%
Title = "Mmark Document"
area = "Internet"
workgroup = "Network Working Group"

[seriesInfo]
name = "Internet-Draft"
value = "draft-gieben-00"
stream = "IETF"
status = "informational"

date = 2018-08-21T00:00:00Z

[[author]]
initials="R."
surname="Gieben"
fullname="R. (Miek) Gieben"
%%%

.# Abstract

This is a small test document.

{mainmatter}

# First Section

Hi! *from* Mmark.

example ref [@pandoc]

{backmatter}

<reference anchor='pandoc' target='http://johnmacfarlane.net/pandoc/'>
    <front>
        <title>Pandoc, a universal document converter</title>
        <author initials='J.' surname='MacFarlane' fullname='John MacFarlane'>
            <organization>University of California, Berkeley</organization>
            <address>
                <email>jgm@berkeley.edu</email>
                <uri>http://johnmacfarlane.net/</uri>
            </address>
        </author>
        <date year='2006'/>
    </front>
</reference>
cameronelliott commented 2 years ago

I removed the <address> element, and that seemed to fix the issue, but maybe worth updating the mmark docs to a better <reference> example? I'm not sure. I suspect the version of the <reference> XML in the mmark docs doesn't conform to the version of the <reference> XML handled by xml2rfc

cameronelliott commented 2 years ago

Thanks you guys!