Closed amoeba closed 4 years ago
Hey @cboettig it occurs to me that you might have intended this behavior. I see that calling as_xml
like emld::as_xml(emld, outpath, "dat", "dataset")
makes this do the correct thing. A change here would require the emld
object keeping track of whether it's an EML doc or for a submodule which it seems not to right now.
@amoeba right, the serializing routines were never written to support generating things in the submodule namespaces alone (dat
), since I'm not clear that there's any use case for that and seems confusing to users. Or at least that was my thinking at the time, so I'm happy to close this unless anyone feels like we ought to be handling generation of submodules as root?
Closing is fine. This sounds out of scope for emld.
Closing as I haven't seen any comments and I agree with @cboettig now that we've talked it out.
Round-tripping EML (e.g.,
<eml:eml...
) docs works correctly but doesn't for documents with elements from submodules at their root (e.g.,<dataset:dataset...
). I think the reason this doesn't break the round-tripping tests is that they don't check to this fine a level of detail (same QName on root before and after).An example of the correct behavior, exhibited when round-tripping a document with
eml:eml
at the root:An example of the incorrect behavior with a
dat:dataset
element at the root:See how the root elements name changes? I think I what's going on and I think the patch for now is to bring some of my helpers from #53 over into
as_xml.emld
.