You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2005/10/02 10:02:12 UTC

svn commit: r293080 - in /forrest/trunk: etc/cocoon_upgrade/ lib/core/ main/webapp/ main/webapp/WEB-INF/xconf/ whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/

Author: crossley
Date: Sun Oct  2 01:01:57 2005
New Revision: 293080

URL: http://svn.apache.org/viewcvs?rev=293080&view=rev
Log:
The "validation" block is now official in cocoon trunk.
Replace temporary block with Cocoon 2.2 r293017

Modified:
    forrest/trunk/etc/cocoon_upgrade/build.xml
    forrest/trunk/lib/core/cocoon-validation-block-2.2.0-dev.jar
    forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
    forrest/trunk/main/webapp/sitemap.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap

Modified: forrest/trunk/etc/cocoon_upgrade/build.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/etc/cocoon_upgrade/build.xml?rev=293080&r1=293079&r2=293080&view=diff
==============================================================================
--- forrest/trunk/etc/cocoon_upgrade/build.xml (original)
+++ forrest/trunk/etc/cocoon_upgrade/build.xml Sun Oct  2 01:01:57 2005
@@ -124,8 +124,9 @@
        =============================================================== -->
     <delete>
       <fileset dir="${forrest.home}/lib/core" includes="cocoon-*.jar">
-        <!-- FIXME: this is a temporal block until is official in cocoon-->
-        <exclude name="cocoon-validation-block-2.2.0-dev.jar"/>
+        <!-- exclude any temporary blocks until is official in Cocoon
+        <exclude name="cocoon-foo-block-2.2.0-dev.jar"/>
+        -->
       </fileset>
     </delete>
     <copy todir="${forrest.home}/lib/core">

Modified: forrest/trunk/lib/core/cocoon-validation-block-2.2.0-dev.jar
URL: http://svn.apache.org/viewcvs/forrest/trunk/lib/core/cocoon-validation-block-2.2.0-dev.jar?rev=293080&r1=293079&r2=293080&view=diff
==============================================================================
Binary files - no diff available.

Modified: forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf?rev=293080&r1=293079&r2=293080&view=diff
==============================================================================
--- forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf (original)
+++ forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf Sun Oct  2 01:01:57 2005
@@ -756,6 +756,24 @@
  <cocoon-crawler     logger="core.search.crawler"/>
  <lucene-xml-indexer logger="core.search.lucene"/>
 
+<!-- ========== Components used for profiling ========== -->
  <include src="resource://org/apache/cocoon/components/profiler/profiler.roles"/>
+
+<!-- ========== Components used for xml validation ========== -->
+ <include src="resource://org/apache/cocoon/components/validation/validation.roles"/>
+  <!--+
+      | The shared Validator instance in Cocoon.
+      |
+      | This defaults to an instance of a "CachedValidator". To disable schema
+      | caching add the following attribute to the <validator ... /> element:
+      |
+      |   class="org.apache.cocoon.components.validation.impl.DefaultValidator"
+      +-->
+  <validator logger="core.validation">
+    <schema-parser name="jing" class="org.apache.cocoon.components.validation.jing.JingSchemaParser"/>
+    <schema-parser name="jaxp" class="org.apache.cocoon.components.validation.jaxp.JaxpSchemaParser">
+      <factory-class>org.apache.xerces.jaxp.validation.XMLSchemaFactory</factory-class>
+    </schema-parser>
+  </validator>
 
 </components>

Modified: forrest/trunk/main/webapp/sitemap.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=293080&r1=293079&r2=293080&view=diff
==============================================================================
--- forrest/trunk/main/webapp/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/sitemap.xmap Sun Oct  2 01:01:57 2005
@@ -147,16 +147,40 @@
       src="org.apache.cocoon.transformation.LogTransformer"
       logger="sitemap.transformer.log" pool-max="16"/>
 
-  <map:transformer name="jing"
-      logger="sitemap.transformer.jing"
-      src="org.apache.cocoon.transformation.JingTransformer">
-    <!--+ The enable-caching configuration element is optional
-        | (defaults to true) and defines whether compiled RelaxNG
-        | schemas should be stored in Cocoon's transient cache or not
-        +-->
-    <!-- <enable-caching>true</enable-caching> -->
+  <map:transformer name="validate"
+    logger="sitemap.transformer.validate"
+    src="org.apache.cocoon.transformation.ValidatingTransformer">
+    
+    <!--+ The "grammar" an optional configuration element specifying the default
+          | grammar used by the validator. When the "grammar" element is specified,
+          | the automatic detection of schema types will be disabled.
+          |
+          | This can also be specifed in pipelines as a parameter:
+          |   <map:parameter name="grammar" value="... grammar identifier ..."/>
+          |
+          | For a list of well known grammars, see the JavaDoc documentation for the
+          | org.apache.cocoon.components.validation.Validator interface.
+          +-->
+    <!-- <grammar>... grammar identifier ...</grammar> -->
   </map:transformer>
 
+  <map:transformer name="validation-report"
+    logger="sitemap.transformer.validate"
+    src="org.apache.cocoon.transformation.ValidationReportTransformer">
+    
+    <!--+ The "grammar" an optional configuration element specifying the default
+          | grammar used by the validator. When the "grammar" element is specified,
+          | the automatic detection of schema types will be disabled.
+          |
+          | This can also be specifed in pipelines as a parameter:
+          |   <map:parameter name="grammar" value="... grammar identifier ..."/>
+          |
+          | For a list of well known grammars, see the JavaDoc documentation for the
+          | org.apache.cocoon.components.validation.Validator interface.
+          +-->
+    <!-- <grammar>... grammar identifier ...</grammar> -->
+  </map:transformer>
+  
  </map:transformers>
 
     <map:readers default="resource">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap?rev=293080&r1=293079&r2=293080&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap Sun Oct  2 01:01:57 2005
@@ -237,7 +237,7 @@
         <!-- This is an example of RELAX NG validation.
           Such transformers can go anywhere in the sitemap. -->
         <!--
-        <map:transform type="jing" src="{forrest:context}/resources/schema/relaxng/WD-xhtml2-20050527/xhtml2-forrest.rng" />
+        <map:transform type="validate" src="{forrest:context}/resources/schema/relaxng/WD-xhtml2-20050527/xhtml2-forrest.rng" />
         -->
         <map:transform src="cocoon://getStylesheet.xhtml.{1}">
           <map:parameter name="path" value="{0}"/>
@@ -255,7 +255,7 @@
         <!-- This is an example of RELAX NG validation.
           Such transformers can go anywhere in the sitemap. -->
         <!--
-        <map:transform type="jing" src="{forrest:context}/resources/schema/relaxng/WD-xhtml2-20050527/xhtml2-forrest.rng" />
+        <map:transform type="validate" src="{forrest:context}/resources/schema/relaxng/WD-xhtml2-20050527/xhtml2-forrest.rng" />
         -->
         <map:transform src="cocoon://getStylesheet.xhtml.{1}/{2}">
           <map:parameter name="path" value="{0}"/>