cziegeler 02/02/13 05:26:33
Modified: src/java/org/apache/cocoon cocoon.roles
src/java/org/apache/cocoon/components/source URLSource.java
Log:
First use of avalon excalibur xml-parser. This is only a test
Revision Changes Path
1.9 +4 -0 xml-cocoon2/src/java/org/apache/cocoon/cocoon.roles
Index: cocoon.roles
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/cocoon.roles,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cocoon.roles 9 Feb 2002 04:16:38 -0000 1.8
+++ cocoon.roles 13 Feb 2002 13:26:33 -0000 1.9
@@ -13,6 +13,10 @@
]>
<role-list>
+ <role name="org.apache.avalon.excalibur.xml.Parser"
+ shorthand="xml-parser"
+ default-class="org.apache.avalon.excalibur.xml.JaxpParser"/>
+
<role name="org.apache.cocoon.components.parser.Parser"
shorthand="parser"
default-class="org.apache.cocoon.components.parser.JaxpParser"/>
1.8 +3 -14
xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java
Index: URLSource.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- URLSource.java 11 Feb 2002 10:33:54 -0000 1.7
+++ URLSource.java 13 Feb 2002 13:26:33 -0000 1.8
@@ -55,12 +55,12 @@
package org.apache.cocoon.components.source;
+import org.apache.avalon.excalibur.xml.Parser;
import org.apache.avalon.excalibur.source.SourceParameters;
import org.apache.avalon.excalibur.source.SourceUtil;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.ResourceNotFoundException;
-import org.apache.cocoon.components.parser.Parser;
import org.apache.cocoon.environment.ModifiableSource;
import org.apache.cocoon.util.ClassUtils;
import org.apache.cocoon.xml.XMLConsumer;
@@ -91,7 +91,7 @@
* Description of a source which is described by an URL.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: URLSource.java,v 1.7 2002/02/11 10:33:54 giacomo Exp $
+ * @version CVS $Id: URLSource.java,v 1.8 2002/02/13 13:26:33 cziegeler Exp $
*/
public class URLSource implements ModifiableSource {
@@ -418,18 +418,7 @@
try {
parser = (Parser)this.manager.lookup(Parser.ROLE);
- if (handler instanceof XMLConsumer) {
- parser.setConsumer((XMLConsumer)handler);
- } else {
- parser.setContentHandler(handler);
- if (handler instanceof LexicalHandler) {
- parser.setLexicalHandler((LexicalHandler)handler);
- }
- }
- parser.parse(this.getInputSource());
- } catch (ProcessingException e){
- // Preserve original exception
- throw e;
+ parser.parse( this.getInputSource(), handler);
} catch (SAXException e) {
// Preserve original exception
throw e;
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]