docs: public I_CmsXmlSchemaType getContentType(Element typeElement, Set<CmsXmlContentDefinition> nestedDefinitions)
      throws CmsXmlException {
  
          if (!CmsXmlContentDefinition.XSD_NODE_ELEMENT.equals(typeElement.getQName())) {
              throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0));
          }
          if (typeElement.elements().size() > 0) {
              throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0));
          }
  
          String elementName = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_NAME);
          String typeName = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_TYPE);
          String defaultValue = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_DEFAULT);
          String maxOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MAX_OCCURS);
          String minOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MIN_OCCURS);
  
          if (CmsStringUtil.isEmpty(elementName)) {
              throw new CmsXmlException(
                  Messages.get().container(
                      Messages.ERR_EL_MISSING_ATTRIBUTE_2,
                      typeElement.getName(),
                      CmsXmlContentDefinition.XSD_ATTRIBUTE_NAME));
          }
          if (CmsStringUtil.isEmpty(typeName)) {
              throw new CmsXmlException(
                  Messages.get().container(
                      Messages.ERR_EL_MISSING_ATTRIBUTE_2,
                      typeElement.getName(),
                      CmsXmlContentDefinition.XSD_ATTRIBUTE_TYPE));
          }
  
          boolean simpleType = true;
          I_CmsXmlSchemaType schemaType = m_registeredTypes.get(typeName);
          if (schemaType == null) {
  
              // the name is not a simple type, try to resolve from the nested schemas
              Iterator<CmsXmlContentDefinition> i = nestedDefinitions.iterator();
              while (i.hasNext()) {
  
                  CmsXmlContentDefinition cd = i.next();
                  if (typeName.equals(cd.getTypeName())) {
  
                      simpleType = false;
                      return new CmsXmlNestedContentDefinition(cd, elementName, minOccrs, maxOccrs);
                  }
              }
  
              if (simpleType) {
                  throw new CmsXmlException(Messages.get().container(Messages.ERR_UNKNOWN_SCHEMA_1, typeName));
              }
          }
  
          if (simpleType && (schemaType != null)) {
              schemaType = schemaType.newInstance(elementName, minOccrs, maxOccrs);
  
              if (CmsStringUtil.isNotEmpty(defaultValue)) {
                  schemaType.setDefault(defaultValue);
              }
          }
  
          return schemaType;
      }