Package com.adobe.epubcheck.xml

Examples of com.adobe.epubcheck.xml.XMLParser.process()


      for (XMLValidator validator : validators)
      {
        opsParser.addValidator(validator);
      }

      opsParser.process();
    }
    finally
    {
      try
      {
View Full Code Here


      overlayHandler = new OverlayHandler(path, xrefChecker,
          overlayParser, report);
      overlayParser.addValidator(XMLValidators.MO_30_RNC.get());
      overlayParser.addValidator(XMLValidators.MO_30_SCH.get());
      overlayParser.addXMLHandler(overlayHandler);
      overlayParser.process();
    }
    catch (IOException e)
    {
      report.message(MessageId.RSC_001, new MessageLocation(this.ocf.getName(), -1, -1), path);
    }
View Full Code Here

      in = ocf.getInputStream(OCFData.containerEntry);
      parser = new XMLParser(ocf, in, OCFData.containerEntry, "xml", getReport(), version);
      XMLHandler handler = new OCFHandler(parser);
      parser.addXMLHandler(handler);
      parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.containerEntry, version)));
      parser.process();
      try
      {
        if (in != null)
        {
          in.close();
View Full Code Here

        in = ocf.getInputStream(OCFData.encryptionEntry);
        parser = new XMLParser(ocf, in, OCFData.encryptionEntry, "xml", getReport(), version);
        handler = new EncryptionHandler(ocf, parser);
        parser.addXMLHandler(handler);
        parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.encryptionEntry, version)));
        parser.process();
        try
        {
          if (in != null)
          {
            in.close();
View Full Code Here

        in = ocf.getInputStream(OCFData.signatureEntry);
        parser = new XMLParser(ocf, in, OCFData.signatureEntry, "xml", getReport(), version);
        handler = new OCFHandler(parser);
        parser.addXMLHandler(handler);
        parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.signatureEntry, version)));
        parser.process();
        try
        {
          in.close();
        }
        catch (Exception ignored)
View Full Code Here

            "application/x-dtbook+xml", report, version);
        dtbookParser.addValidator(XMLValidators.DTBOOK_RNG.get());
        DTBookHandler dtbookHandler = new DTBookHandler(dtbookParser, path,
            xrefChecker);
        dtbookParser.addXMLHandler(dtbookHandler);
        dtbookParser.process();
      }
      catch (IOException e)
      {
        throw new RuntimeException(e);
      }
View Full Code Here

          properties, xrefChecker, navParser, report, version, pubTypes);
      navParser.addXMLHandler(navHandler);
      navParser.addValidator(XMLValidators.NAV_30_RNC.get());
      navParser.addValidator(XMLValidators.XHTML_30_SCH.get());
      navParser.addValidator(XMLValidators.NAV_30_SCH.get());
      navParser.process();
    }
    catch (IOException e)
    {
      report.message(MessageId.PKG_008, new MessageLocation(path, -1, -1), path);
    }
View Full Code Here

      ncxParser = new XMLParser(ocf, in, path, "application/x-dtbncx+xml", report, version);
      ncxParser.addValidator(XMLValidators.NCX_RNG.get());
      ncxHandler = new NCXHandler(ncxParser, path, xrefChecker);
      ncxParser.addXMLHandler(ncxHandler);
      ncxParser.process();
       
        if (ocf.getUniqueIdentifier() != null && !ocf.getUniqueIdentifier().equals(ncxHandler.getUid()))
        {
          report.message(MessageId.NCX_003,
              new MessageLocation(path, ncxParser.getLineNumber(), ncxParser.getColumnNumber(), String.format("%1$s: %2$s", ncxHandler.getUid(), ocf.getUniqueIdentifier())));
View Full Code Here

      if (in != null)
      {
        ncxParser = new XMLParser(ocf, in, path, "application/x-dtbncx+xml", report, version);
        ncxParser.addValidator(XMLValidators.NCX_SCH.get());
        ncxParser.process();
        try
        {
          in.close();
        }
        catch (IOException ignored)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.