cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r534978 - /cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java
Date Thu, 03 May 2007 19:58:53 GMT
Author: gkossakowski
Date: Thu May  3 12:58:52 2007
New Revision: 534978

URL: http://svn.apache.org/viewvc?view=rev&rev=534978
Log:
Second attempt to use org.apache.cocoon.core.xml.SAXParser instead of org.apache.excalibur.xml.sax.SAXParser.
See this discussion: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72927

Modified:
    cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java?view=diff&rev=534978&r1=534977&r2=534978
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java
(original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/source/util/SourceUtil.java
Thu May  3 12:58:52 2007
@@ -37,7 +37,7 @@
 import org.apache.excalibur.source.SourceNotFoundException;
 import org.apache.excalibur.source.SourceParameters;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.sax.SAXParser;
+import org.apache.cocoon.core.xml.SAXParser;
 import org.apache.excalibur.xml.sax.XMLizable;
 import org.apache.excalibur.xmlizer.XMLizer;
 import org.apache.regexp.RE;
@@ -232,10 +232,12 @@
 	    if (source instanceof XMLizable) {
 	        toSAX((XMLizable) source, handler);
 	    } else {
-	        SAXParser parser = null;
+	        org.apache.excalibur.xml.sax.SAXParser parser = null;
 	        try {
-	            parser = (SAXParser) manager.lookup(SAXParser.ROLE);
-	            parse(parser, source, handler);
+	            parser = (org.apache.excalibur.xml.sax.SAXParser) manager.lookup(org.apache.excalibur.xml.sax.SAXParser.ROLE);
+	            parser.parse(getInputSource(source), handler);
+	        } catch (SourceException e) {
+	        	throw SourceUtil.handle(e);
 	        } catch (ServiceException e) {
 	            throw new ProcessingException("Exception during parsing source.", e);
 	        } finally {



Mime
View raw message