- Preconditions.checkArgument(schema.getQName().equals(child.getNodeType()),
- "Incompatible node type, should be: %s, is: %s", schema.getQName(), child.getNodeType());
+ DataValidationException.checkLegalChild(schema.getQName().equals(child.getNodeType()), child.getIdentifier(),
+ schema, Collections.singleton(schema.getQName()));