code: public File translate(final File cobolFile, final String cobolFileEncoding,
              final File target, final String targetNamespacePrefix,
              final String xsltFileName) throws RecognizerException,
              XsdGenerationException {
  
          try {
              if (_log.isDebugEnabled()) {
                  _log.debug("Translating COBOL file: " + cobolFile);
              }
              checkCobolSourceFile(cobolFile);
              checkTarget(target);
  
              String baseName = FilenameUtils.getBaseName(
                      cobolFile.getAbsolutePath()).toLowerCase();
  
              Reader cobolReader = cobolFileEncoding == null ? new InputStreamReader(
                      new FileInputStream(cobolFile)) : new InputStreamReader(
                      new FileInputStream(cobolFile), cobolFileEncoding);
  
              String xsdString = translate(cobolReader,
                      getUniqueTargetNamespace(targetNamespacePrefix, baseName),
                      xsltFileName);
              File xsdFile = null;
              if (target.isDirectory()) {
                  String xsdFileName = cobolFile.getName() + ".xsd";
                  xsdFile = new File(target, xsdFileName);
              } else {
                  xsdFile = target;
              }
              FileUtils.writeStringToFile(xsdFile, xsdString, getConfig()
                      .getXsdEncoding());
              if (_log.isDebugEnabled()) {
                  _log.debug("Created XML schema file: " + xsdFile);
              }
              return xsdFile;
          } catch (IOException e) {
              throw (new XsdGenerationException(e));
          }
      }
docs: Translates a single COBOL source file.
  <p/>
  When requested the file base name is appended to the target namespace.
  
  @param cobolFile COBOL source file
  @param cobolFileEncoding COBOL source file encoding (null to use platform
  default)
  @param target target file or folder
  @param targetNamespacePrefix used as a prefix prepended to the cobol file
  base name to form a unique target namespace for the generated
  XML schema
  @param xsltFileName an optional xslt to apply on the XML Schema
  @return the XML Schema
  @throws RecognizerException if parser fails
  @throws XsdGenerationException if COBOL model interpretation fails