As the title says, if I read in a NeXML file that has polymorphic states and write it back out without further modification, the polymorphic states are gone, turning them essentially into missing values. (Since there the problems with the treatment of polymorphic states found so far would have applied equally to uncertain states, I suspect this will be the case here, too, though I don't hold proof.)
After investigating where this might be happening, it turns out that it is the coercion of the nexml object to an XMLInternalNode object that loses them. Specifically, while <state/> children of the <states/> element get passed on just fine, a <polymorphic_state_set/> child, if present, does not (and I suspect neither would a <uncertain_state_set/>):
The first two <states/> elements should have had included a polymorphic state set. Any idea @cboettig as to what might prevent the <polymorphic_state_set/> element from getting passed on?
As the title says, if I read in a NeXML file that has polymorphic states and write it back out without further modification, the polymorphic states are gone, turning them essentially into missing values. (Since there the problems with the treatment of polymorphic states found so far would have applied equally to uncertain states, I suspect this will be the case here, too, though I don't hold proof.)
After investigating where this might be happening, it turns out that it is the coercion of the
nexml
object to anXMLInternalNode
object that loses them. Specifically, while<state/>
children of the<states/>
element get passed on just fine, a<polymorphic_state_set/>
child, if present, does not (and I suspect neither would a<uncertain_state_set/>
):The first two
<states/>
elements should have had included a polymorphic state set. Any idea @cboettig as to what might prevent the<polymorphic_state_set/>
element from getting passed on?