With #197 nested meta elements get parsed and serialized, but they still aren't getting returned by get_metadata(), leaving traversal of the R object hierarchy "by hand" the only way to get at them. (Using "nexml/meta" for the level to get the "meta for meta" actually fails, for example, because not all meta elements have nested meta elements.)
This change returns the nested meta elements as well. This requires a number of changes because that meta can be nested within meta is unique to the NeXML structure (there is no other element that can be nested within itself), and the code, especially in managing ID and IDREF columns, had been assuming that an element and one nested within it are never of the same type.
Includes a test, although arguably there should be more extensive testing of this. Also updates the get_metadata() manpage to explain the additional columns being returned (for ID and IDREF to allow a self-join).
@hlapp Nice work, I was wondering about this when writing the previous unit test. great fix. This looks good to me, so go ahead and merge in when ready
With #197 nested meta elements get parsed and serialized, but they still aren't getting returned by
get_metadata()
, leaving traversal of the R object hierarchy "by hand" the only way to get at them. (Using"nexml/meta"
for the level to get the "meta for meta" actually fails, for example, because not all meta elements have nested meta elements.)This change returns the nested meta elements as well. This requires a number of changes because that meta can be nested within meta is unique to the NeXML structure (there is no other element that can be nested within itself), and the code, especially in managing ID and IDREF columns, had been assuming that an element and one nested within it are never of the same type.
Includes a test, although arguably there should be more extensive testing of this. Also updates the
get_metadata()
manpage to explain the additional columns being returned (for ID and IDREF to allow a self-join).