ropensci / emld

:package: JSON-LD representation of EML
https://docs.ropensci.org/emld
Other
13 stars 6 forks source link

Text type #12

Closed cboettig closed 6 years ago

cboettig commented 6 years ago

Treat contents of section and para elements as literal text strings when parsing to JSON-LD. This means that we get the Docbook-like XML as a literal character string. When serializing back into XML, these strings are serialized as XML (if they start with a XML tag).

Includes a unit test showing this successfully round-trips the eml-text.xml test from the official EML test suite as valid EML without losing any nodes.

This PR also introduces support for modular testing (such as the eml-text.xml, which has a txt:text as the root node, and is just validated against the eml-text schema, not the full schema).