cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r280379 - 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/components/validation/jaxp/ java/org/apache/coco...
Date Mon, 12 Sep 2005 18:05:11 GMT
Author: pier
Date: Mon Sep 12 11:04:50 2005
New Revision: 280379

URL: http://svn.apache.org/viewcvs?rev=280379&view=rev
Log:
Starting implementation of a shared resolver for all implementation of schema parsers.
Splitting implementations in their own packages (starting to get big).
Cleans and fixes all around.

Added:
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingReader.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingReader.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingResolver.java
      - copied, changed from r280342, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingContext.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchema.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchema.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchemaParser.java
      - copied, changed from r280342, 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/xerces/
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContentHandler.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContentHandler.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContext.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContext.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesEntityResolver.java
      - copied, changed from r280342, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesEntityResolver.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesGrammarParser.java
      - copied, changed from r280342, 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/xerces/XercesParseException.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesParseException.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchema.java
      - copied, changed from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchema.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchemaParser.java
      - copied, changed from r280323, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
Removed:
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingContext.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingReader.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchema.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/XercesContentHandler.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContext.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesEntityResolver.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/XercesParseException.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchema.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java
Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/conf/validation.xconf
    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/AbstractSchemaParser.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java

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=280379&r1=280378&r2=280379&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 11:04:50 2005
@@ -25,8 +25,11 @@
       |   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"/>
+    <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>
+    <schema-parser name="xerces-schema" class="org.apache.cocoon.components.validation.xerces.XercesSchemaParser"/>
   </validator>
   
 </xconf>

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=280379&r1=280378&r2=280379&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 11:04:50 2005
@@ -68,7 +68,7 @@
     /** <p>The <a href="http://www.w3.org/XML/Schema">XML Schema</a/> grammar identifer.</p> */
     public static final String GRAMMAR_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
     /** <p>The <a href="http://www.w3.org/TR/REC-xml">XML DTD</a/> grammar identifer.</p> */
-    public static final String GRAMMAR_XML_DTD = "http://www.w3.org/XML/1998/namespace";
+    public static final String GRAMMAR_XML_DTD = "http://www.w3.org/TR/REC-xml";
 
     /**
      * <p>Return a {@link ValidationHandler} validating an XML document according to

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractSchemaParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractSchemaParser.java?rev=280379&r1=280378&r2=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractSchemaParser.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/AbstractSchemaParser.java Mon Sep 12 11:04:50 2005
@@ -17,7 +17,8 @@
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+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;
@@ -35,8 +36,8 @@
  *
  * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
  */
-public abstract class AbstractSchemaParser extends AbstractLogEnabled
-implements Serviceable, Initializable, Disposable, SchemaParser {
+public abstract class AbstractSchemaParser
+implements LogEnabled, Serviceable, Initializable, Disposable, SchemaParser {
 
     /** <p>The {@link ServiceManager} configured for this instance.</p> */
     protected ServiceManager serviceManager = null;
@@ -44,6 +45,15 @@
     protected SourceResolver sourceResolver = null;
     /** <p>The {@link EntityResolver} resolving against catalogs of public IDs.</p> */
     protected EntityResolver entityResolver = null;
+    /** <p>The {@link Logger} configured for this instance.</p> */
+    protected Logger logger = null;
+
+    /**
+     * <p>Enable logging.</p>
+     */
+    public void enableLogging(Logger logger) {
+        this.logger = logger;
+    }
 
     /**
      * <p>Contextualize this component specifying a {@link ServiceManager} instance.</p>

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=280379&r1=280378&r2=280379&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 11:04:50 2005
@@ -165,17 +165,27 @@
 
             /* Iterate through the grammars and store them (default lookup) */
             for (int k = 0; k < grammars.length; k++) {
-                if (this.grammars.containsKey(grammars[k])) continue;
+                if (this.grammars.containsKey(grammars[k])) {
+                    if (this.logger.isDebugEnabled()) {
+                        this.logger.debug("SchemaParser \"" + selectionKey + "\" " +
+                                          "supports grammar \"" + grammars[k] +
+                                          "\" but is not the default provider");
+                    }
+                    continue;
+                }
 
                 /* Noone yet supports this grammar, make this the default */
                 this.grammars.put(grammars[k], selectionKey);
-                this.logger.debug("SchemaParser \"" + selectionKey + "\" is the " +
-                                  "default grammar provider for " + grammars[k]);
+                if (this.logger.isDebugEnabled()) {
+                    this.logger.debug("SchemaParser \"" + selectionKey + "\" is the "
+                                      + "default grammar provider for "+grammars[k]);
+                }
             }
 
         } catch (Exception exception) {
             /* Darn, we had an exception instantiating one of the components */
-            this.logger.warn("Exception creating schema parsers", exception);
+            exception.printStackTrace();
+            this.logger.fatalError("Exception creating schema parsers", exception);
 
             /* Dispose all previously stored component instances */
             Iterator iterator = this.components.values().iterator();

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java?rev=280379&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java Mon Sep 12 11:04:50 2005
@@ -0,0 +1,199 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
+ * 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
+ *
+ * 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.apache.cocoon.components.validation.impl;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.source.SourceValidity;
+import org.apache.excalibur.source.impl.validity.AggregatedValidity;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * <p>An internal {@link InputSource} resolver that can be used while parsing
+ * schemas.</p>
+ *
+ * <p>This instance will track all resolved external sources and will store their
+ * validity information. An aggregated {@link SourceValidity} for all resolved
+ * sources can be retrieved when {@link #close() closing} this instance.</p>
+ *
+ * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
+ */
+public class ValidationResolver implements EntityResolver {
+
+    /** <p>The {@link SourceResolver} to access {@link Source}s.</p> */
+    private final SourceResolver sourceResolver;
+    /** <p>The {@link EntityResolver} to resolve public IDs against catalogs.</p> */
+    private final EntityResolver entityResolver;
+    /** <p>The global {@link SourceValidity} of all resolved sources.</p> */
+    private final AggregatedValidity sourceValidity;
+
+    /** <p>A {@link List} of {@link Source} to be released when closing.</p> */ 
+    private final List sources = new ArrayList();
+
+    /** <p>A flag indicating whether this instance has been closed.</p> */ 
+    private boolean closed = false;
+
+    /**
+     * <p>Create a new {@link ValidationResolver} instance.</p>
+     * 
+     * @throws NullPointerException if one of the specified {@link SourceResolver}
+     *                              or {@link EntityResolver} was <b>null</b>. 
+     */
+    public ValidationResolver(SourceResolver sourceResolver,
+                              EntityResolver entityResolver) {
+        if (sourceResolver == null) throw new NullPointerException("Null source");
+        if (entityResolver == null) throw new NullPointerException("Null entity");
+        this.sourceValidity = new AggregatedValidity();
+        this.sourceResolver = sourceResolver;
+        this.entityResolver = entityResolver;
+    }
+
+    /**
+     * <p>Resolve a {@link Source} into an {@link InputSource}.</p>
+     */
+    public InputSource resolveSource(Source source)
+    throws IOException, SAXException {
+        return this.resolveSource(source, null, null);
+    }
+
+    /**
+     * <p>Resolve a {@link Source} into an {@link InputSource}, specifying a
+     * specific system identifier.</p>
+     */
+    public InputSource resolveSource(Source source, String systemId)
+    throws IOException, SAXException {
+        return this.resolveSource(source, systemId, null);
+    }
+
+    /**
+     * <p>Resolve a {@link Source} into an {@link InputSource}, specifying both
+     * a specific system identifier and a public identifier.</p>
+     * 
+     * <p>If the specified system identifier was <b>null</b> the returned
+     * {@link InputSource}'s {@link InputSource#getSystemId() system identifier}
+     * will be obtained calling the {@link Source#getURI()} method.</p>
+     */
+    public InputSource resolveSource(Source source, String systemId, String publicId)
+    throws IOException, SAXException {
+        if (this.closed) throw new IllegalStateException("Resolver closed");
+
+        /* Validate what we've been passed */
+        if (source == null) throw new NullPointerException("Null source specified");
+
+        /* Record the current source in the validities to return */
+        this.sourceValidity.add(source.getValidity());
+
+        /* Ensure that we have a proper system id */
+        if (systemId == null) systemId = source.getURI();
+
+        /* Create a new input source and return it filled out entirely */
+        InputSource input = new InputSource(systemId);
+        input.setByteStream(source.getInputStream());
+        if (publicId != null) input.setPublicId(publicId);
+        return input;
+    }
+
+    /**
+     * <p>Resolve an entity identified by a specific system identifier as an
+     * {@link InputSource}.</p>
+     */
+    public InputSource resolveEntity(String systemId)
+    throws IOException, SAXException {
+        return this.resolveEntity(null, null, systemId);
+    }
+
+    /**
+     * <p>Resolve an entity identified by a specific system and public identifier
+     * as an {@link InputSource}.</p>
+     */
+    public InputSource resolveEntity(String publicId, String systemId)
+    throws IOException, SAXException {
+        return this.resolveEntity(null, publicId, systemId);
+    }
+
+    /**
+     * <p>Resolve an entity identified by a specific system and public identifier
+     * and relative to a specified base location as an {@link InputSource}.</p>
+     */
+    public InputSource resolveEntity(String base, String publicId, String systemId)
+    throws IOException, SAXException {
+        if (this.closed) throw new IllegalStateException("Resolver closed");
+
+        /* If the specified system id was null use the global entity resolver */
+        if (systemId == null) {
+            InputSource source = this.entityResolver.resolveEntity(publicId, null);
+            if ((source == null) || (source.getSystemId() == null)) {
+                throw new IOException("Can't resolve \"" + publicId + "\"");
+            }
+            systemId = source.getSystemId();
+        }
+
+        /* Now that we have a valid system id, attempt to resolve it as a source */
+        final Source source;
+        if (base == null) {
+            source = this.sourceResolver.resolveURI(systemId);
+        } else {
+            source = this.sourceResolver.resolveURI(systemId, base, null);
+        }
+
+        /* Record this source as a source to release back to the resolver */
+        this.sources.add(source);
+
+        /* Return the resolved input source back to the caller */
+        return this.resolveSource(source, systemId, publicId);
+    }
+
+    /**
+     * <p>Close this {@link ValidatorResolver} instance, releasing all created
+     * {@link Source}s back to the {@link SourceResolver} and returning an
+     * aggregated {@link SourceValidity}.</p>
+     */
+    public SourceValidity close() {
+
+        /* Release all the sources that were opened using this source resolver */
+        Iterator iterator = this.sources.iterator();
+        while (iterator.hasNext()) {
+            this.sourceResolver.release((Source) iterator.next());
+        }
+
+        /* Mark this instance as closed */
+        this.closed = true;
+
+        /* Return the source validity associated with this instance */
+        return this.sourceValidity;
+    }
+
+    /**
+     * <p>Ensure that when this object is garbage collected, the {@link #close()}
+     * method is executed.</p>
+     */
+    protected void finalize()
+    throws Throwable {
+        try {
+            super.finalize();
+        } finally {
+            if (this.closed) return;
+            this.close();
+        }
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java?rev=280379&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java Mon Sep 12 11:04:50 2005
@@ -0,0 +1,95 @@
+/* ========================================================================== *
+ * Copyright (C) 2004-2005 Pier Fumagalli <http://www.betaversion.org/~pier/> *
+ *                            All rights reserved.                            *
+ * ========================================================================== *
+ *                                                                            *
+ * 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>.       *
+ *                                                                            *
+ * 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.apache.cocoon.components.validation.jaxp;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.XMLConstants;
+import javax.xml.validation.SchemaFactory;
+
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.cocoon.components.validation.Schema;
+import org.apache.cocoon.components.validation.Validator;
+import org.apache.cocoon.components.validation.impl.AbstractSchemaParser;
+import org.apache.excalibur.source.Source;
+import org.xml.sax.SAXException;
+
+/**
+ * <p>TODO: ...</p>
+ *
+ * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
+ */
+public class JaxpSchemaParser extends AbstractSchemaParser
+implements Configurable, ThreadSafe {
+
+    private String className = null;
+    private String[] grammars = null;
+
+    public void configure(Configuration conf)
+    throws ConfigurationException {
+        this.className = conf.getChild("factory-class").getValue();
+        final SchemaFactory fact;
+        try {
+            fact = (SchemaFactory) Class.forName(this.className).newInstance();
+        } catch (Exception exception) {
+            String message = "Unable to instantiate factory " + className;
+            throw new ConfigurationException(message, conf, exception);
+        }
+
+        /* Detect languages or use the supplied ones */
+        Configuration languages[] = conf.getChild("grammars").getChildren("grammar");
+        Set grammars = new HashSet();
+        if (languages.length > 0) {
+
+            /* If the configuration specified (formally) a list of grammars use it */
+            for (int x = 0; x < languages.length; x++) {
+                grammars.add(languages[x].getValue());
+            }
+
+        } else {
+
+            /* Attempt to detect the languages directly using the JAXP factory */
+            if (fact.isSchemaLanguageSupported(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
+                grammars.add(Validator.GRAMMAR_XML_SCHEMA);
+            }
+            if (fact.isSchemaLanguageSupported(XMLConstants.RELAXNG_NS_URI)) {
+                grammars.add(Validator.GRAMMAR_RELAX_NG);
+            }
+            if (fact.isSchemaLanguageSupported(XMLConstants.XML_DTD_NS_URI)) {
+                grammars.add(Validator.GRAMMAR_XML_DTD);
+            }
+        }
+        
+        /* Store our grammars */
+        this.grammars = (String[]) grammars.toArray(new String[grammars.size()]);
+    }
+
+    public Schema parseSchema(Source source, String grammar)
+    throws SAXException, IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    public String[] getSupportedGrammars() {
+        return this.grammars;
+    }
+}

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingReader.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingReader.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingReader.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingReader.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingReader.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingReader.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingReader.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.jing;
 
 import java.io.IOException;
 import java.util.Stack;
@@ -35,20 +35,20 @@
 /**
  * <p>A trivial {@link XMLReader} implementation populating and clearing the
  * {@link Stack} of {@link InputSource}s for URI resolution kept inside
- * a {@link JingContext}.</p>
+ * a {@link JingResolver}.</p>
  */
 final class JingReader implements XMLReader {
     
     /** <p>The underlying {@link XMLReader} to use.</p> */
     private final XMLReader reader;
-    /** <p>The {@link JingContext} associated with this instance.</p> */
-    private final JingContext context;
+    /** <p>The {@link JingResolver} associated with this instance.</p> */
+    private final JingResolver context;
 
     /**
      * <p>Create a new {@link JingReader} instance associated with the specified
-     * {@link JingContext}.</p>
+     * {@link JingResolver}.</p>
      */
-    protected JingReader(JingContext context)
+    protected JingReader(JingResolver context)
     throws SAXException {
         /*
          * We have to look up the XMLReader using JAXP or SAX, as the SAXParser

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingResolver.java (from r280342, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingContext.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingResolver.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingResolver.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingContext.java&r1=280342&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingContext.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingResolver.java Mon Sep 12 11:04:50 2005
@@ -13,60 +13,40 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.jing;
 
 import java.io.IOException;
 import java.util.Stack;
 
-import org.apache.excalibur.source.Source;
+import org.apache.cocoon.components.validation.impl.ValidationResolver;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceValidity;
-import org.apache.excalibur.source.impl.validity.AggregatedValidity;
 import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 
-import com.thaiopensource.util.PropertyMap;
-import com.thaiopensource.util.PropertyMapBuilder;
-import com.thaiopensource.validate.ValidateProperty;
-import com.thaiopensource.xml.sax.DraconianErrorHandler;
 import com.thaiopensource.xml.sax.XMLReaderCreator;
 
 /**
- * <p>A simple context used when parsing RELAX NG schemas through the use of
+ * <p>A simple resolver used when parsing RELAX NG schemas through the use of
  * <a href="http://www.thaiopensource.com/relaxng/jing.html">JING</a>.</p>
- * 
+ *
  * <p>This is not thread safe and not recyclable. Once used, it <b>must</b> be
  * garbage collected.</p>
  *
  * @author <a href="mailto:pier@betaversion.org">Pier Fumagalli</a>
  */
-public class JingContext implements EntityResolver, XMLReaderCreator {
+public class JingResolver extends ValidationResolver implements XMLReaderCreator {
 
     /** <p>The current {@link Stack} of {@link InputSource}s being parsed. </p> */
     private final Stack parsedSourceStack = new Stack();
-    /** <p>The {@link SourceValidity} associated with the schema.</p> */
-    private final AggregatedValidity sourceValidity = new AggregatedValidity();
-    /** <p>The {@link SourceResolver} to resolve URIs to {@link Source}s.</p> */
-    private final SourceResolver sourceResolver;
-    /** <p>The global {@link EntityResolver} for catalog resolution.</p> */
-    private final EntityResolver entityResolver;
-    /** <p>The {@link PropertyMap} to use with JING's factories.</p> */
-    private final PropertyMap validatorProperties;
 
     /**
-     * <p>Create a new {@link JingContext} instance.</p>
+     * <p>Create a new {@link JingResolver} instance.</p>
      */
-    protected JingContext(SourceResolver sourceResolver,
-                          EntityResolver entityResolver) {
-        PropertyMapBuilder builder = new PropertyMapBuilder();
-        ValidateProperty.ENTITY_RESOLVER.put(builder, this);
-        ValidateProperty.ERROR_HANDLER.put(builder, new DraconianErrorHandler());
-        ValidateProperty.XML_READER_CREATOR.put(builder, this);
-        this.validatorProperties = builder.toPropertyMap();
-        this.sourceResolver = sourceResolver;
-        this.entityResolver = entityResolver;
+    public JingResolver(SourceResolver sourceResolver,
+                       EntityResolver entityResolver) {
+        super(sourceResolver, entityResolver);
         this.parsedSourceStack.push(null);
     }
 
@@ -88,42 +68,12 @@
     }
 
     /**
-     * <p>Return the {@link SourceValidity} of all sources resolved by this
-     * instance through the {@link #resolveEntity(String, String)} method.</p>
-     */
-    public SourceValidity getValidity() {
-        return this.sourceValidity;
-    }
-
-    /**
      * <p>Return the {@link PropertyMap} associated with this instance and usable
      * by <a href="http://www.thaiopensource.com/relaxng/jing.html">JING</a>.</p>
      */
-    public PropertyMap getProperties() {
-        return this.validatorProperties;
-    }
-
-    /* =========================================================================== */
-    /* INTERNAL EXCALIBUR SOURCE RESOLUTION AND CONVERSION METHODS                 */
-    /* =========================================================================== */
-
-    /**
-     * <p>Produce an {@link InputSource} from the specified {@link Source} adding
-     * its {@link SourceValidity} to the aggregate managed by this instance.</p>
-     * 
-     * @param source the {@link Source} to resolve and whose validity must be added.
-     * @return a <b>non-null</b> {@link InputSource} instance.
-     * @throws IOException if an I/O error occurred accessing the {@link Source}.
-     */
-    public InputSource resolveSource(Source source)
-    throws IOException {
-        this.sourceValidity.add(source.getValidity());
-        InputSource inputSource = new InputSource();
-        inputSource.setSystemId(source.getURI());
-        inputSource.setByteStream(source.getInputStream());
-        return inputSource;
-    }
-
+    //public PropertyMap getProperties() {
+    //    return this.validatorProperties;
+    //}
 
     /* =========================================================================== */
     /* SAX2 ENTITY RESOLVER INTERFACE IMPLEMENTATION                               */
@@ -161,28 +111,11 @@
      */
     public InputSource resolveEntity(String publicId, String systemId)
     throws SAXException, IOException {
-        if (this.sourceValidity == null) throw new IOException("Can't resolve now");
-
-        /* Try to resolve the public id if we don't have a system id */
-        if (systemId == null) {
-            InputSource source = this.entityResolver.resolveEntity(publicId, null);
-            if ((source == null) || (source.getSystemId() == null)) {
-                throw new IOException("Can't resolve \"" + publicId + "\"");
-            } else {
-                systemId = source.getSystemId();
-            }
-        }
-
-        /* Use Cocoon's SourceResolver to resolve the system id */
-        InputSource parsing = (InputSource) this.parsedSourceStack.peek();
-        String base = parsing != null? parsing.getSystemId(): null;
-        Source source = this.sourceResolver.resolveURI(systemId, base, null);
-        try {
-            final InputSource input = this.resolveSource(source);
-            if (publicId != null) input.setPublicId(publicId);
-            return input;
-        } finally {
-            this.sourceResolver.release(source);
+        InputSource source = (InputSource) this.parsedSourceStack.peek();
+        if (source == null) {
+            return super.resolveEntity(publicId, systemId);
+        } else {
+            return super.resolveEntity(source.getSystemId(), publicId, systemId);
         }
     }
 

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchema.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchema.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchema.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchema.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchema.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchema.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchema.java Mon Sep 12 11:04:50 2005
@@ -13,9 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.jing;
 
 import org.apache.cocoon.components.validation.ValidationHandler;
+import org.apache.cocoon.components.validation.impl.AbstractSchema;
+import org.apache.cocoon.components.validation.impl.DefaultValidationHandler;
 import org.apache.excalibur.source.SourceValidity;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.ErrorHandler;

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchemaParser.java (from r280342, 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/jing/JingSchemaParser.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/jing/JingSchemaParser.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/JingSchemaParser.java&r1=280342&r2=280379&rev=280379&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/jing/JingSchemaParser.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.jing;
 
 import java.io.IOException;
 
@@ -21,13 +21,18 @@
 import org.apache.cocoon.components.validation.Schema;
 import org.apache.cocoon.components.validation.SchemaParser;
 import org.apache.cocoon.components.validation.Validator;
+import org.apache.cocoon.components.validation.impl.AbstractSchemaParser;
+import org.apache.cocoon.components.validation.impl.DraconianErrorHandler;
 import org.apache.excalibur.source.Source;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
+import com.thaiopensource.util.PropertyMap;
+import com.thaiopensource.util.PropertyMapBuilder;
 import com.thaiopensource.validate.IncorrectSchemaException;
 import com.thaiopensource.validate.SchemaReader;
+import com.thaiopensource.validate.ValidateProperty;
 import com.thaiopensource.validate.rng.SAXSchemaReader;
 
 /**
@@ -67,13 +72,23 @@
         }
 
         SchemaReader schemaReader = SAXSchemaReader.getInstance();
-        JingContext context = new JingContext(sourceResolver, entityResolver);
+        JingResolver context = new JingResolver(sourceResolver, entityResolver);
         InputSource input = context.resolveSource(source);
 
         try {
+            /* Create a simple property map builder */
+            PropertyMapBuilder builder = new PropertyMapBuilder();
+            ValidateProperty.ENTITY_RESOLVER.put(builder, context);
+            ValidateProperty.XML_READER_CREATOR.put(builder, context);
+            ValidateProperty.ERROR_HANDLER.put(builder,
+                                               DraconianErrorHandler.INSTANCE);
+            PropertyMap validatorProperties = builder.toPropertyMap();
+
+            /* Parse, rewrap, and return the schema */
             final com.thaiopensource.validate.Schema schema;
-            schema = schemaReader.createSchema(input, context.getProperties());
-            return new JingSchema(schema, context.getValidity());
+            schema = schemaReader.createSchema(input, validatorProperties);
+            return new JingSchema(schema, context.close());
+
         } catch (IncorrectSchemaException exception) {
             String message = "Incorrect schema \"" + source.getURI() + "\"";
             throw new SAXException(message, exception);

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContentHandler.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContentHandler.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContentHandler.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContentHandler.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContentHandler.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContentHandler.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContentHandler.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import org.apache.xerces.util.NamespaceSupport;
 import org.apache.xerces.util.SAXLocatorWrapper;

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContext.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContext.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContext.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContext.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContext.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesContext.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesContext.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import java.util.Iterator;
 

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesEntityResolver.java (from r280342, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesEntityResolver.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesEntityResolver.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesEntityResolver.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesEntityResolver.java&r1=280342&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesEntityResolver.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesEntityResolver.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import java.io.IOException;
 

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesGrammarParser.java (from r280342, 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/xerces/XercesGrammarParser.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesGrammarParser.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesGrammarParser.java&r1=280342&r2=280379&rev=280379&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/xerces/XercesGrammarParser.java Mon Sep 12 11:04:50 2005
@@ -13,12 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import java.io.IOException;
 
 import org.apache.cocoon.components.validation.Schema;
 import org.apache.cocoon.components.validation.SchemaParser;
+import org.apache.cocoon.components.validation.impl.AbstractSchemaParser;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceValidity;
 import org.apache.xerces.util.XMLGrammarPoolImpl;
@@ -78,9 +79,9 @@
             context.initialize(loader);
 
             /* Load (parse and interpret) the grammar */
-            this.getLogger().debug("Loading grammar from " + source.getURI());
+            this.logger.debug("Loading grammar from " + source.getURI());
             loader.loadGrammar(r.resolveSource(source));
-            this.getLogger().debug("Grammar loaded from " + source.getURI());
+            this.logger.debug("Grammar loaded from " + source.getURI());
 
             /* Return a new Schema instance */
             SourceValidity validity = r.getSourceValidity();

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesParseException.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesParseException.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesParseException.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesParseException.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesParseException.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesParseException.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesParseException.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import org.apache.xerces.xni.parser.XMLParseException;
 import org.xml.sax.SAXParseException;

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchema.java (from r280322, cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchema.java)
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchema.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchema.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchema.java&r1=280322&r2=280379&rev=280379&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchema.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchema.java Mon Sep 12 11:04:50 2005
@@ -13,9 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import org.apache.cocoon.components.validation.ValidationHandler;
+import org.apache.cocoon.components.validation.impl.AbstractSchema;
+import org.apache.cocoon.components.validation.impl.DefaultValidationHandler;
 import org.apache.excalibur.source.SourceValidity;
 import org.apache.xerces.xni.XMLDocumentHandler;
 import org.apache.xerces.xni.grammars.XMLGrammarPool;

Copied: cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchemaParser.java (from r280323, 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/xerces/XercesSchemaParser.java?p2=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/xerces/XercesSchemaParser.java&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/validation/java/org/apache/cocoon/components/validation/impl/XercesSchemaParser.java&r1=280323&r2=280379&rev=280379&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/xerces/XercesSchemaParser.java Mon Sep 12 11:04:50 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.components.validation.impl;
+package org.apache.cocoon.components.validation.xerces;
 
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.components.validation.SchemaParser;



Mime
View raw message