code: public XmlSchema emitXsd(final List < CobolDataItem > cobolDataItems, final String targetNamespace) {
          if (_log.isDebugEnabled()) {
              _log.debug("5. Emitting XML Schema from model: {}",
                      cobolDataItems.toString());
          }
          XmlSchema xsd = createXmlSchema(getConfig().getXsdEncoding(), targetNamespace);
          List < String > nonUniqueCobolNames = getNonUniqueCobolNames(cobolDataItems);
          XsdEmitter emitter = new XsdEmitter(xsd, getConfig());
          for (CobolDataItem cobolDataItem : cobolDataItems) {
              if (getConfig().ignoreOrphanPrimitiveElements()
                      && cobolDataItem.getChildren().size() == 0) {
                  continue;
              }
              XsdDataItem xsdDataItem = new XsdDataItem(cobolDataItem,
                      getConfig(), null, 0, nonUniqueCobolNames, _errorHandler);
              // Create and add a root element
              xsd.getItems().add(emitter.createXmlSchemaElement(xsdDataItem));
          }
          return xsd;
      }
docs: Generate an XML Schema using a model of COBOL data items. The model is a
  list of root level items. From these, we only process group items
  (structures) with children.
  
  @param cobolDataItems a list of COBOL data items
  @param targetNamespace the target namespace to use (null for no namespace)
  @return the XML schema