AbstractStructuredType ast = instanciateStructured(tm, tt, descriptor.getLocalPart(), first.getNamespaceURI());
ast.setNamespace(descriptor.getNamespaceURI());
ast.setPrefix(descriptor.getPrefix());
PropertiesDescription pm;
if (tt.isStructured())
{
pm = tm.getStructuredPropMapping(tt);
}
else
{
pm = tm.getDefinedDescriptionByNamespace(first.getNamespaceURI());
}
for (Element element : elements)
{
String prefix = element.getPrefix();
String name = element.getLocalName();
String namespace = element.getNamespaceURI();
PropertyType type = pm.getPropertyType(name);
if (type == null)
{
// not defined
throw new XmpParsingException(ErrorType.NoType, "Type '" + name + "' not defined in "
+ element.getNamespaceURI());