// attached meta data and not the concrete element data
Node node = nodes.item(0);
// Look for meta data. The query returns null in case no XSD
// can be found.
ModelQuery modelQuery = ModelQueryUtil.getModelQuery(document);
if (modelQuery != null) {
// Get the element declaration from the model query.
CMElementDeclaration result = modelQuery
.getCMElementDeclaration((Element) node);
// If the XSD is not found this check will fail.
if (result instanceof XSDElementDeclarationAdapter) {
XSDElementDeclarationImpl elementDeclaration = (XSDElementDeclarationImpl) ((XSDElementDeclarationAdapter) result)