cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r280323 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/validation: conf/ java/org/apache/cocoon/components/validation/ java/org/apache/cocoon/components/validation/impl/ java/org/apache/cocoon/transformation/ samples/
Date Mon, 12 Sep 2005 12:01:51 GMT
Author: pier
Date: Mon Sep 12 05:01:39 2005
New Revision: 280323

URL: http://svn.apache.org/viewcvs?rev=280323&view=rev
Log:
Fixing initial bugs found by Carsten and slight modification of samples (right now it might
be buggy, but it should work)

Removed:
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/jing-transformer.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/transformation/JingTransformer.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/schema-no.xsd
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/schema-ok.xsd
Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xroles
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/SchemaParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/Validator.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/sitemap.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/welcome.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf Mon Sep 12 05:01:39
2005
@@ -17,13 +17,16 @@
 
 <xconf xpath="/cocoon" unless="validator">
 
-  <validator>
-    <schema-parser name="jing" class="org.apache.cocoon.components.validation.impl.JingSchemaParser">
-      <cache-schemas>true</cache-schemas>
-    </schema-parser>
-    <schema-parser name="xerces-schema" class="org.apache.cocoon.components.validation.impl.XercesSchemaParser">
-      <cache-schemas>true</cache-schemas>
-    </schema-parser>
+  <!--+ 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.impl.JingSchemaParser"/>
+    <schema-parser name="xerces-schema" class="org.apache.cocoon.components.validation.impl.XercesSchemaParser"/>
   </validator>
   
 </xconf>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xmap?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xmap Mon Sep 12 05:01:39
2005
@@ -17,22 +17,23 @@
 
 <xmap xmlns:map="http://apache.org/cocoon/sitemap/1.0"
       xpath="/sitemap/components/transformers"
-      unless="transformer[@name='validate-relaxng']">
+      unless="transformer[@name='validate']">
 
-    <map:transformer name="validate-relaxng"
+    <map:transformer name="validate"
                      logger="sitemap.transformer.validate"
                      src="org.apache.cocoon.transformation.ValidatingTransformer">
-      <!--+ The "grammar" is either one of the grammar constants specified
-          | by the org.apache.cocoon.components.validation.Validator class
-          | or the component name with wich the SchemaParser was registered
-          | in "cocoon.xconf" (for example "jing").
+
+      <!--+ 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>http://relaxng.org/ns/structure/0.9</grammar>
+      <!-- <grammar>... grammar identifier ...</grammar> -->
     </map:transformer>
 
-    <map:transformer name="validate-xmlschema"
-                     logger="sitemap.transformer.validate"
-                     src="org.apache.cocoon.transformation.ValidatingTransformer">
-      <grammar>http://www.w3.org/2001/XMLSchema</grammar>
-    </map:transformer>
 </xmap>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xroles
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xroles?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xroles (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xroles Mon Sep 12 05:01:39
2005
@@ -18,6 +18,6 @@
 <xroles xpath="/role-list" unless="role[@name='org.apache.cocoon.components.validation.Validator']">
 
   <role name="org.apache.cocoon.components.validation.Validator" shorthand="validator"
-        default-class="org.apache.cocoon.components.validation.impl.DefaultValidator"/>
+        default-class="org.apache.cocoon.components.validation.impl.CachingValidator"/>
 
 </xroles>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/SchemaParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/SchemaParser.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/SchemaParser.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/SchemaParser.java
Mon Sep 12 05:01:39 2005
@@ -51,7 +51,7 @@
      *                                  of the grammar types returned by the
      *                                  {@link #getSupportedGrammars()} method.  
      */
-    public Schema getSchema(Source source, String grammar)
+    public Schema parseSchema(Source source, String grammar)
     throws SAXException, IOException, IllegalArgumentException;
 
     /**

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/Validator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/Validator.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/Validator.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/Validator.java
Mon Sep 12 05:01:39 2005
@@ -56,7 +56,7 @@
     /** <p>The <a href="http://www.schematron.com/">ISO Schematron</a/>
grammar identifer.</p> */
     public static final String GRAMMAR_ISO_SCHEMATRON = "http://purl.oclc.org/dsdl/schematron";
     /** <p>The <a href="http://www.relaxng.org/">RELAX NG</a/> grammar
identifer.</p> */
-    public static final String GRAMMAR_RELAX_NG = "http://relaxng.org/ns/structure/0.9";
+    public static final String GRAMMAR_RELAX_NG = "http://relaxng.org/ns/structure/1.0";
     /** <p>The <a href="http://www.xml.gr.jp/relax">RELAX Core</a/> grammar
identifer.</p> */
     public static final String GRAMMAR_RELAX_CORE = "http://www.xml.gr.jp/xmlns/relaxCore";
     /** <p>The <a href="http://www.xml.gr.jp/relax">RELAX Namespace</a/>
grammar identifer.</p> */

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java
Mon Sep 12 05:01:39 2005
@@ -18,6 +18,8 @@
 import java.io.IOException;
 
 import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.logger.LogEnabled;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
@@ -56,12 +58,14 @@
  * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
  */
 public abstract class AbstractValidator
-implements Validator, Serviceable, Disposable {
+implements Validator, Serviceable, Disposable, LogEnabled {
 
     /** <p>The configured {@link ServiceManager} instance.</p> */
     protected ServiceManager manager = null;
     /** <p>The configured {@link SourceResolver} instance.</p> */
     protected SourceResolver resolver = null;
+    /** <p>The configured {@link Logger} instance.</p> */
+    protected Logger logger = null;
 
     /**
      * <p>Create a new {@link AbstractValidator} instance.</p>
@@ -71,6 +75,13 @@
     }
 
     /**
+     * <p>Enable logging.</p>
+     */
+    public void enableLogging(Logger logger) {
+        this.logger = logger;
+    }
+
+    /**
      * <p>Specify the {@link ServiceManager} available to this instance.</p>
      */
     public void service(ServiceManager manager)
@@ -390,8 +401,15 @@
      */
     protected Schema getSchema(SchemaParser parser, Source source, String grammar)
     throws IOException, SAXException {
+        if (this.logger.isDebugEnabled()) {
+            String message = "Parsing schema \"" + source.getURI() + "\" using " +
+                             "grammar \"" + grammar + "\" and SourceParser " +
+                             parser.getClass().getName();
+            this.logger.debug(message);
+        }
+
         try {
-            return parser.getSchema(source, grammar);
+            return parser.parseSchema(source, grammar);
         } catch (IllegalArgumentException exception) {
             String message = "Schema parser " + parser.getClass().getName() +
                              " does not support grammar " + grammar;
@@ -410,6 +428,7 @@
      */
     protected String detectGrammar(Source source)
     throws IOException, SAXException, ValidatorException {
+        this.logger.debug("Detecting grammar for \"" + source.getURI() + "\"");
         SAXParser xmlParser = null;
         String grammar = null;
 
@@ -439,6 +458,10 @@
             String message = "Unable to detect grammar for schema at ";
             throw new ValidatorException(message + source.getURI());
         } else {
+            if (this.logger.isDebugEnabled()) {
+                this.logger.debug("Grammar \"" + grammar + "\" detected for " +
+                                  "schema \"" + source.getURI());
+            }
             return grammar;
         }
     }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java
Mon Sep 12 05:01:39 2005
@@ -55,20 +55,18 @@
  *
  * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
  */
-public class DefaultValidator extends AbstractValidator implements LogEnabled,
-ThreadSafe, Contextualizable, Initializable, Disposable, ServiceSelector, Configurable {
+public class DefaultValidator extends AbstractValidator implements ServiceSelector,
+ThreadSafe, Contextualizable, Initializable, Disposable, Configurable {
 
     /** <p>A {@link Map} associating {@link SchemaParser}s with their names.</p>
*/
     private final Map componentx = Collections.synchronizedMap(new HashMap());
     /** <p>A {@link Map} associating component names with grammars.</p> */
     private final Map grammars = Collections.synchronizedMap(new HashMap());
 
-    /** <p>The configured {@link Logger} instance.</p> */
-    protected Logger logger;
     /** <p>The configured {@link Context} instance.</p> */
-    private Context context;
+    private Context context = null;
     /** <p>The configured {@link Configuration} instance.</p> */
-    private Configuration conf;
+    private Configuration conf = null;
 
     /**
      * <p>Create a new {@link DefaultValidator} instance.</p>
@@ -78,13 +76,6 @@
     }
 
     /**
-     * <p>Enable logging.</p>
-     */
-    public void enableLogging(Logger logger) {
-        this.logger = logger;
-    }
-
-    /**
      * <p>Contextualize this instance.</p>
      */
     public void contextualize(Context context)
@@ -154,7 +145,7 @@
 
                 /* Instantiate and set up the new SchemaParser */
                 schemaParser = (SchemaParser) clazz.newInstance();
-                this.setupComponent(schemaParser, configuration);
+                this.setupComponent(selectionKey, schemaParser, configuration);
 
             } catch (ConfigurationException exception) {
                 throw exception;
@@ -314,35 +305,43 @@
     /**
      * <p>Manage the instantiation lifecycle of a specified component.</p>
      */
-    private Object setupComponent(Object component, Configuration configuration)
+    private Object setupComponent(String name, Object component, Configuration conf)
     throws Exception {
         boolean initialized = false;
         boolean started = false;
 
         try {
-            if (component instanceof LogEnabled)
-                    ((LogEnabled) component).enableLogging(this.logger);
-    
-            if (component instanceof Contextualizable)
-                    ((Contextualizable) component).contextualize(this.context);
-    
-            if (component instanceof Serviceable)
-                    ((Serviceable) component).service(this.manager);
-            
-            if (component instanceof Configurable)
-                    ((Configurable) component).configure(configuration);
-    
-            if (component instanceof Parameterizable)
-                    ((Parameterizable) component).parameterize(
-                            Parameters.fromConfiguration(configuration));
+            if (component instanceof LogEnabled) {
+                Logger logger = this.logger.getChildLogger(name);
+                ((LogEnabled) component).enableLogging(logger);
+            }
     
-            if (component instanceof Initializable)
-                    ((Initializable) component).initialize();
-            initialized = true;
+            if (component instanceof Contextualizable) {
+                ((Contextualizable) component).contextualize(this.context);
+            }
+
+            if (component instanceof Serviceable) {
+                ((Serviceable) component).service(this.manager);
+            }
+
+            if (component instanceof Configurable) {
+                ((Configurable) component).configure(conf);
+            }
+
+            if (component instanceof Parameterizable)   {
+                Parameters parameters = Parameters.fromConfiguration(conf); 
+                ((Parameterizable) component).parameterize(parameters);
+            }
     
-            if (component instanceof Startable)
+            if (component instanceof Initializable) {
+                ((Initializable) component).initialize();
+                initialized = true;
+            }
+
+            if (component instanceof Startable) {
                 ((Startable) component).start();
-            started = true;
+                started = true;
+            }
 
             return component;
 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java
Mon Sep 12 05:01:39 2005
@@ -60,7 +60,7 @@
      *                                  of the grammar types returned by the
      *                                  {@link #getSupportedGrammars()} method.  
      */
-    public Schema getSchema(Source source, String grammar)
+    public Schema parseSchema(Source source, String grammar)
     throws SAXException, IOException {
         if (! Validator.GRAMMAR_RELAX_NG.equals(grammar)) {
             throw new IllegalArgumentException("Unsupported grammar " + grammar);
@@ -91,6 +91,8 @@
      * {@link Validator#GRAMMAR_RELAX_NG RELAX NG} grammar.</p>
      */
     public String[] getSupportedGrammars() {
-        return new String[] { Validator.GRAMMAR_RELAX_NG };
+        /* Jing supports spec 1.0 and 0.9 */
+        return new String[] { Validator.GRAMMAR_RELAX_NG,
+                              "http://relaxng.org/ns/structure/0.9" };
     }
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java
Mon Sep 12 05:01:39 2005
@@ -63,7 +63,7 @@
      *                                  of the grammar types returned by the
      *                                  {@link #getSupportedGrammars()} method.  
      */
-    public Schema getSchema(Source source, String grammar)
+    public Schema parseSchema(Source source, String grammar)
     throws IOException, SAXException {
         try {
             /* Create a Xerces Grammar Pool and Entity Resolver */

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
Mon Sep 12 05:01:39 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.cocoon.components.validation.impl;
 
+import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.components.validation.SchemaParser;
 import org.apache.cocoon.components.validation.Validator;
 import org.apache.xerces.impl.xs.XMLSchemaLoader;
@@ -30,7 +31,8 @@
  *
  * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
  */
-public class XercesSchemaParser extends XercesGrammarParser implements SchemaParser {
+public class XercesSchemaParser extends XercesGrammarParser
+implements SchemaParser, ThreadSafe {
 
     /**
      * <p>Create a new {@link XercesSchemaParser} instance.</p>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/sitemap.xmap?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/sitemap.xmap Mon Sep 12 05:01:39
2005
@@ -39,63 +39,34 @@
       </map:match>
 
       <!-- relax ng samples -->
-      <map:match pattern="relaxng-ok">
+      <map:match pattern="validate-valid">
         <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-relaxng" src="schema-ok.rng"/>
+        <map:transform type="validate" src="schema-ok.rng"/>
         <map:transform src="validation.xslt"/>
         <map:serialize/>
       </map:match>
 
-      <map:match pattern="relaxng-invalid">
+      <map:match pattern="validate-invalid">
         <map:generate src="source-no.xml"/>
-        <map:transform type="validate-relaxng" src="schema-ok.rng"/>
+        <map:transform type="validate" src="schema-ok.rng"/>
         <map:transform src="validation.xslt"/>
         <map:serialize/>
       </map:match>
 
-      <map:match pattern="relaxng-badschema">
+      <map:match pattern="validate-badschema">
         <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-relaxng" src="schema-no.rng"/>
+        <map:transform type="validate" src="schema-no.rng"/>
         <map:transform src="validation.xslt"/>
         <map:serialize/>
       </map:match>
       
-      <map:match pattern="relaxng-noschema">
+      <map:match pattern="validate-noschema">
         <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-relaxng" src="schema-xx.rng"/>
-        <map:transform src="validation.xslt"/>
-        <map:serialize/>
-      </map:match>
-      
-      <!-- xml schema samples -->
-      <map:match pattern="xmlschema-ok">
-        <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-xmlschema" src="schema-ok.xsd"/>
-        <map:transform src="validation.xslt"/>
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="xmlschema-invalid">
-        <map:generate src="source-no.xml"/>
-        <map:transform type="validate-xmlschema" src="schema-ok.xsd"/>
+        <map:transform type="validate" src="schema-unavailable.rng"/>
         <map:transform src="validation.xslt"/>
         <map:serialize/>
       </map:match>
 
-      <map:match pattern="xmlschema-badschema">
-        <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-xmlschema" src="schema-no.xsd"/>
-        <map:transform src="validation.xslt"/>
-        <map:serialize/>
-      </map:match>
-      
-      <map:match pattern="xmlschema-noschema">
-        <map:generate src="source-ok.xml"/>
-        <map:transform type="validate-xmlschema" src="schema-xx.xsd"/>
-        <map:transform src="validation.xslt"/>
-        <map:serialize/>
-      </map:match>
-      
     </map:pipeline>
   </map:pipelines>
 </map:sitemap>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/welcome.xml?rev=280323&r1=280322&r2=280323&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/welcome.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/samples/welcome.xml Mon Sep 12 05:01:39
2005
@@ -24,32 +24,17 @@
     <sample name="Back" href="..">to Cocoon Blocks Samples main page</sample>
   </group>
 
-  <group name="ValidatingTransformer RELAX-NG Samples">
-    <sample name="Successful validation" href="relaxng-ok">
+  <group name="ValidatingTransformer Samples">
+    <sample name="Successful validation" href="validate-valid">
       Shows the output of a pipeline with a valid document being processed.
     </sample>
-    <sample name="Validation failure" href="relaxng-invalid">
+    <sample name="Validation failure" href="validate-invalid">
       Shows the output of a pipeline with an invalid document being processed.
     </sample>
-    <sample name="Non-existent schema failure" href="relaxng-noschema">
+    <sample name="Non-existent schema failure" href="validate-noschema">
       Shows the output of a pipeline configured with a non-existent schema.
     </sample>
-    <sample name="Schema parsing failure" href="relaxng-badschema">
-      Shows the output of a pipeline configured with an invalid schema.
-    </sample>
-  </group>
-  
-  <group name="ValidatingTransformer XML-Schema Samples">
-    <sample name="Successful validation" href="xmlschema-ok">
-      Shows the output of a pipeline with a valid document being processed.
-    </sample>
-    <sample name="Validation failure" href="xmlschema-invalid">
-      Shows the output of a pipeline with an invalid document being processed.
-    </sample>
-    <sample name="Non-existent schema failure" href="xmlschema-noschema">
-      Shows the output of a pipeline configured with a non-existent schema.
-    </sample>
-    <sample name="Schema parsing failure" href="xmlschema-badschema">
+    <sample name="Schema parsing failure" href="validate-badschema">
       Shows the output of a pipeline configured with an invalid schema.
     </sample>
   </group>



Mime
View raw message