Examples of XmlFileResult


Examples of org.openqreg.reader.XmlFileResult

        if (schemaIs == null) {
          schemaUrl = new URL(schema);
          schemaIs = schemaUrl.openStream();
        }

        XmlFileResult result = xmlReader.readFile(is, con, schemaIs);
        Document errorDoc = null;
        if (result.hasErrors()) {
          // errorDoc = styleDocument(result.getErrorDoc(),
          // pageContext.getServletContext()
          // .getResourceAsStream("xmlError.xsl"));
          answer = "File import failed 2";
        } else {
          if(reLoad) {
            LanguageHandler.getInstance().load(con, false);
          }
          if (xmlReader instanceof XmlTextReader
              || xmlReader instanceof XliffReader) {
            answer = "File imported OK. " + result.getResult()
                + " texts inserted.";
          } else {
            answer = "File with variables imported OK. "
                + result.getResult()
                + " top level containers imported.";
            // Repopulate the systemholder
            if(reLoad) {
              Dispatcher.getInstance().populateSystemHolder();
            }
View Full Code Here

Examples of org.openqreg.reader.XmlFileResult

        if(schemaIs == null){
          schemaUrl = new URL(schema);
          schemaIs = schemaUrl.openStream();
        }
 
        XmlFileResult result = xmlReader.validateFile(is, schemaIs);
        Document errorDoc = null;
        if (! result.hasErrors()) {
          message = "File is OK";
         } else {
           errorDoc = styleDocument(result.getErrorDoc(),
               pageContext.getServletContext().getResourceAsStream("/xmlError.xsl"));
         }
        pageContext.setAttribute("errorMessage",
            errorDoc == null ? null : errorDoc.getRootElement());
      } catch(MalformedURLException murle){
View Full Code Here

Examples of org.openqreg.reader.XmlFileResult

        if(schemaIs == null){
          schemaUrl = new URL(schema);
          schemaIs = schemaUrl.openStream();
        }

        XmlFileResult result = xmlReader.readFile(is, con, schemaIs);
        Document errorDoc = null;
        if (result.hasErrors()) {
           errorDoc = styleDocument(result.getErrorDoc(),
               pageContext.getServletContext().getResourceAsStream("xmlError.xsl"));
        } else {
          lang.load(con, false);
          if (xmlReader instanceof XmlTextReader || xmlReader instanceof XliffReader) {
            message = "File imported OK. " + result.getResult() + " texts inserted.";
          } else {
            message = "File with variables imported OK. " + result.getResult() + " pages imported.";
            //Repopulate the systemholder
            disp.populateSystemHolder();
          }
        }
        pageContext.setAttribute("errorMessage",
View Full Code Here

Examples of org.openqreg.reader.XmlFileResult

        if (schemaIs == null) {
          schemaUrl = new URL(schema);
          schemaIs = schemaUrl.openStream();
        }

        XmlFileResult result = xmlReader.readFile(is, con, schemaIs);
        Document errorDoc = null;
        if (result.hasErrors()) {
          errorDoc = styleDocument(result.getErrorDoc(), pageContext
              .getServletContext().getResourceAsStream(
                  "xmlError.xsl"));
        } else {
//          lang.load(con, false);
          if (xmlReader instanceof XmlTextReader) {
            message = "File imported OK. " + result.getResult()
                + " texts inserted.";
          } else {
            message = "File with variables imported OK. "
                + result.getResult() + " pages imported.";
            // Make sure the variables are re-read next time a page
            // is accessed
//            disp.clearSystemHolders();
          }
        }
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.