As noted earlier, we must at some point have a human-typed mapping of XML attribute names to names that we store in the database, and this is it. The models do at least enforce the presence of each attribute in the unit key, which is useful. We could move this logic into the model itself, but I'm not convinced that the model should require knowledge of the XML representation.