incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1172466 [16/16] - in /incubator/odf/trunk/validator: ./ misc/ nbproject/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/odftoolkit/ src/main/java/org/odftoolkit/odfvalidator/ src/main/resources/ src/main/resources/META-INF/ ...
Date Mon, 19 Sep 2011 05:43:28 GMT
Added: incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/odf.htm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/odf.htm?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/odf.htm (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/odf.htm Mon Sep 19 05:43:23 2011
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Open Document Format for Office Applications (OpenDocument) Version 1.2</title>
+<link href="http://docs.oasis-open.org/templates/css/OASIS_Specification_Template_v1-0.css" rel="stylesheet" type="text/css">
+<style type="text/css" media="all">
+<!--
+  div.resource {
+    clear: both;
+  }
+  div.resource ul {
+    list-style: none;
+  }
+  div.resource dt {
+	padding-bottom: 0;
+  }
+  div.resource dd {
+    position: relative;
+    top: -16px;
+    left: 5em;
+  }
+  div.resource {
+    padding-bottom: 0;
+    padding-left: 1em;
+  }
+  div.resource {
+	display: block;
+	border-width: 2;
+	border-style: groove;
+	padding-bottom: 2em;
+	background-color: #FFFFDD;
+  }
+  div#content {
+	margin: 5em;
+	margin-top: 0;
+  }
+  
+-->
+</style>
+</head>
+<body>
+<p><a href="http://www.oasis-open.org"><img src="http://docs.oasis-open.org/templates/OASISLogo.jpg" alt="OASIS logo" width="203" height="54" border="0"></a></p>
+<p class="subtitle">OpenDocument Metadata Manifest Ontology</p>
+<p class="normal">10 May 2011</p>
+      <p class="subtitle">Introduction</p>
+      <p class="normal">This document describes version 1.2 of the <a href="http://docs.oasis-open.org/ns/office/1.2/meta/odf#">OpenDocument Metadata Manifest Ontology</a> namespace. It also contains a directory of links to related resources.</p>
+
+      <p class="subtitle">Namespace URI Versioning Policy</p>
+      <p class="normal">It is the intent of the OASIS OpenDocument Technical Committee that the OpenDocument Package Metadata Manifest Ontology namespace URI will not change arbitrarily with each subsequent revision of the corresponding WSDL or XML Schema documents but rather change only when a subsequent revision, published in conjunction with a Committee Draft, results in non-backwardly compatible changes from a previously published Committee Draft.</p>
+
+      <p class="normal">Under this policy, the following are examples of backwards compatible changes that would not result in assignment of a new namespace URI:
+      </p>
+  <ul>
+          <li class="normal">addition of new global element, attribute, complexType and simpleType definitions</li>
+          <li class="normal">addition of new operations within a WSDL portType or binding (along with the corresponding schema, message and part definitions)</li>
+          <li class="normal">addition of new elements or attributes in locations covered by a previously specified wildcard</li>
+          <li class="normal">modifications to the pattern facet of a type definition for which the value-space of the previous definition remains valid or for which the value-space of the preponderance of instance would remain valid</li>
+          <li class="normal">modifications to the cardinality of elements for which the value-space of possible instance documents conformant to the previous revision of the schema would still be valid with regards to the revised cardinality rule</li>
+</ul>
+      <p class="subtitle">Related Resources for OpenDocument Package Metadata Manifest Ontology</p>
+      <p class="titlepageinfo">Normative Reference:</p>
+      <div class="resource">
+          <p class="titlepageinfo">
+<a href="http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.odt">Open Document Format for Office Applications (OpenDocument) Version 1.2</a> (<a href="http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part1.odt">Part 1: OpenDocument Schema</a>)</p>
+          <p class="titlepageinfo">Title:</p>
+		  <p class="titlepageinfodescription">Open Document Format for Office Applications (OpenDocument) Version 1.2 (Part 1: OpenDocument Schema)</p>
+    <p class="titlepageinfo">Stage:</p> 
+            <p class="titlepageinfodescription">Candidate OASIS Standard 01</p>
+		            <p class="titlepageinfo">Date:</p>
+            <p class="titlepageinfodescription">10 May 2011</p>
+           <p class="titlepageinfo">This version:</p>
+             <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.odt">http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.odt</a></p>
+          <p class="titlepageinfo">Previous version:</p>
+            <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt">http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt</a></p>
+          <p class="titlepageinfo">Technical Committee</p>
+		    <p class="titlepageinfodescription"><a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office">OASIS Open Document Format for Office Applications (OpenDocument) TC</a></p>
+          <p class="titlepageinfo">Chairs:</p>
+            <p class="titlepageinfodescription">Rob Weir, IBM</p>
+            <p class="titlepageinfodescription">Michael Brauer, Oracle Corporation</p>
+          <p class="titlepageinfo">Editors:</p>
+            <p class="titlepageinfodescription">Patrick Durusau &lt;<a href="mailto:patrick@durusau.net">patrick@durusau.net</a>&gt;</p>
+            <p class="titlepageinfodescription">Michael Brauer, Oracle Corporation &lt;<a href="mailto:michael.brauer@sun.com">michael.brauer@sun.com</a>&gt;</p>
+          <p class="titlepageinfo">Additional Formats:</p>
+          <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.html">HTML</a></p>
+          <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.pdf">PDF</a></p>
+          <p class="titlepageinfo">Comments list:</p>
+            <p class="titlepageinfodescription"><a href="http://www.oasis-open.org/committees/comments/form.php?wg_abbrev=office">Submit comments</a></p>
+          <p class="titlepageinfo">Comments Archive:</p>
+            <p class="titlepageinfodescription"><a href="http://lists.oasis-open.org/archives/office-comment/">http://lists.oasis-open.org/archives/office-comment/</a></p>
+          <p>
+            <!-- End of .oasis-metadata -->
+        </p>
+      </div>
+
+      <h3><span class="titlepageinfo">OWL Ontology:</span></h3>
+      <div class="resource">
+        <p class="titlepageinfo"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-metadata.owl">OpenDocument Metadata Manifest Ontology</a>
+          <!-- End of .oasis-metadata -->
+      </p>
+      </div>
+      <!--
+      <p class="titlepageinfo">Related Namespaces </p>
+      <p class="relatedwork"><a href="http://docs.oasis-open.org/relatednamespaces">[list related namespaces and include hyperlinks]</a></p>
+      -->
+</body>
+</html>

Added: incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/pkg.htm
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/pkg.htm?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/pkg.htm (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/odf1.2/pkg.htm Mon Sep 19 05:43:23 2011
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Open Document Format for Office Applications (OpenDocument) Version 1.2</title>
+<link href="http://docs.oasis-open.org/templates/css/OASIS_Specification_Template_v1-0.css" rel="stylesheet" type="text/css">
+<style type="text/css" media="all">
+<!--
+  div.resource {
+    clear: both;
+  }
+  div.resource ul {
+    list-style: none;
+  }
+  div.resource dt {
+	padding-bottom: 0;
+  }
+  div.resource dd {
+    position: relative;
+    top: -16px;
+    left: 5em;
+  }
+  div.resource {
+    padding-bottom: 0;
+    padding-left: 1em;
+  }
+  div.resource {
+	display: block;
+	border-width: 2;
+	border-style: groove;
+	padding-bottom: 2em;
+	background-color: #FFFFDD;
+  }
+  div#content {
+	margin: 5em;
+	margin-top: 0;
+  }
+  
+-->
+</style>
+</head>
+<body>
+<p><a href="http://www.oasis-open.org"><img src="http://docs.oasis-open.org/templates/OASISLogo.jpg" alt="OASIS logo" width="203" height="54" border="0"></a></p>
+<p class="subtitle">OpenDocument Package Metadata Manifest Ontology</p>
+<p class="normal">10 May 2011</p>
+      <p class="subtitle">Introduction</p>
+      <p class="normal">This document describes version 1.2 of the <a href="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#">OpenDocument Package Metadata Manifest Ontology</a> namespace. It also contains a directory of links to related resources.</p>
+
+      <p class="subtitle">Namespace URI Versioning Policy</p>
+      <p class="normal">It is the intent of the OASIS OpenDocument Technical Committee that the OpenDocument Package Metadata Manifest Ontology namespace URI will not change arbitrarily with each subsequent revision of the corresponding WSDL or XML Schema documents but rather change only when a subsequent revision, published in conjunction with a Committee Draft, results in non-backwardly compatible changes from a previously published Committee Draft.</p>
+
+      <p class="normal">Under this policy, the following are examples of backwards compatible changes that would not result in assignment of a new namespace URI:
+      </p>
+  <ul>
+          <li class="normal">addition of new global element, attribute, complexType and simpleType definitions</li>
+          <li class="normal">addition of new operations within a WSDL portType or binding (along with the corresponding schema, message and part definitions)</li>
+          <li class="normal">addition of new elements or attributes in locations covered by a previously specified wildcard</li>
+          <li class="normal">modifications to the pattern facet of a type definition for which the value-space of the previous definition remains valid or for which the value-space of the preponderance of instance would remain valid</li>
+          <li class="normal">modifications to the cardinality of elements for which the value-space of possible instance documents conformant to the previous revision of the schema would still be valid with regards to the revised cardinality rule</li>
+</ul>
+      <p class="subtitle">Related Resources for OpenDocument Package Metadata Manifest Ontology</p>
+      <p class="titlepageinfo">Normative Reference:</p>
+      <div class="resource">
+          <p class="titlepageinfo">
+<a href="http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.odt">Open Document Format for Office Applications (OpenDocument) Version 1.2</a> (<a href="http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part3.odt">Part 3: Packages</a>)</p>
+          <p class="titlepageinfo">Title:</p>
+		  <p class="titlepageinfodescription">Open Document Format for Office Applications (OpenDocument) Version 1.2 (Part 3: Packages)</p>
+    <p class="titlepageinfo">Stage:</p> 
+            <p class="titlepageinfodescription">Candidate OASIS Standard 01</p>
+		            <p class="titlepageinfo">Date:</p>
+            <p class="titlepageinfodescription">10 May 2011</p>
+           <p class="titlepageinfo">This version:</p>
+             <p class="titlepageinfodescription"><a 
+href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.odt">http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.odt</a></p>
+          <p class="titlepageinfo">Previous version:</p>
+<p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt">http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt</a></p>
+
+          <p class="titlepageinfo">Technical Committee</p>
+		    <p class="titlepageinfodescription"><a href="http://www.oasis-open.org/committees/office/">OASIS Open Document Format for Office Applications (OpenDocument) TC</a></p>
+          <p class="titlepageinfo">Chairs:</p>
+            <p class="titlepageinfodescription">Rob Weir, IBM</p>
+            <p class="titlepageinfodescription">Michael Brauer, Oracle Corporation</p>
+          <p class="titlepageinfo">Editors:</p>
+            <p class="titlepageinfodescription">Patrick Durusau &lt;<a href="mailto:patrick@durusau.net">patrick@durusau.net</a>&gt;</p>
+            <p class="titlepageinfodescription">Dennis Hamilton &lt;<a href="mailto:dennis.hamilton@acm.org">dennis.hamilton@acm.org</a>&gt;</p>
+            <p class="titlepageinfodescription">Michael Brauer, Oracle Corporation &lt;<a href="mailto:michael.brauer@sun.com">michael.brauer@sun.com</a>&gt;</p>
+          <p class="titlepageinfo">Additional Formats:</p>
+          <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.html">HTML</a></p>
+          <p class="titlepageinfodescription"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01.pdf">PDF</a></p>
+          <p class="titlepageinfo">Comments list:</p>
+            <p class="titlepageinfodescription"><a href="http://www.oasis-open.org/committees/comments/form.php?wg_abbrev=office">Submit comments</a></p>
+          <p class="titlepageinfo">Comments Archive:</p>
+            <p class="titlepageinfodescription"><a href="http://lists.oasis-open.org/archives/office-comment/">http://lists.oasis-open.org/archives/office-comment/</a></p>
+          <p>
+            <!-- End of .oasis-metadata -->
+        </p>
+      </div>
+
+      <h3><span class="titlepageinfo">OWL Ontology:</span></h3>
+      <div class="resource">
+        <p class="titlepageinfo"><a href="http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-package-metadata.owl">OpenDocument Package Metadata Manifest Ontology</a>
+          <!-- End of .oasis-metadata -->
+      </p>
+      </div>
+      <!--
+      <p class="titlepageinfo">Related Namespaces </p>
+      <p class="relatedwork"><a href="http://docs.oasis-open.org/relatednamespaces">[list related namespaces and include hyperlinks]</a></p>
+      -->
+</body>
+</html>

Added: incubator/odf/trunk/validator/src/main/resources/schema/odf1_0.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/odf1_0.properties?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/odf1_0.properties (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/odf1_0.properties Mon Sep 19 05:43:23 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+<properties>
+<entry key="manifest-schema">/schema/odf1.0/OpenDocument-manifest-schema-v1.0-os.rng</entry>
+<entry key="schema">/schema/odf1.0/OpenDocument-schema-v1.0-os.rng</entry>
+<entry key="strict-schema">/schema/odf1.0/OpenDocument-strict-schema-v1.0-os.rng</entry>
+<entry key="mathml-schema">/schema/mathml1.01/math.dtd</entry>
+<entry key="filter"/>
+</properties>
+

Added: incubator/odf/trunk/validator/src/main/resources/schema/odf1_1.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/odf1_1.properties?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/odf1_1.properties (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/odf1_1.properties Mon Sep 19 05:43:23 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+<properties>
+<entry key="manifest-schema">/schema/odf1.1/OpenDocument-manifest-schema-v1.1.rng</entry>
+<entry key="strict-schema">/schema/odf1.1/OpenDocument-strict-schema-v1.1.rng</entry>
+<entry key="schema">/schema/odf1.1/OpenDocument-schema-v1.1.rng</entry>
+<entry key="mathml-schema">/schema/mathml1.01/math.dtd</entry>
+<entry key="mathml2-schema"/>
+<entry key="dsig-schema"/>
+<entry key="path1"/>
+<entry key="filter"/>
+</properties>
+

Added: incubator/odf/trunk/validator/src/main/resources/schema/odf1_2.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/odf1_2.properties?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/odf1_2.properties (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/odf1_2.properties Mon Sep 19 05:43:23 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+<properties>
+<entry key="manifest-schema">/schema/odf1.2/OpenDocument-v1.2-cos01-manifest-schema.rng</entry>
+<entry key="strict-schema"></entry>
+<entry key="schema">/schema/odf1.2/OpenDocument-v1.2-cos01-schema.rng</entry>
+<entry key="mathml-schema"></entry>
+<entry key="mathml2-schema">/schema/mathml2.0/mathml2.xsd</entry>
+<entry key="dsig-schema">/schema/odf1.2/OpenDocument-v1.2-cos01-dsig-schema.rng</entry>
+<entry key="path1"/>
+<entry key="filter"/>
+</properties>
+

Added: incubator/odf/trunk/validator/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/META-INF/context.xml?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/META-INF/context.xml (added)
+++ incubator/odf/trunk/validator/src/main/webapp/META-INF/context.xml Mon Sep 19 05:43:23 2011
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/odfvalidator"/>

Added: incubator/odf/trunk/validator/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/WEB-INF/web.xml?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/odf/trunk/validator/src/main/webapp/WEB-INF/web.xml Mon Sep 19 05:43:23 2011
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
+	<!-- display name -->
+	<display-name>ODF Validator Application</display-name>	
+	<!-- some needed application values, change if needed -->
+    <context-param>
+		<!-- application title, shown in the header of the application -->
+        <param-name>APPLICATION_TITLE</param-name>
+        <param-value>ODF Validator 1.2</param-value>
+    </context-param>
+    <context-param>
+		<!-- name for setting-storing, used in the settings database -->
+        <param-name>PROPERTY_APPLICATION_NAME</param-name>
+        <param-value>odfvalidator</param-value>
+    </context-param>
+    <context-param>
+		<!-- email of the developer, used when exceptions are thrown. Get them by email, like a stacktrace -->
+        <param-name>DEVELOPER_EMAIL</param-name>
+        <param-value>odf-dev AT incubator.apache.org</param-value>
+    </context-param>
+    <context-param>
+		<!-- email of the application owner, shown in the top right corner for the user -->
+        <param-name>CONTACT_EMAIL</param-name>
+        <param-value>odf-dev AT incubator.apache.org</param-value>
+    </context-param>
+    <context-param>
+		<!-- the icon of the donator of this service, used in the footer  -->
+        <param-name>SUPPORTER_ICON_URL</param-name>
+        <param-value>http://opendocsociety.org/organisation/logo/png/opendocsociety_logo_normal_color-on-trans-200x42/;download</param-value>
+    </context-param>    
+    <context-param>
+		<!-- the site of the donator of this service, used in the footer on the their icon -->
+        <param-name>SUPPORTER_URL</param-name>
+        <param-value>http://www.opendocsociety.org/</param-value>
+    </context-param>        
+    <context-param>
+		<!-- the name of the donator of this service, used as tool tip on their icon -->
+        <param-name>SUPPORTER_TITLE</param-name>
+        <param-value>OpenDoc Society</param-value>
+    </context-param>    
+    <context-param>
+		<!-- the favicon of the donator of this service, used as icon on browser tab and left of URL -->
+        <param-name>SUPPORTER_FAVICON_URL</param-name>
+        <param-value>http://www.opendocsociety.org/favicon/;download</param-value>
+    </context-param>            
+	<servlet>
+	  <servlet-name>InfoPage</servlet-name>
+	  <jsp-file>/jsp/info/index.jsp</jsp-file>
+	</servlet>
+	<servlet-mapping>
+	  <servlet-name>InfoPage</servlet-name>
+	  <url-pattern>/info.html</url-pattern>
+	</servlet-mapping>	
+	<!-- welcome file list -->
+    <welcome-file-list>        
+        <welcome-file>/jsp/index.jsp</welcome-file>
+    </welcome-file-list>
+</web-app>
\ No newline at end of file

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/common/footer.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/common/footer.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/common/footer.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/common/footer.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,42 @@
+<%--
+  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.
+--%>
+<jsp:directive.page contentType="text/html" />
+<%
+	String _supporterTitle = getServletContext().getInitParameter( "SUPPORTER_TITLE" );
+	if ( null == _supporterTitle ) {
+		_supporterTitle = "OpenDoc Society";
+	}
+	String _supporterURL = getServletContext().getInitParameter( "SUPPORTER_URL" );
+	if ( null == _supporterURL) {
+		_supporterURL = "http://opendocsociety.org/";
+	}
+	String _supporterIconURL = getServletContext().getInitParameter( "SUPPORTER_ICON_URL" );
+	if ( null == _supporterIconURL ) {
+		_supporterIconURL = "http://opendocsociety.org/organisation/logo/png/opendocsociety_logo_normal_color-on-trans-200x42/;download";
+	}
+%>
+<div id="footer">
+	<div id="supporter-logo" style="float:left">
+		<p><a href="<% out.println( _supporterURL ); %>">
+				<img title="Sponsored by <% out.println( _supporterTitle ); %>" alt="<% out.println( _supporterTitle ); %>" src="<% out.println( _supporterIconURL ); %> " />
+			</a></p>
+	</div>
+	<div id="smallprint">
+		<p style="text-align:left">This service does not cover all conformance criteria of the OpenDocument Format specification. It is not applicable for formal validation proof. Problems reported by this service only indicate that a document may not conform to the specification. It must not be concluded from errors that are reported that the document does not conform to the specification without further investigation of the error report, and it must not be concluded from the absence of error reports that the OpenDocument Format document conforms to the OpenDocument Format specification.
+			By any use of this Website, you agree to be bound by these <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Policies and Terms of Use</a>.</p>
+	</div>
+</div>

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/common/header.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/common/header.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/common/header.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/common/header.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,164 @@
+<%--
+  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.
+--%>
+<jsp:directive.page contentType="text/html" />
+<%
+	String appName = getServletContext().getInitParameter( "APPLICATION_TITLE" );
+	if ( null == appName ) {
+		appName = "ODFToolkit";
+	}
+	String favIconURL = getServletContext().getInitParameter( "SUPPORTER_FAVICON_URL" );
+	if ( null == favIconURL ) {
+		favIconURL = "http://www.opendocsociety.org/favicon/;download";
+	}
+%>
+<head>
+	<title><% out.println( appName ); %></title>
+	<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
+	<meta name="keywords" content="OpenDocument ODF Validator ODFToolkit ODFValidator"/>
+	<meta name="description" content="ODFToolkit"/>
+	<!-- Icon -->
+	<link type="image/x-icon" href="<% out.println( favIconURL ); %>" rel="shortcut icon"/>
+	<style type="text/css" media="screen, projection"><!--
+		div#footer {
+			font-family: Verdana, Arial, Helvetica, sans-serif;
+			font-size: x-small;
+		}
+		#footer {
+			margin: 1em 12px 1.5em 10px;
+			padding-top: 1em;
+		}
+		#footer a:link, #footer a:visited {
+			color: #0033CC;
+			text-decoration: underline;
+		}
+		#footer a:hover, #footer a:active {
+			color: #698ed1;
+			text-decoration: none;
+		}
+		img {
+			border: none;
+		}
+
+		#footer {
+			float: left;
+			display: block;
+			margin: 0px;
+			padding: 0px;
+			width: 100%;
+			margin-top: -1px;
+			color: #777;
+			border-top: solid 1px #ddd;
+			background-image: none;
+		}
+		#footer .horizontalmenu {
+			padding-top: 10px;
+			font-size: 1.2em;
+		}
+		#footer li {
+			display: inline;
+			/* spacing between the links */
+			padding: 0em 1em;
+		}
+		#sponsor {
+			float: left;
+			margin:.5em;
+			margin-bottom: 20px;
+		}
+		#logo div img { float: left; padding: 0px 0 40px 15px; }
+
+		p.selection {
+			font-weight: bold;
+		}
+
+		div.validationResult {
+			line-height: 150%; font-size: 1.2em; font-family: Arial, helvetica, sans-serif;
+		}
+
+		p.valid {
+			background-color: lime;font-size: 2em; padding: 0.5cm;font-weight: bold;
+		}
+
+		p.invalid {
+			background-color: red;font-size: 2em; padding: 0.5cm;font-weight: bold;
+		}
+
+		span.info {
+			font-size: 1.1em;
+		}
+
+		span.info > span.messageType, span.info > span.filePath {
+
+		}	
+
+		span.warning > span.messageType, span.warning > span.filePath {
+			background-color: #ffA500;
+		}
+
+		span.error > span.messageType, span.fatalError > span.messageType, span.error > span.filePath, span.fatalError > span.filePath {
+			background-color: red;
+		}		
+
+		span.messageType {
+			font-weight: bold;
+		}	
+
+		p.selection {
+			font-weight: bold;
+		}
+
+
+		#footer p {
+			margin-top: 1px;
+			color: #555;
+		}
+
+		select {
+			width: 8.3cm;
+		}
+
+		h1 {
+			font-size: 2em;
+		}
+
+		h3 {
+			font-size: 1.6em;
+		}
+
+		h1, h2 {
+			border-bottom-width: 1px;
+			border-bottom-style: solid;
+			border-bottom-color: rgb(170,170,170);
+			font-weight: normal;
+		}
+
+		h1, h2, h3, h4, h5, h6 {
+			margin-bottom: 0.6em;
+			padding-bottom: 0.2em;
+			padding-top: 0.6em;
+			font-family: Arial, helvetica, sans-serif;
+		}
+		.contentpart {
+			font-family: Arial, helvetica, sans-serif;
+			line-height: 1.2em;
+			margin-top: 0.4em;
+			margin-bottom: 0.6em;
+			font-size: 0.8em;
+		}
+
+		-->
+	</style>
+</head>

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/common/supporter.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/common/supporter.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/common/supporter.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/common/supporter.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,29 @@
+<%--
+  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.
+--%>
+<%
+	String supporterTitle = getServletContext().getInitParameter( "SUPPORTER_TITLE" );
+	if ( null == supporterTitle ) {
+		supporterTitle = "OpenDoc Society";
+	}
+	String supporterURL = getServletContext().getInitParameter( "SUPPORTER_URL" );
+	if ( null == supporterURL) {
+		supporterURL = "http://opendocsociety.org/";
+	}
+%>
+<p style="float:left; font-weight:bold;">This service is provided to you by <a href="<% out.println( supporterURL ); %>"><% out.println( supporterTitle ); %></a></p>
+
+

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/index.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/index.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/index.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/index.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,31 @@
+<%--
+  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 language="Java" %>
+<%@page contentType="text/html" %>
+<!DOCTYPE html SYSTEM 'about:legacy-compat'>
+<html>
+	<jsp:include page="common/header.jsp"/>
+	<body>	
+		<div class="contentpart" id="spotlight">
+			<div style="margin: 15px">
+				<jsp:include page="validate.jsp"/>
+				<jsp:include page="common/supporter.jsp"/>
+			</div>
+		</div>
+		<jsp:include page="common/footer.jsp"/>
+	</body>
+</html>

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/info/index.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/info/index.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/info/index.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/info/index.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,31 @@
+<%--
+  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 language="Java" %>
+<%@page contentType="text/html" %>
+<!DOCTYPE html SYSTEM 'about:legacy-compat'>
+<html>
+	<jsp:directive.include file="../common/header.jsp" />
+	<body>
+		<div class="contentpart" id="spotlight">
+			<div style="margin: 15px">
+				<jsp:directive.include file="info.jsp"/>
+				<jsp:directive.include file="../common/supporter.jsp"/>
+			</div>
+		</div>
+		<jsp:directive.include file="../common/footer.jsp"/>
+	</body>
+</html>

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/info/info.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/info/info.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/info/info.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/info/info.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,94 @@
+<%--
+  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.
+--%>
+<h1>The ODF Validator</h1>
+<p><br /></p>
+<h2>Options</h2>
+<h3 id="mode">ODF Version</h3>
+<ul>
+	<li><p><span style="font-weight:bold;">autodetect  </span>: Detects the ODF version of the root document from the given ODF package. ODF documents with version 1.2 will be validated against conformance, version 1.0/1.1 against none strict. 
+			In all other choices the document is validated with respect to the selected OpenDocument version regardless of the version information that is included in the file</p></li>
+	<li><p><span style="font-weight:bold;">conformant  </span>: Checks the basic requirements conforming OpenDocument documents must meet.
+			This modes considers the version of the checked documents. This means that for OpenDocument v1.2 documents (or if OpenDocument v1.2 has been selected) the
+			conformance definitions of the OpenDocument v1.2 specification are taken as basis, while those of the OpenDocument v1.1/v1.0 specification are taken as basis
+			for OpenDocument v1.1/v1.0 documents. Please note that not all provisions for conforming documents are checked.</p></li>
+	<li><p><span style="font-weight:bold;">extended conformance test</span>: For OpenDocument v1.2 documents (or if OpenDocument v1.2 has been selected), the basic requirements of extended conforming ODF documents are checked.
+			For OpenDocument v1.0/v1.1 documents (or if OpenDocument v1.0/v1.1 has been selected) this mode equals the <span style="font-weight:bold;">conformance test</span> mode.</p></li>
+	<li><p><span style="font-weight:bold;">validation</span>: For OpenDocument v1.1/v1.0 documents (or if OpenDocument v1.1/v1.0 has been selected) the selected document is validated in regard of the OpenDocument v1.1/v1.0 schema.
+			For OpenDocument v1.2 documents (or if OpenDocument v1.2 has been selected) this mode equals the <span style="font-weight:bold;">conformance test</span> mode.</p></li>
+	<li><p><span style="font-weight:bold;">strict validation</span>: For OpenDocument v1.1/v1.0 documents (or if OpenDocument v1.1/v1.0 has been selected) the selected document is validated in regard of the strict OpenDocument v1.1/v1.0 schema.
+			For OpenDocument v1.2 documents (or if OpenDocument v1.2 has been selected) this mode equals the <span style="font-weight:bold;">conformance test</span> mode.</p></li>
+</ul>
+<p>For OpenDocument v1.1/v1.0 documents, the <span style="font-weight:bold;">validation</span> and <span style="font-weight:bold;">strict validation</span> tests are more restrictive than a conformance test. Please note that this means that errors may be reported for documents that are actually conforming to the ODF specification.</p>
+<p>The <span style="font-weight:bold;">strict validation test</span> is recommended for developers that want to make sure that an OpenDocument v1.0/v1.1 document does not only validate in regards to the ODF schema, but also does not use any extensions. The recommended mode
+	for OpenDocument v1.2 documents is <span style="font-weight:bold;">conformance test</span>.</p>
+<p>The following items are checked by the validation service:</p>
+<ul>
+	<li><p>OpenDocument v1.2 documents</p>
+		<ul>
+			<li><p>If the test type is <span style="font-weight:bold;">conformance test</span>, and if the file is not a formula file, then the sub files <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are  validated with respect to the OpenDocument v1.2 schema.</p></li>
+			<li><p>If the test type is <span style="font-weight:bold;">extended conformance test</span>, and if the file is not a formula file, then the sub files <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are pre-processed as described in section 1.4.2.1 of the OpenDocument v1.2 specification (that is <i>foreign elements and attributes</i> are removed), and are then validated with respect to the OpenDocument v1.2 schema.</p></li>
+		</ul>
+	</li>
+	<li><p>OpenDocument v1.1/1.0 documents</p>
+		<ul>
+			<li><p>If the test type is <span style="font-weight:bold;">conformance test</span>, and if the file is not a formula file, then the sub files <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are pre-processed as described in section 1.5 of the <a href="http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt">OpenDocument specification</a> (that is <i>foreign elements and attributes</i> are removed), and are then validated with respect to the schema of the selected OpenDocument version.</p></li>
+			<li><p>If the test type is <span style="font-weight:bold;">validation</span>, and if the file is not a formula file, then the sub files <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are validated with respect to the schema of the selected OpenDocument version. Pre-processing of <i>foreign elements and attributes</i> is not applied.</p></li>
+			<li><p>If the test type is <span style="font-weight:bold;">strict validation</span>, and if the file is not a formula file, then the sub files <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are validated with respect to the strict schema of the selected OpenDocument version. Pre-processing of <i>foreign elements and attributes</i> is not applied.</p></li>
+		</ul>
+	</li>
+	<li><p>All versions</p>
+		<ul>
+			<li><p>If the file is a formula file, then the sub file <i>content.xml</i> is validated with respect to the MathML 2.0 W3C XSD schema.  The sub files <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are checked as described for other document types.</p></li>
+			<li><p>The file <i>META-INF/manifest.xml</i> is validated with respect to the manifest schema of the selected ODF specification.</p></li>
+			<li><p>If the file is an ODF 1.2 file, then the <i>META-INF/documentsignatures.xml</i> and <i>META-INF/macrosignatures.xml</i> sub files are validated with respect to the digital signatures schema of the ODF 1.2 specification.</p></li>
+			<li><p>For all embedded objects in ODF format, the <i>content.xml</i>, <i>styles.xml</i>, <i>meta.xml</i> and <i>settings.xml</i> are validated as described for the main document above</p></li>
+			<li><p>It is checked whether the file itself ans all embedded objects in ODF format contain at least a <i>content.xml</i> or <i>styles.xml</i> sub file.</p></li>
+		</ul>
+	</li>
+</ul>
+<h3 id="logging">Logging</h3>
+<ul>
+	<li><span style="font-weight:bold;">verbose  </span>: Gives out all kind of messages.</li>
+	<li><span style="font-weight:bold;">only warnings and errors</span>: Logs all error and warning without info messages.</li>
+	<li><span style="font-weight:bold;">only errors</span>: Logs only error messages.</li>
+</ul>
+<h2 id="details">Implementation Details</h2>
+<p>This services is based on the <a href="http://incubator.apache.org/odftoolkit/conformance/ODFValidator.html">Apache ODF Validator</a> and Sun's <a href="https://msv.dev.java.net/">Multi-Schema XML Validator (MSV)</a> is used for all validation tasks.
+<p>The following actions take place before or during the validation:</p>
+<ul>
+	<li><p>A DTD document declaration within a <i>manifest.xml</i> file is ignored. For the logging level <span style="font-weight:bold;">verbose</span>, an information is displayed if this happens<br/><br/>
+			<span style="font-weight:bold;">Note:</span> Very early ODF implementations in OpenOffice.org wrongly included a document type declaration. Ignoring the document type enables the validation of the manifest despite of this error.
+		</p></li>
+	<li><p>A namespace &quot;http://openoffice.org/2001/manifest&quot; within a <i>manifest.xml</i> file is changed to &quot;urn:oasis:names:tc:opendocument:xmlns:manifest:1.0&quot;. For the logging level <span style="font-weight:bold;">verbose</span>, an information is displayed if this happens.<br/><br/>
+			<span style="font-weight:bold;">Note:</span> Early ODF implementations in OpenOffice.org used the wrong namespace. Changing it to the correct one enables the validation of the manifest despite the wrong namespace.</p></li>
+	<li><p>Namespaces defined in the <a href="http://www.oasis-open.org/committees/download.php/10765/office-spec-1.0-cd-2.pdf">ODF v1.0 Committee Draft 2</a> are replaced with those of the <a href="http://www.oasis-open.org/specs/index.php#opendocumentv1.0">ODF v1.0 OASIS Standard</a>. For the logging level <span style="font-weight:bold;">verbose</span>, an information is displayed if this happens.<br/><br/>
+			<span style="font-weight:bold;">Note:</span> Changing the namespaces enables the validation of documents that conform to the ODF v1.0 CD2. Such documents have been saved by OpenOffice.org 1.0 beta versions.</p></li>
+	<li><p>The value of <i>draw:points</i> attributes is truncated to 2048 characters. For the logging level <span style="font-weight:bold;">verbose</span>, an information is displayed if this happens.<br/><br/>
+			<span style="font-weight:bold;">Note:</span> The truncation of this attribute value avoids a stack overflow in MSV while validating the attribute value against a regular expression.</p></li>
+	<li><p>A namespace &quot;http://openoffice.org/2004/database&quot; within a <i>content.xml</i> file is changed to &quot;urn:oasis:names:tc:opendocument:xmlns:database:1.0&quot;, and a namespace &quot;http://openoffice.org/2004/office&quot; within a <i>content.xml</i> file is changed to &quot;urn:oasis:names:tc:opendocument:xmlns:office:1.0&quot;. For the logging level <span style="font-weight:bold;">verbose</span>, an information is displayed if this happens.<br><br>
+			<span style="font-weight:bold;">Note:</span> These namespaces were used in OpenOffice.org 2.x database documents, because database documents are included in OpenDocument since version 1.2 only. Changing them enables the validation of  OpenOffice.org 2.x database documents.</p></li>
+</ul>
+
+<p>The following schemas are being used:</p>
+<ul>
+	<li><p>MathML: The MathML2.0 Schema from <a href="http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd">http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd</a> is used for validation.<br/><br/>
+			<span style="font-weight:bold;">Note:</span> OpenOffice.org currently wrongly exports namespace prefixes for attributes. The validator reports this as an error.</p></li>
+	<li><p>OpenDocument <a href="http://relaxng.org/">RELAX NG</a> Schemas: The schemas used are those available on the <a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office#technical">OASIS OpenDocument Technical Committee web page</a><!--, except that <q>&lt;ref name=&quot;string&quot;&gt;</q> is replaced with <q>&lt;text/&gt;</q> when it defines the content model of an element. Reason is that the former leads to (wrong) validation errors within <a href="https://msv.dev.java.net/">MSV</a>-->.</p></li>
+</ul>
+
+<p><br /><input type="button" value="Back" onClick="history.go(-1)" /><br /><br /></p>
+

Added: incubator/odf/trunk/validator/src/main/webapp/jsp/validate.jsp
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/webapp/jsp/validate.jsp?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/webapp/jsp/validate.jsp (added)
+++ incubator/odf/trunk/validator/src/main/webapp/jsp/validate.jsp Mon Sep 19 05:43:23 2011
@@ -0,0 +1,183 @@
+<%--
+  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)) {
+%><h1>ODF Validator Result Page</h1><%
+	ServletFileUpload upload = new ServletFileUpload();
+	FileItemIterator iter = upload.getItemIterator(request);
+	ODFValidator validator = null;
+	boolean result = false;
+	while (iter.hasNext()) {
+		FileItemStream item = iter.next();
+		InputStream stream = item.openStream();
+		/* The file item contains a simple name-value pair of a form field */
+		if(item.isFormField()) {
+			if("loggingSelection".equals(item.getFieldName())) {
+				loggingSelection = Integer.parseInt(Streams.asString(stream));
+			} else if("modeSelection".equals(item.getFieldName())) {
+				modeSelection = Integer.parseInt(Streams.asString(stream));
+			}
+		} else {
+			/* The file item contains an uploaded file */
+			if((stream != null) && (item.getName() != null) && (!item.getName().equals(""))) {
+				Logger.LogLevel aLogLevel = null;
+				switch (loggingSelection) {
+					case 2:
+						aLogLevel = Logger.LogLevel.ERROR;
+						break;
+					case 1:
+						aLogLevel = Logger.LogLevel.WARNING;
+						break;
+					default:
+						aLogLevel = Logger.LogLevel.INFO;
+						break;
+				}
+				OdfVersion aOdfVersion = null;
+				OdfValidatorMode odfValidatorMode = null;
+				switch (modeSelection) {
+					case 6:
+						aOdfVersion = OdfVersion.V1_0;
+						odfValidatorMode = OdfValidatorMode.VALIDATE;
+						break;
+					case 4:
+						aOdfVersion = OdfVersion.V1_1;
+						odfValidatorMode = OdfValidatorMode.VALIDATE;
+						break;
+					case 5:
+						aOdfVersion = OdfVersion.V1_0;
+						odfValidatorMode = OdfValidatorMode.VALIDATE_STRICT;
+						break;
+					case 3:
+						aOdfVersion = OdfVersion.V1_1;
+						odfValidatorMode = OdfValidatorMode.VALIDATE_STRICT;
+						break;
+					case 2:
+						odfValidatorMode = OdfValidatorMode.EXTENDED_CONFORMANCE;
+						aOdfVersion = OdfVersion.V1_2;
+						break;
+					case 1:
+						aOdfVersion = OdfVersion.V1_2;
+					default:
+						odfValidatorMode = OdfValidatorMode.CONFORMANCE;
+						break;
+				}				
+				validator = new ODFValidator(null, aLogLevel, true, aOdfVersion, true);				
+				ByteArrayOutputStream bout = null;
+				if(validator != null) {
+					out.println("<h2>Result for " + item.getName() + "</h2>");
+					bout = new ByteArrayOutputStream();
+					PrintStream pout = new PrintStream(bout, true, "UTF-8");
+					ValidationMessageCollectorErrorFilter filter = new ValidationMessageCollectorErrorFilter();
+					try {
+						result = !validator.validateStream(pout, stream, item.getName() , odfValidatorMode, filter);
+					} catch (Exception e) {
+						e.printStackTrace(pout);
+						result = false;
+					}
+				}				
+				if(result) {
+					out.println("<p class='valid'>The document is " + odfValidatorMode.toString()+ " ODF" + validator.getOdfVersion() + "!");
+				} else {
+					out.println("<p class='invalid'>The document is NOT " + odfValidatorMode.toString()+ " ODF" + validator.getOdfVersion() + "!");
+				}
+				String s = null;
+				try {
+					s = new String(bout.toByteArray(), "UTF-8");
+					s = s.replaceAll("&", "&amp;");
+					s = s.replaceAll("<", "&lt;");
+					s = s.replaceAll(">", "&gt;");
+					s = s.replaceAll("&lt;span class='info'&gt;", "<span class='info'>");
+					s = s.replaceAll("&lt;span class='warning'&gt;", "<span class='warning'>");
+					s = s.replaceAll("&lt;span class='error'&gt;", "<span class='error'>");
+					s = s.replaceAll("&lt;span class='fatalError'&gt;", "<span class='fatalError'>");
+					s = s.replaceAll("&lt;span class='filePath'&gt;", "<span class='filePath'>");
+					s = s.replaceAll("&lt;span class='messageType'&gt;", "<span class='messageType'>");					
+					s = s.replaceAll("&lt;/span&gt;&lt;/br&gt;", "</span></br>");				
+					s = s.replaceAll("&lt;/span&gt;", "</span>");
+				} catch (UnsupportedEncodingException use) {
+					out.println(use);
+				}
+				if(s != null && (s.length() > 0)) {					
+					out.println("</p><h3>Details:<br/></h3><div class='validationResult'>" + s + "</div>");
+				} else {
+					out.println("</p>");
+				}
+			}
+		}
+	}
+%><p><br/><input type="button" value="Back" onClick="history.go(-1)" /></p><%
+} else {
+	%><h1>ODF Validator</h1><p>This service checks conformance of ODF documents based on their OpenDocument Format specification. It does not cover all conformance criteria, yet (see <a href="info.html#details">implementation details</a>).</p>
+<form id="validationForm" action="<% out.println(request.getRequestURI()); %>" enctype="multipart/form-data" method="post">
+	<p class="selection"><a href="info.html">ODF Version</a>:<br/>
+		<select name="modeSelection" size="1" onChange="javascript: return setconfig();">
+			<option value="0" selected="">auto-detect</option>
+			<option value="1">OASIS ODF 1.2 (conforming)</option>
+			<option value="2">OASIS ODF 1.2 (extended conforming)</option>
+			<option value="3">OASIS ODF 1.1 (strict)</option>
+			<option value="4">OASIS ODF 1.1</option>
+			<option value="5">OASIS ODF 1.0 - ISO/IEC 26300 (strict)</option>
+			<option value="6">OASIS ODF 1.0 - ISO/IEC 26300</option>
+		</select>
+		<br/>
+	</p>
+	<p class="selection"><a href="info.html#logging">Logging</a>:
+		<br/><select name="loggingSelection" size="1">
+			<option value="0" selected="">verbose</option>
+			<option value="1">only warnings and errors</option>
+			<option value="2">only errors</option>
+		</select>
+		<br/>
+		<br/>
+		Choose ODF documents for validation:		
+		<br/>
+		<!-- HTML 5 Draft 20110914 does not allow maxlength attribute at input element:
+			maxlength="100000" -->
+		<input name="File" multiple="multiple" type="file" />
+		<br/>
+		<br/>
+		<br/>
+		<!-- HTML 5 Draft 20110914 does not allow alt attribute at input element:
+			alt="Press button to upload your documents and get them validated." -->
+		<input type="submit" value="Validate"  />
+		<!-- HTML 5 Draft 20110914 does not allow alt attribute at input element:
+			alt="To reset this formular press this button." -->		
+		<input type="reset"  value="Reset"  />
+	</p>
+</form>
+<%
+}
+%>

Added: incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/InvalidPackageTest.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/InvalidPackageTest.java?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/InvalidPackageTest.java (added)
+++ incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/InvalidPackageTest.java Mon Sep 19 05:43:23 2011
@@ -0,0 +1,110 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ *
+ * Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * Licensed 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. You can also
+ * obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+ *
+ * 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.
+ *
+ ************************************************************************/
+package org.odftoolkit.odfvalidator;
+
+import junit.framework.Assert;
+import org.junit.Test;
+
+/** Test some invalid packages.
+ */
+public class InvalidPackageTest extends OdfValidatorTestBase {
+
+	@Test
+	public void validatePackage1() {
+		String output = "";
+		try {
+			String name = "testInvalidPkg1.odt";
+			output = doValidation(name, null);
+		} catch (Throwable t) {
+			t.printStackTrace();
+			Assert.fail(t.toString());
+		}
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Error: The file 'mimetype' is not the first file in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Error: The file 'mimetype' shall not be compressed"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Error: There shall be no extra field for the 'mimetype' file"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/META-INF/manifest.xml:  Error: The file 'Configurations2/accelerator/current.xml' shall not be listed in the 'META-INF/manifest.xml' file as it does not exist in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt:  Info: 7 errors, 10 warnings"));
+	}
+
+	@Test
+	public void validatePackage1_V1_1() {
+		String output = "";
+		try {
+			String name = "testInvalidPkg1.odt";
+			output = doValidation(name, OdfVersion.V1_1);
+		} catch (Throwable t) {
+			t.printStackTrace();
+			Assert.fail(t.toString());
+		}
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Warning: The file 'mimetype' is not the first file in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Error: The file 'mimetype' shall not be compressed"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/mimetype:  Error: There shall be no extra field for the 'mimetype' file"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt/META-INF/manifest.xml:  Error: The file 'Configurations2/accelerator/current.xml' shall not be listed in the 'META-INF/manifest.xml' file as it does not exist in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg1.odt:  Info: 10 errors, 11 warnings"));
+	}
+
+	@Test
+	public void validatePackage2() {
+		String output = "";
+		try {
+			String name = "testInvalidPkg2.odt";
+			output = doValidation(name, null);
+		} catch (Throwable t) {
+			t.printStackTrace();
+			Assert.fail(t.toString());
+		}
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/mimetype:  Error: The ODF package 'testInvalidPkg2.odt' contains no 'mimetype' file"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/META-INF/manifest.xml:  Error: The file 'Configurations2/accelerator/current.xml' shall not be listed in the 'META-INF/manifest.xml' file as it does not exist in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/META-INF/manifest.xml:  Error: The file 'not_in_manifest' shall be listed in the 'META-INF/manifest.xml' file as it exists in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt:  Info: 5 errors, 10 warnings"));
+	}
+
+	@Test
+	public void validatePackage2_V1_1() {
+		String output = "";
+		try {
+			String name = "testInvalidPkg2.odt";
+			output = doValidation(name, OdfVersion.V1_1);
+		} catch (Throwable t) {
+			t.printStackTrace();
+			Assert.fail(t.toString());
+		}
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/mimetype:  Warning: The ODF package 'testInvalidPkg2.odt' contains no 'mimetype' file"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/META-INF/manifest.xml:  Error: The file 'Configurations2/accelerator/current.xml' shall not be listed in the 'META-INF/manifest.xml' file as it does not exist in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt/META-INF/manifest.xml:  Warning: The file 'not_in_manifest' shall be listed in the 'META-INF/manifest.xml' file as it exists in the ODF package"));
+		Assert.assertTrue(output.contains("testInvalidPkg2.odt:  Info: 7 errors, 12 warnings"));
+	}
+
+	@Test
+	public void validatePackage3() {
+		String output = "";
+		try {
+			String name = "testInvalidPkg3.odt";
+			output = doValidation(name, null);
+		} catch (Throwable t) {
+			t.printStackTrace();
+			Assert.fail(t.toString());
+		}
+		Assert.assertTrue(output.contains("Error: The ODF package 'testInvalidPkg3.odt' shall contain the 'META-INF/manifest.xml' file"));
+		Assert.assertTrue(output.contains("testInvalidPkg3.odt:  Info: 3 errors, no warnings"));
+	}
+}

Added: incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/OdfValidatorTestBase.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/OdfValidatorTestBase.java?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/OdfValidatorTestBase.java (added)
+++ incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/OdfValidatorTestBase.java Mon Sep 19 05:43:23 2011
@@ -0,0 +1,62 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ *
+ * Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * Licensed 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. You can also
+ * obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package org.odftoolkit.odfvalidator;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.PrintStream;
+import org.junit.Ignore;
+
+@Ignore
+public class OdfValidatorTestBase {
+
+    public OdfValidatorTestBase() {
+    }
+
+    String doValidation(String aFileName, OdfVersion aVersion) throws Exception {
+        ODFValidator aValidator = new ODFValidator(null, Logger.LogLevel.INFO, aVersion, true);
+        ByteArrayOutputStream aOut = new ByteArrayOutputStream();
+        PrintStream aPOut = new PrintStream(aOut);
+        InputStream aIn = getClass().getClassLoader().getResourceAsStream(aFileName);
+        aValidator.validateStream(aPOut, aIn, aFileName, OdfValidatorMode.VALIDATE, null);
+        return aOut.toString();
+    }
+
+    String doValidation(String aFileName, OdfVersion aVersion, OdfValidatorMode odfValidatorMode) throws Exception {
+        return doValidation(aFileName, aVersion, odfValidatorMode, false);				
+	}		
+	
+    String doValidation(String aFileName, OdfVersion aVersion, OdfValidatorMode odfValidatorMode, boolean htmlOutput) throws Exception {
+        ODFValidator aValidator = new ODFValidator(null, Logger.LogLevel.INFO, htmlOutput, aVersion, true);
+        ByteArrayOutputStream aOut = new ByteArrayOutputStream();
+        PrintStream aPOut = new PrintStream(aOut);
+        InputStream aIn = getClass().getClassLoader().getResourceAsStream(aFileName);
+		ValidationMessageCollectorErrorFilter filter = new ValidationMessageCollectorErrorFilter();
+		try {
+			aValidator.validateStream(aPOut, aIn, aFileName, odfValidatorMode, filter);
+		} catch (Exception e) {
+			e.printStackTrace(aPOut);			
+		}
+        return aOut.toString();							
+	}				
+}

Added: incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/ValidTest.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/ValidTest.java?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/ValidTest.java (added)
+++ incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/ValidTest.java Mon Sep 19 05:43:23 2011
@@ -0,0 +1,88 @@
+/************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+ *
+ * Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * Licensed 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. You can also
+ * obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package org.odftoolkit.odfvalidator;
+
+import junit.framework.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/** Test some invalid packages.
+ */
+public class ValidTest extends OdfValidatorTestBase {
+
+    @Test
+    public void validate1() {
+        String output = "";
+        try {
+            String name = "empty.odt";
+            output = doValidation(name, OdfVersion.V1_0, OdfValidatorMode.VALIDATE_STRICT, true);						
+        } catch (Throwable t) {
+            t.printStackTrace();
+            Assert.fail(t.toString());
+        }
+		if(output.contains("Exception")){
+			System.out.println("OUTPUT:" + output);
+			Assert.fail("An exception occured during validation!");
+		}
+        Assert.assertTrue(output.contains("<span "));
+    }
+	
+    @Test
+	@Ignore
+    public void validate2() {
+        String output = "";
+        try {
+            String name = "testValid1.odt";
+            output = doValidation(name, null);
+        } catch (Throwable t) {
+            t.printStackTrace();
+            Assert.fail(t.toString());
+        }
+		if(output.contains("Exception")){
+			System.out.println("OUTPUT:" + output);
+			Assert.fail("An exception occured during validation!");
+		}		
+        Assert.assertTrue(output.contains("testValid1.odt:Info:no errors, no warnings"));
+    }	
+
+   @Test
+   @Ignore
+    public void validate3() {
+        String output = "";
+        try {
+            String name = "empty.odt";
+            output = doValidation(name, OdfVersion.V1_0, OdfValidatorMode.VALIDATE_STRICT);				
+			output = doValidation(name, OdfVersion.V1_1, OdfValidatorMode.VALIDATE);
+			output = doValidation(name, OdfVersion.V1_2, null);			
+        } catch (Throwable t) {
+            t.printStackTrace();
+            Assert.fail(t.toString());
+        }
+		if(output.contains("Exception")){
+			System.out.println("OUTPUT:" + output);
+			Assert.fail("An exception occured during validation!");
+		}
+        //Assert.assertTrue(output.contains("dummy.odt:Info:no errors, no warnings"));
+    }	
+	
+}

Added: incubator/odf/trunk/validator/src/test/resources/config_template.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/config_template.properties?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/resources/config_template.properties (added)
+++ incubator/odf/trunk/validator/src/test/resources/config_template.properties Mon Sep 19 05:43:23 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+<properties>
+<entry key="manifest-schema"/>
+<entry key="strict-schema"/>
+<entry key="schema"/>
+<entry key="mathml-schema"/>
+<entry key="mathml2-schema"/>
+<entry key="dsig-schema"/>
+<entry key="path1"/>
+<entry key="filter"/>
+</properties>
+

Added: incubator/odf/trunk/validator/src/test/resources/empty.odt
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/empty.odt?rev=1172466&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/odf/trunk/validator/src/test/resources/empty.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/odf/trunk/validator/src/test/resources/extract-schema.xsl
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/extract-schema.xsl?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/resources/extract-schema.xsl (added)
+++ incubator/odf/trunk/validator/src/test/resources/extract-schema.xsl Mon Sep 19 05:43:23 2011
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2011 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+
+<!-- This stylesheet extracts the ODF schemas from the ODF v1.0 and v1.1 -->
+<!-- specification.                                                      -->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
+                xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+                xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0">
+    
+    <xsl:output method="text"/>
+    
+    <!-- Supported mode parameter values are: -->
+    <!-- 'schema': Extracts the schema -->
+    <!-- 'strict-schema': Extracts the strict schema defined in appendix A -->
+    <!-- 'manifest-schema': Extracts the manifest schema -->
+    <xsl:param name="mode" select="'schema'"/>
+       
+    <!-- map mode parameter to style names -->
+    <!-- which paragraph styles do we wish to extract? -->
+    <xsl:variable name="extract-style-name">
+        <xsl:choose>
+            <xsl:when test="$mode='strict-schema'">
+                <xsl:value-of select="'RelaxNG_20_Strict'"/>
+            </xsl:when>
+            <xsl:when test="$mode='manifest-schema'">
+                <xsl:value-of select="'RelaxNG_20_Manifest'"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="'RelaxNG'"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:variable>
+
+    <!-- define 'styles' key. It selects all style:style element with a certain name -->
+    <xsl:key name="styles"
+             match="style:style"
+             use="@style:name" />
+
+    <!-- Look only at paragraphs -->
+    <xsl:template match="office:document-content">
+        <xsl:apply-templates select="office:body/office:text//text:p"/>
+    </xsl:template>
+
+    <!-- Analyze paragraphs -->
+    <xsl:template match="text:p">
+        <!-- determine all parent styles of this paragraph; use key 'parents' -->
+        <xsl:variable name="content-style-names" select="@text:style-name|key('styles',@text:style-name)/@style:parent-style-name"/>
+        <xsl:variable name="styles-style-names">
+            <xsl:for-each select="document('styles.xml',.)">
+                <xsl:value-of select="key('styles',$content-style-names)/@style:parent-style-name"/>
+            </xsl:for-each>
+        </xsl:variable>
+
+        <!-- if schema parent style is found, generate output -->
+        <xsl:if test="$content-style-names = $extract-style-name or $styles-style-names = $extract-style-name">
+            <xsl:apply-templates mode="output"/>
+            <xsl:text>
+</xsl:text>
+        </xsl:if>
+    </xsl:template>
+
+    <!-- default: don't output anything -->
+    <xsl:template match="node()|@*"/>
+
+    <!-- generate output: just copy all text -->
+    <xsl:template mode="output" match="*">
+        <xsl:apply-templates mode="output"/>
+    </xsl:template>
+        
+    <xsl:template mode="output" match="text()">
+        <xsl:copy/>
+    </xsl:template>
+    
+    <!-- white space handling: <text:s>, <text:tab> elements  -->
+    <xsl:template mode="output" match="text:tab">
+        <xsl:text>    </xsl:text>
+    </xsl:template>
+    
+    <xsl:template mode="output" match="text:s">
+        <xsl:call-template name="repeat">
+            <xsl:with-param name="count" select="@text:c"/>
+            <xsl:with-param name="string" select="' '"/>
+        </xsl:call-template>
+    </xsl:template>
+    
+    <xsl:template name="repeat">
+        <xsl:param name="count"/>
+        <xsl:param name="string"/>
+        <xsl:if test="$count > 0">
+            <xsl:value-of select="$string"/>
+            <xsl:call-template name="repeat">
+                <xsl:with-param name="count" select="$count - 1"/>
+                <xsl:with-param name="string" select="$string"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    
+</xsl:stylesheet>
\ No newline at end of file

Added: incubator/odf/trunk/validator/src/test/resources/filter.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/filter.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/test/resources/filter.rng (added)
+++ incubator/odf/trunk/validator/src/test/resources/filter.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
+
+  Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
+
+  Use is subject to license terms.
+
+  Licensed 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. You can also
+  obtain a copy of the License at http://odftoolkit.org/docs/license.txt
+
+  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.
+
+-->
+
+<grammar
+    xmlns="http://relaxng.org/ns/structure/1.0"
+    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+
+    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+    
+    <start>
+        <ref name="filter"/>
+    </start>
+
+    <define name="filter">
+        <element name="filter">
+            <ref name="filter-attlist"/>
+            <oneOrMore>
+                <ref name="filter-entry"/>
+            </oneOrMore>
+        </element>
+    </define>
+    
+    <define name="filter-attlist" combine="interleave">
+        <empty/>
+    </define>
+    
+    <define name="filter-entry">
+        <element name="filter-entry">
+            <ref name="filter-entry-attlist"/>
+            <text/>
+        </element>
+    </define>
+
+    <define name="filter-entry-attlist" combine="interleave">
+        <attribute name="task-id">
+            <data type="string">
+                 <param name="pattern">[a-z]?[0-9]+"</param>
+            </data>
+        </attribute>
+    </define>
+
+    <define name="filter-entry-attlist" combine="interleave">
+        <optional>
+            <attribute name="resolved-in">
+                <data type="integer"/>
+            </attribute>
+        </optional>
+    </define>
+    
+</grammar>
\ No newline at end of file

Added: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg1.odt
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/testInvalidPkg1.odt?rev=1172466&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg1.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg2.odt
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/testInvalidPkg2.odt?rev=1172466&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg2.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg3.odt
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/testInvalidPkg3.odt?rev=1172466&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/odf/trunk/validator/src/test/resources/testInvalidPkg3.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/odf/trunk/validator/src/test/resources/testValid1.odt
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/test/resources/testValid1.odt?rev=1172466&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/odf/trunk/validator/src/test/resources/testValid1.odt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message