User-facing changes:
Rewrote logic around how emld
works with schemaLocation
:
schemaLocation
argument on as_xml
used to fill in a default value that pointed to a local copy of eml.xsd
. Now, it automatically fills in a web-resolvable location to make validating documents easier out of the box.Re-worked the logic for handling schemaLocation
when serializing to XML:
schemaLocation
is present on the emld
object, it is used verbatim (no change in API here) regardless of the schemaLocation
argument of as_xml
.schemaLocation
is absent on the emld
object:
as_xml(..., schemaLocation = TRUE)
causes a value to be guessed.as_xml(..., schemaLocation = FALSE)
explicitly prevents a value from being filled in when serialized.as_xml(..., schemaLocation = "Some value)
explicitly sets the provided value.emld::eml_validate
no longer depends on schemaLocation
to determine the correct XSD to use during schema validation and now uses two helpers (See below) to find the correct schema file. See #52 & #45.
emld::eml_version
now allows specifying the version without the eml-
prefix, like `eml_version(“2.1.1”), and will throw a warning when it gets output that doesn’t ’look right rather than silently failing.
Fixed a bug where the EML 2.1.1 units dictionary was being used for EML 2.2.0 docs which would cause spurious validation errors. See #56.
Developer-facing (non-exported) changes:
find_real_root_name(doc : xml_document) : list(prefix : character, name: character)
which returns the namespace prefix and the local name of the root element on an xml_document
.guess_root_schema(doc : xml_document) : list(module : character, version : character, namespace : character)
which returns the module, schema version, and namespace URI of the root element on an xml_document
.schemaLocation
is now ignored during roundtrip testing because of the new (above) behavior of emld
with respect to schemaLocation
.inst/tests
.Other changes:
references
attributes #48references
. #47TextType
nodes where extra whitespace was being added. #37.eml_validate
’s behavior when validating custom units. #35.NEWS.md
file to track changes to the package.