code: public XmlSchemaElement createXmlSchemaElement(final XsdDataItem xsdDataItem) {
  
          // Let call add root elements if he needs to so for now pretend this is
          // not a root element
          XmlSchemaElement element = new XmlSchemaElement(getXsd(), false);
          element.setName(xsdDataItem.getXsdElementName());
          if (xsdDataItem.getMaxOccurs() != 1) {
              element.setMaxOccurs(xsdDataItem.getMaxOccurs());
          }
          if (xsdDataItem.getMinOccurs() != 1) {
              element.setMinOccurs(xsdDataItem.getMinOccurs());
          }
  
          /*
           * Create this element schema type, then if its a simple type set it as
           * an anonymous type. Otherwise, it is a named complex type, so
           * reference it by name.
           */
          XmlSchemaType xmlSchemaType = createXmlSchemaType(xsdDataItem);
          if (xmlSchemaType == null) {
              return null;
          }
          if (xmlSchemaType instanceof XmlSchemaSimpleType) {
              element.setSchemaType(xmlSchemaType);
          } else {
              element.setSchemaTypeName(xmlSchemaType.getQName());
          }
          if (getConfig().addLegStarAnnotations()) {
              element.setAnnotation(_annotationEmitter
                      .createLegStarAnnotation(xsdDataItem));
          }
          return element;
      }
docs: Create an XML Schema element from a COBOL data item.
  
  @param xsdDataItem COBOL data item decorated with XSD attributes
  @return the XML schema element