%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@ page import=" java.io.UnsupportedEncodingException, java.io.PrintStream, java.io.InputStream, java.io.ByteArrayOutputStream, java.io.File, org.apache.commons.fileupload.servlet.ServletFileUpload, org.apache.commons.fileupload.FileItemIterator, org.apache.commons.fileupload.FileItemStream, org.apache.commons.fileupload.util.Streams, org.odftoolkit.odfvalidator.ODFValidator, org.odftoolkit.odfvalidator.Logger, org.odftoolkit.odfvalidator.Configuration, org.odftoolkit.odfvalidator.OdfValidatorMode, org.odftoolkit.odfvalidator.ValidationMessageCollectorErrorFilter, org.odftoolkit.odfvalidator.OdfVersion" %> <% int loggingSelection = 0; int modeSelection = 0; if(ServletFileUpload.isMultipartContent(request)) { %>
The document is " + odfValidatorMode.toString()+ " ODF" + validator.getOdfVersion() + "!"); } else { out.println("
The document is NOT " + odfValidatorMode.toString()+ " ODF" + validator.getOdfVersion() + "!"); } String s = null; try { s = new String(bout.toByteArray(), "UTF-8"); s = s.replaceAll("&", "&"); s = s.replaceAll("<", "<"); s = s.replaceAll(">", ">"); s = s.replaceAll("<span class='info'>", ""); s = s.replaceAll("<span class='warning'>", ""); s = s.replaceAll("<span class='error'>", ""); s = s.replaceAll("<span class='fatalError'>", ""); s = s.replaceAll("<span class='filePath'>", ""); s = s.replaceAll("<span class='messageType'>", ""); } catch (UnsupportedEncodingException use) { out.println(use); } if(s != null && (s.length() > 0)) { out.println(" "); s = s.replaceAll("</span>", "
This service checks conformance of ODF documents based on their OpenDocument Format specification. It does not cover all conformance criteria, yet (see implementation details).
<% } %>