Skip to content

JATS XML preformat element dropped and not read #73

@castedo

Description

@castedo

REPO:
With the following article.xml:

<article>
  <front>
    <article-meta>
      <title-group>
        <article-title>preformat element test</article-title>
      </title-group>
    </article-meta>
  </front>
  <body>
    <preformat>I
am           preformatted.</preformat>
  </body>
</article>

run

jats convert --frontmatter page article.xml

RESULT:
Error msg: ⛔️ article.xml Unhandled JATS conversion for node of "preformat"
and output article.myst.json:

{
  "mdast": {
    "type": "root",
    "children": [
      {
        "type": "block",
        "data": {},
        "children": []
      }
    ]
  },
  "frontmatter": {
    "title": "preformat element test",
    "abbreviations": {}
  }
}

EXPECTED:
No error and the "I am preformatted" text to appear inside the mdast json.

COMMENT:
<preformat> is a valid JATS XML for authoring element. It's also the JATS XML element that is output by pandoc when using triple tick and no language specifier. Pandoc will output JATS XML <code> only if a language is specified with triple tick. Regardless of pandoc, preformat appears in plenty of PMC JATS XML files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions