jefft 2003/01/21 21:19:20
Modified: lib jars.xml
src/blocks/bsf/java/org/apache/cocoon/generation
ScriptGenerator.java
src/blocks/databases/java/org/apache/cocoon/transformation
SQLTransformer.java
src/blocks/html/java/org/apache/cocoon/generation
HTMLGenerator.java
src/blocks/jsp/java/org/apache/cocoon/generation
JspGenerator.java
src/blocks/lucene/java/org/apache/cocoon/components/search
SimpleLuceneXMLIndexerImpl.java
src/blocks/php/java/org/apache/cocoon/generation
PhpGenerator.java
src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context
RequestSessionContext.java
src/blocks/velocity/java/org/apache/cocoon/generation
VelocityGenerator.java
src/deprecated/java/org/apache/cocoon/components/source
AbstractStreamSource.java
src/deprecated/java/org/apache/cocoon/components/xpath
JaxenProcessorImpl.java XPathProcessor.java
XPathProcessorImpl.java
src/documentation cocoon.xconf
src/documentation/xdocs/installing updating.xml
src/documentation/xdocs/tutorial RMIGenerator.java
tutorial-rmi-generator.xml
src/java/org/apache/cocoon Cocoon.java Constants.java
cocoon.roles
src/java/org/apache/cocoon/components/language/markup
Logicsheet.java
src/java/org/apache/cocoon/components/xpath XPathUtil.java
src/java/org/apache/cocoon/components/xscript
XScriptObject.java
src/java/org/apache/cocoon/generation StreamGenerator.java
WebServiceProxyGenerator.java
src/java/org/apache/cocoon/i18n XMLResourceBundle.java
src/java/org/apache/cocoon/transformation
CIncludeTransformer.java TraxTransformer.java
XIncludeTransformer.java
src/java/org/apache/cocoon/xml/dom DOMUtil.java
src/scratchpad/src/org/apache/cocoon/components/repository/impl
SlideRepository.java
src/scratchpad/src/org/apache/cocoon/components/source/impl
XPathSourceInspector.java
src/scratchpad/src/org/apache/cocoon/generation
RequestAttributeGenerator.java
XPathDirectoryGenerator.java
src/scratchpad/src/org/apache/cocoon/transformation/pagination
Paginator.java
src/webapp/WEB-INF cocoon.xconf
Added: lib/core excalibur-xmlutil-20030122.jar
Removed: lib/core excalibur-xmlutil-20030115.jar
Log:
Upgrade to latest xmlutil:
- org.apache.avalon.excalibur.xml renamed to org.apache.excalibur.xml
- o.a.e.x.sax.Parser renamed to o.a.e.x.sax.SAXParser for consistency with
DOMParser
Revision Changes Path
1.68 +1 -1 xml-cocoon2/lib/jars.xml
Index: jars.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/lib/jars.xml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- jars.xml 16 Jan 2003 11:59:04 -0000 1.67
+++ jars.xml 22 Jan 2003 05:19:14 -0000 1.68
@@ -171,7 +171,7 @@
<description>Part of jakarta-avalon, it is a set of classes and patterns that
support high level server development.</description>
<used-by>Cocoon</used-by>
- <lib>core/excalibur-xmlutil-20030115.jar</lib>
+ <lib>core/excalibur-xmlutil-20030122.jar</lib>
<homepage>http://jakarta.apache.org/avalon/excalibur/</homepage>
</file>
<file>
1.1 xml-cocoon2/lib/core/excalibur-xmlutil-20030122.jar
<<Binary file>>
1.4 +4 -4
xml-cocoon2/src/blocks/bsf/java/org/apache/cocoon/generation/ScriptGenerator.java
Index: ScriptGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/bsf/java/org/apache/cocoon/generation/ScriptGenerator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ScriptGenerator.java 14 Jan 2003 09:00:28 -0000 1.3
+++ ScriptGenerator.java 22 Jan 2003 05:19:15 -0000 1.4
@@ -63,7 +63,7 @@
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import java.io.FileNotFoundException;
@@ -152,7 +152,7 @@
}
public void generate() throws ProcessingException {
- Parser parser = null;
+ SAXParser parser = null;
try {
// Figure out what file to open and do so
getLogger().debug("processing file [" + super.source + "]");
@@ -204,7 +204,7 @@
InputSource xmlInput =
new InputSource(new StringReader(output.toString()));
- parser = (Parser)(this.manager.lookup(Parser.ROLE));
+ parser = (SAXParser)(this.manager.lookup(SAXParser.ROLE));
parser.parse(xmlInput, this.xmlConsumer);
} catch (SourceException se) {
throw SourceUtil.handle(se);
1.10 +4 -4
xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java
Index: SQLTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SQLTransformer.java 14 Jan 2003 10:09:44 -0000 1.9
+++ SQLTransformer.java 22 Jan 2003 05:19:15 -0000 1.10
@@ -64,7 +64,7 @@
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.util.Tokenizer;
import org.apache.cocoon.xml.IncludeXMLConsumer;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
@@ -181,7 +181,7 @@
protected XMLSerializer compiler;
protected XMLDeserializer interpreter;
- protected Parser parser;
+ protected SAXParser parser;
/**
* Constructor
@@ -1190,7 +1190,7 @@
if (value.length() > 0 && value.charAt(0) == '<') {
try {
if (transformer.parser != null) {
- transformer.parser =
(Parser)manager.lookup(Parser.ROLE);
+ transformer.parser =
(SAXParser)manager.lookup(SAXParser.ROLE);
}
if (transformer.compiler != null) {
compiler =
(XMLSerializer)manager.lookup(XMLSerializer.ROLE);
1.2 +2 -2
xml-cocoon2/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java
Index: HTMLGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTMLGenerator.java 18 Dec 2002 23:41:45 -0000 1.1
+++ HTMLGenerator.java 22 Jan 2003 05:19:15 -0000 1.2
@@ -50,7 +50,7 @@
*/
package org.apache.cocoon.generation;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
1.4 +4 -4
xml-cocoon2/src/blocks/jsp/java/org/apache/cocoon/generation/JspGenerator.java
Index: JspGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/jsp/java/org/apache/cocoon/generation/JspGenerator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JspGenerator.java 14 Jan 2003 10:09:44 -0000 1.3
+++ JspGenerator.java 22 Jan 2003 05:19:16 -0000 1.4
@@ -57,7 +57,7 @@
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.jsp.JSPEngine;
import org.apache.cocoon.environment.http.HttpEnvironment;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -100,7 +100,7 @@
}
JSPEngine engine = null;
- Parser parser = null;
+ SAXParser parser = null;
try {
// FIXME (KP): Should we exclude not supported protocols, say 'context'?
String url = this.source;
@@ -125,7 +125,7 @@
input.setEncoding("utf-8");
// pipe the results into the parser
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse(input, this.xmlConsumer);
} catch (ServletException e) {
throw new ProcessingException("ServletException in
JspGenerator.generate()",e.getRootCause());
1.3 +4 -4
xml-cocoon2/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java
Index: SimpleLuceneXMLIndexerImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/lucene/java/org/apache/cocoon/components/search/SimpleLuceneXMLIndexerImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SimpleLuceneXMLIndexerImpl.java 14 Jan 2003 09:00:29 -0000 1.2
+++ SimpleLuceneXMLIndexerImpl.java 22 Jan 2003 05:19:16 -0000 1.3
@@ -61,7 +61,7 @@
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.util.Tokenizer;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.lucene.document.DateField;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@@ -299,14 +299,14 @@
InputStream is = null;
InputSource in = null;
- Parser parser = null;
+ SAXParser parser = null;
try {
is = contentURLConnection.getInputStream();
in = new InputSource(is);
// get an XML parser
- parser = (Parser) this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
//reader.setErrorHandler(new CocoonErrorHandler());
parser.parse(in, luceneIndexContentHandler);
//
1.5 +4 -4
xml-cocoon2/src/blocks/php/java/org/apache/cocoon/generation/PhpGenerator.java
Index: PhpGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/php/java/org/apache/cocoon/generation/PhpGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PhpGenerator.java 14 Jan 2003 10:09:44 -0000 1.4
+++ PhpGenerator.java 22 Jan 2003 05:19:16 -0000 1.5
@@ -70,7 +70,7 @@
import org.apache.cocoon.environment.http.HttpEnvironment;
import org.apache.excalibur.source.Source;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -178,7 +178,7 @@
// ensure that we are serving a file...
Source inputSource = null;
- Parser parser = null;
+ SAXParser parser = null;
try {
inputSource = this.resolver.resolveURI(this.source);
String systemId = inputSource.getSystemId();
@@ -198,7 +198,7 @@
new Thread(php).start();
// pipe the results into the parser
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse(new InputSource(input), this.xmlConsumer);
// clean up
1.5 +5 -5
xml-cocoon2/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
Index: RequestSessionContext.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RequestSessionContext.java 14 Jan 2003 09:00:29 -0000 1.4
+++ RequestSessionContext.java 22 Jan 2003 05:19:16 -0000 1.5
@@ -67,7 +67,7 @@
import org.apache.cocoon.xml.dom.DOMUtil;
import org.apache.excalibur.source.SourceParameters;
import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Element;
@@ -185,9 +185,9 @@
Element root = contextData.getDocumentElement();
- Parser parser = null;
+ SAXParser parser = null;
try {
- parser = (Parser) manager.lookup( Parser.ROLE );
+ parser = (SAXParser) manager.lookup( SAXParser.ROLE );
this.buildParameterXML(root, parser);
} catch (ComponentException ce) {
throw new ProcessingException("Unable to lookup parser.", ce);
@@ -384,7 +384,7 @@
/**
* Build parameter XML
*/
- private void buildParameterXML(Element root, Parser parser)
+ private void buildParameterXML(Element root, SAXParser parser)
throws ProcessingException {
Document doc = root.getOwnerDocument();
// include all parameters
@@ -702,4 +702,4 @@
throw new ProcessingException("The context " + this.name + " does not
support saving.");
}
-}
\ No newline at end of file
+}
1.3 +4 -4
xml-cocoon2/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java
Index: VelocityGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/blocks/velocity/java/org/apache/cocoon/generation/VelocityGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VelocityGenerator.java 14 Jan 2003 09:00:30 -0000 1.2
+++ VelocityGenerator.java 22 Jan 2003 05:19:16 -0000 1.3
@@ -66,7 +66,7 @@
import org.apache.cocoon.environment.SourceResolver;
import org.apache.commons.collections.ExtendedProperties;
import org.apache.excalibur.source.Source;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.app.VelocityEngine;
@@ -510,9 +510,9 @@
throw new IllegalStateException("generate called on sitemap component
before setup.");
}
- Parser parser = null;
+ SAXParser parser = null;
try {
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Processing File: " + super.source);
}
1.3 +4 -4
xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/source/AbstractStreamSource.java
Index: AbstractStreamSource.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/source/AbstractStreamSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractStreamSource.java 14 Jan 2003 09:00:28 -0000 1.2
+++ AbstractStreamSource.java 22 Jan 2003 05:19:16 -0000 1.3
@@ -61,7 +61,7 @@
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.ModifiableSource;
import org.apache.cocoon.util.ClassUtils;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -192,9 +192,9 @@
* @throws SAXException if failed to parse source document.
*/
public void toSAX(ContentHandler handler) throws SAXException,
ProcessingException {
- Parser parser = null;
+ SAXParser parser = null;
try {
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse( this.getInputSource(), handler);
} catch (SAXException e) {
1.2 +2 -2
xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/JaxenProcessorImpl.java
Index: JaxenProcessorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/JaxenProcessorImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JaxenProcessorImpl.java 26 Dec 2002 18:38:57 -0000 1.1
+++ JaxenProcessorImpl.java 22 Jan 2003 05:19:16 -0000 1.2
@@ -70,7 +70,7 @@
* <xslt-processor
class="org.apache.cocoon.components.xpath.JaxenProcessorImpl">
* </xslt-processor>
* </pre>
- * @deprecated Use the org.apache.avalon.excalibur.xml.xpath.JaxenProcessorImpl
instead.
+ * @deprecated Use the org.apache.excalibur.xml.xpath.JaxenProcessorImpl instead.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @version CVS $Id$
1.2 +2 -2
xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/XPathProcessor.java
Index: XPathProcessor.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/XPathProcessor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XPathProcessor.java 26 Dec 2002 18:38:57 -0000 1.1
+++ XPathProcessor.java 22 Jan 2003 05:19:16 -0000 1.2
@@ -57,7 +57,7 @@
/**
* This is the interface of the XPath processor in Cocoon.
*
- * @deprecated Use the org.apache.avalon.excalibur.xml.xpath.XPathProcessor instead.
+ * @deprecated Use the org.apache.excalibur.xml.xpath.XPathProcessor instead.
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @version CVS $Id$
*/
1.2 +2 -2
xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/XPathProcessorImpl.java
Index: XPathProcessorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/deprecated/java/org/apache/cocoon/components/xpath/XPathProcessorImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XPathProcessorImpl.java 26 Dec 2002 18:38:57 -0000 1.1
+++ XPathProcessorImpl.java 22 Jan 2003 05:19:16 -0000 1.2
@@ -68,7 +68,7 @@
* </xslt-processor>
* </pre>
*
- * @deprecated Use the org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl
instead.
+ * @deprecated Use the org.apache.excalibur.xml.xpath.XPathProcessorImpl instead.
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @version CVS $Id$
*/
1.20 +2 -2 xml-cocoon2/src/documentation/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/cocoon.xconf,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cocoon.xconf 15 Jan 2003 10:39:34 -0000 1.19
+++ cocoon.xconf 22 Jan 2003 05:19:17 -0000 1.20
@@ -67,8 +67,8 @@
<!-- The XMLizer converts different mime-types to XML -->
<xmlizer>
- <parser role="org.apache.excalibur.xml.sax.Parser/HTML"
mime-type="text/html"/>
- <parser role="org.apache.excalibur.xml.sax.Parser" mime-type="text/xml"/>
+ <parser role="org.apache.excalibur.xml.sax.SAXParser/HTML"
mime-type="text/html"/>
+ <parser role="org.apache.excalibur.xml.sax.SAXParser"
mime-type="text/xml"/>
</xmlizer>
<!-- Program Generator -->
1.10 +1 -1 xml-cocoon2/src/documentation/xdocs/installing/updating.xml
Index: updating.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/installing/updating.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- updating.xml 14 Jan 2003 10:36:48 -0000 1.9
+++ updating.xml 22 Jan 2003 05:19:17 -0000 1.10
@@ -47,7 +47,7 @@
manually update swap the hint names.</p>
<p>From within your source code you should not lookup the
<em>org.apache.cocoon.components.parser.Parser.ROLE</em> anymore; use
- <em>org.apache.excalibur.xml.sax.Parser.ROLE</em> instead.
+ <em>org.apache.excalibur.xml.sax.SAXParser.ROLE</em> instead.
</p>
</s2>
<s2 title="XML Entity Resolver">
1.3 +4 -4 xml-cocoon2/src/documentation/xdocs/tutorial/RMIGenerator.java
Index: RMIGenerator.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/tutorial/RMIGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RMIGenerator.java 14 Jan 2003 10:04:25 -0000 1.2
+++ RMIGenerator.java 22 Jan 2003 05:19:17 -0000 1.3
@@ -24,7 +24,7 @@
import org.apache.avalon.framework.component.ComponentException;
// needed for obtaining parser in Cocoon
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
/**
* <p>
@@ -32,7 +32,7 @@
* and generates SAX events.
* The RMIGenerator extends the <code>ComposerGenerator</code> class. This is
* done so we can access the <code>ComponentManager</code> to obtain a
- * <code>Parser</code>.
+ * <code>SAXParser</code>.
* </p>
*
* <p>
@@ -140,8 +140,8 @@
message = obj.getResource(this.source);
}
- Parser parser = null;
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ SAXParser parser = null;
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
InputSource inputSource = new InputSource(new
StringReader(message));
parser.parse(inputSource,super.xmlConsumer);
} catch (NotBoundException nbe) {
1.7 +8 -8
xml-cocoon2/src/documentation/xdocs/tutorial/tutorial-rmi-generator.xml
Index: tutorial-rmi-generator.xml
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/documentation/xdocs/tutorial/tutorial-rmi-generator.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- tutorial-rmi-generator.xml 14 Jan 2003 10:04:25 -0000 1.6
+++ tutorial-rmi-generator.xml 22 Jan 2003 05:19:17 -0000 1.7
@@ -677,12 +677,12 @@
<p>We would still like to point the reader to an
alternative solution, i.e. the solution that is used throughout Cocoon 2. We will give
the code fragments here and we will then explain what it does.</p>
<source><![CDATA[
...
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
...
-Parser parser = null;
+SAXParser parser = null;
try {
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse(this.getInputSource(),handler);
} catch (SAXException e) {
// Preserve original exception
@@ -699,12 +699,12 @@
]]>
</source>
- <p>An extra <strong>import</strong> statement is
added. The <strong>Parser</strong> interface of the Avalon/Excalibur project (<link
href="http://jakarta.apache.org/avalon/excalibur/index.html">Avalon/Excalibur van The
Jakarta Project</link>) defines the following method:</p>
+ <p>An extra <strong>import</strong> statement is
added. The <strong>SAXParser</strong> interface of the Avalon/Excalibur project (<link
href="http://jakarta.apache.org/avalon/excalibur/index.html">Avalon/Excalibur van The
Jakarta Project</link>) defines the following method:</p>
<ul>
<li><code>void parse(InputSource in,
ContentHandler consumer)</code>: the implementation of this method should parse the
<strong>InputSource</strong> and send the SAX events to the <strong>consumer</strong>.
The consumer can be an <strong>XMLConsumer</strong> or an object that implements
<strong>LexicalHandler</strong> as well.
</li>
</ul>
- <p>This interface defines a variable
<strong>ROLE</strong> of the type String that is given the value
<strong>org.apache.excalibur.xml.sax.Parser</strong>. This variable is used to ask the
<strong>ComponentManager</strong>, which is accessed by <strong>this.manager</strong>,
to <strong>lookup</strong> a <strong>Component</strong> that has that role. The
returned Component is then casted to a <strong>Parser</strong> type. We can then apply
the parse method to any <strong>org.xml.sax.InputSource</strong> object and to an
object that implements the <strong>ContentHandler</strong> interface. Finally, we have
to tell the ComponentManager that we are finished using the parser. This allows the
ComponentManager to handle the End-Of-Life Lifecycle events associated with this
Component.
+ <p>This interface defines a variable
<strong>ROLE</strong> of the type String that is given the value
<strong>org.apache.excalibur.xml.sax.SAXParser</strong>. This variable is used to ask
the <strong>ComponentManager</strong>, which is accessed by
<strong>this.manager</strong>, to <strong>lookup</strong> a <strong>Component</strong>
that has that role. The returned Component is then casted to a
<strong>SAXParser</strong> type. We can then apply the parse method to any
<strong>org.xml.sax.InputSource</strong> object and to an object that implements the
<strong>ContentHandler</strong> interface. Finally, we have to tell the
ComponentManager that we are finished using the parser. This allows the
ComponentManager to handle the End-Of-Life Lifecycle events associated with this
Component.
</p>
<p><strong>NOTE:</strong> if you want to use this
method to obtain a parser, it would be better to extend the
<strong>ComposerGenerator</strong> class, instead of the
<strong>AbstractGenerator</strong> class. The ComposerGenerator is defined to make use
of a <strong>ComponentManager</strong>, while this is not the case for the
<strong>AbstractGenerator</strong> class. You should envisage the given code as part
of a class that extends the <strong>ComposerGenerator</strong> class or one of its
children.
@@ -1044,7 +1044,7 @@
import org.apache.avalon.framework.component.ComponentException;
// needed for obtaining parser in Cocoon
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import test.ServerFunctions;
@@ -1109,8 +1109,8 @@
message = obj.getResource(source);
}
- Parser parser = null;
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ SAXParser parser = null;
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
InputSource inputSource = new InputSource(
new StringReader(message));
1.49 +7 -7 xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- Cocoon.java 14 Jan 2003 10:04:24 -0000 1.48
+++ Cocoon.java 22 Jan 2003 05:19:17 -0000 1.49
@@ -83,7 +83,7 @@
import org.apache.excalibur.instrument.InstrumentManager;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.impl.URLSource;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import java.io.BufferedInputStream;
@@ -271,7 +271,7 @@
startupManager.setLogKitManager(this.logKitManager);
try {
- startupManager.addComponent(Parser.ROLE, ClassUtils.loadClass(parser),
new org.apache.avalon.framework.configuration.DefaultConfiguration("", "empty"));
+ startupManager.addComponent(SAXParser.ROLE,
ClassUtils.loadClass(parser), new
org.apache.avalon.framework.configuration.DefaultConfiguration("", "empty"));
} catch (Exception e) {
throw new ConfigurationException("Could not load parser " + parser, e);
}
@@ -333,12 +333,12 @@
* @exception ContextException if an error occurs
*/
public Configuration configure(ExcaliburComponentManager startupManager) throws
ConfigurationException, ContextException {
- Parser p = null;
+ SAXParser p = null;
Configuration roleConfig = null;
try {
this.configurationFile.discardValidity();
- p = (Parser)startupManager.lookup(Parser.ROLE);
+ p = (SAXParser)startupManager.lookup(SAXParser.ROLE);
SAXConfigurationHandler b = new SAXConfigurationHandler();
InputStream inputStream =
ClassUtils.getResource("org/apache/cocoon/cocoon.roles").openStream();
InputSource is = new InputSource(inputStream);
@@ -357,7 +357,7 @@
roleConfig = null;
try {
- p = (Parser)startupManager.lookup(Parser.ROLE);
+ p = (SAXParser)startupManager.lookup(SAXParser.ROLE);
SAXConfigurationHandler b = new SAXConfigurationHandler();
InputSource is = SourceUtil.getInputSource(this.configurationFile);
p.parse(is, b);
@@ -385,7 +385,7 @@
String userRoles = conf.getAttribute("user-roles", "");
if (!"".equals(userRoles)) {
try {
- p = (Parser)startupManager.lookup(Parser.ROLE);
+ p = (SAXParser)startupManager.lookup(SAXParser.ROLE);
SAXConfigurationHandler b = new SAXConfigurationHandler();
org.apache.cocoon.environment.Context context =
(org.apache.cocoon.environment.Context)
this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
1.16 +2 -2 xml-cocoon2/src/java/org/apache/cocoon/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Constants.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Constants.java 15 Jan 2003 10:39:34 -0000 1.15
+++ Constants.java 22 Jan 2003 05:19:17 -0000 1.16
@@ -138,7 +138,7 @@
String DEFAULT_CONF_FILE = "cocoon.xconf";
/** The name of the property holding the class for a XML parser */
- String PARSER_PROPERTY = "org.apache.excalibur.xml.sax.Parser";
+ String PARSER_PROPERTY = "org.apache.excalibur.xml.sax.SAXParser";
/** The name of the class for the default XML parser to use */
String DEFAULT_PARSER = "org.apache.excalibur.xml.impl.JaxpParser";
1.44 +6 -6 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.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cocoon.roles 15 Jan 2003 10:39:34 -0000 1.43
+++ cocoon.roles 22 Jan 2003 05:19:17 -0000 1.44
@@ -25,7 +25,7 @@
-->
<!-- This is the usual SAX parser -->
- <role name="org.apache.excalibur.xml.sax.Parser"
+ <role name="org.apache.excalibur.xml.sax.SAXParser"
shorthand="xml-parser"
default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
@@ -35,7 +35,7 @@
default-class="org.apache.excalibur.xml.impl.JaxpParser"/>
<!-- This is the HTML parser -->
- <role name="org.apache.excalibur.xml.sax.Parser/HTML"
+ <role name="org.apache.excalibur.xml.sax.SAXParser/HTML"
shorthand="html-parser"
default-class="org.apache.excalibur.xml.sax.JTidyHTMLParser"/>
@@ -48,13 +48,13 @@
<!-- XSLT:
-->
- <role name="org.apache.avalon.excalibur.xml.xslt.XSLTProcessor"
+ <role name="org.apache.excalibur.xml.xslt.XSLTProcessor"
shorthand="xslt-processor"
- default-class="org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl"/>
+ default-class="org.apache.excalibur.xml.xslt.XSLTProcessorImpl"/>
- <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
+ <role name="org.apache.excalibur.xml.xpath.XPathProcessor"
shorthand="xpath-processor"
- default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
+ default-class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"/>
<!-- Stores:
-->
1.17 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/Logicsheet.java
Index: Logicsheet.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/Logicsheet.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Logicsheet.java 5 Dec 2002 09:48:53 -0000 1.16
+++ Logicsheet.java 22 Jan 2003 05:19:17 -0000 1.17
@@ -50,8 +50,8 @@
*/
package org.apache.cocoon.components.language.markup;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessor;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException;
+import org.apache.excalibur.xml.xslt.XSLTProcessor;
+import org.apache.excalibur.xml.xslt.XSLTProcessorException;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
1.2 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/components/xpath/XPathUtil.java
Index: XPathUtil.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xpath/XPathUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XPathUtil.java 15 Apr 2002 14:03:20 -0000 1.1
+++ XPathUtil.java 22 Jan 2003 05:19:18 -0000 1.2
@@ -89,7 +89,7 @@
* @return The node specified by the path.
* @throws ProcessingException If no path is specified or the XPath engine
fails.
*/
- public static Node
getSingleNode(org.apache.avalon.excalibur.xml.xpath.XPathProcessor processor,
+ public static Node getSingleNode(org.apache.excalibur.xml.xpath.XPathProcessor
processor,
Node rootNode,
String path)
throws ProcessingException {
@@ -212,7 +212,7 @@
* @return The first node found that matches the XPath, or null.
*
*/
- public static Node
searchSingleNode(org.apache.avalon.excalibur.xml.xpath.XPathProcessor processor,
+ public static Node
searchSingleNode(org.apache.excalibur.xml.xpath.XPathProcessor processor,
Node contextNode,
String str) {
String[] pathComponents = buildPathArray(str);
@@ -232,7 +232,7 @@
* @return A NodeList, should never be null.
*
*/
- public static NodeList
searchNodeList(org.apache.avalon.excalibur.xml.xpath.XPathProcessor processor,
+ public static NodeList
searchNodeList(org.apache.excalibur.xml.xpath.XPathProcessor processor,
Node contextNode,
String str) {
String[] pathComponents = buildPathArray(str);
1.15 +6 -6
xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObject.java
Index: XScriptObject.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObject.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- XScriptObject.java 14 Jan 2003 09:29:29 -0000 1.14
+++ XScriptObject.java 22 Jan 2003 05:19:18 -0000 1.15
@@ -56,13 +56,13 @@
import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessor;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException;
+import org.apache.excalibur.xml.xslt.XSLTProcessor;
+import org.apache.excalibur.xml.xslt.XSLTProcessorException;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.Source;
import org.apache.cocoon.xml.EmbeddedXMLPipe;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -158,9 +158,9 @@
/* The Source interface methods. */
public void toSAX(ContentHandler handler) throws SAXException {
- Parser parser = null;
+ SAXParser parser = null;
try {
- parser = (Parser) componentManager.lookup(Parser.ROLE);
+ parser = (SAXParser) componentManager.lookup(SAXParser.ROLE);
InputSource source = getInputSource();
parser.parse(source, handler);
} catch (SAXException e) {
1.14 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java
Index: StreamGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/StreamGenerator.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- StreamGenerator.java 14 Jan 2003 09:00:28 -0000 1.13
+++ StreamGenerator.java 22 Jan 2003 05:19:18 -0000 1.14
@@ -55,7 +55,7 @@
import org.apache.cocoon.ResourceNotFoundException;
import org.apache.cocoon.environment.http.HttpEnvironment;
import org.apache.cocoon.util.PostInputStream;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -116,7 +116,7 @@
*/
public void generate() throws IOException, SAXException, ProcessingException
{
- Parser parser = null;
+ SAXParser parser = null;
int len = 0;
String contentType = null;
try {
@@ -158,7 +158,7 @@
{
this.inputSource.setEncoding(charset);
}
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse(this.inputSource, super.xmlConsumer);
} catch (IOException e) {
getLogger().error("StreamGenerator.generate()", e);
1.9 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/generation/WebServiceProxyGenerator.java
Index: WebServiceProxyGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/generation/WebServiceProxyGenerator.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- WebServiceProxyGenerator.java 14 Jan 2003 09:00:28 -0000 1.8
+++ WebServiceProxyGenerator.java 22 Jan 2003 05:19:18 -0000 1.9
@@ -73,7 +73,7 @@
import org.apache.commons.httpclient.methods.UrlPostMethod;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -149,7 +149,7 @@
public void generate()
throws IOException, SAXException, ProcessingException
{
- Parser parser = null;
+ SAXParser parser = null;
try
{
if (this.getLogger().isDebugEnabled()) {
@@ -165,7 +165,7 @@
getLogger().debug( "processing Web Service Response " + remoteResponseXml
);
}
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
parser.parse(inputSource, super.xmlConsumer);
}
1.16 +1 -1
xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
Index: XMLResourceBundle.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XMLResourceBundle.java 10 Jan 2003 20:53:20 -0000 1.15
+++ XMLResourceBundle.java 22 Jan 2003 05:19:18 -0000 1.16
@@ -66,7 +66,7 @@
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
1.19 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
Index: CIncludeTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- CIncludeTransformer.java 15 Jan 2003 10:39:34 -0000 1.18
+++ CIncludeTransformer.java 22 Jan 2003 05:19:18 -0000 1.19
@@ -50,7 +50,7 @@
*/
package org.apache.cocoon.transformation;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.parameters.Parameters;
1.39 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- TraxTransformer.java 17 Jan 2003 23:47:19 -0000 1.38
+++ TraxTransformer.java 22 Jan 2003 05:19:18 -0000 1.39
@@ -50,8 +50,8 @@
*/
package org.apache.cocoon.transformation;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessor;
-import org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException;
+import org.apache.excalibur.xml.xslt.XSLTProcessor;
+import org.apache.excalibur.xml.xslt.XSLTProcessorException;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
1.16 +5 -5
xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
Index: XIncludeTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XIncludeTransformer.java 15 Jan 2003 10:39:34 -0000 1.15
+++ XIncludeTransformer.java 22 Jan 2003 05:19:18 -0000 1.16
@@ -57,7 +57,7 @@
import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.ProcessingException;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.xml.IncludeXMLConsumer;
@@ -65,7 +65,7 @@
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.xml.dom.DOMParser;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.Attributes;
@@ -314,9 +314,9 @@
this.manager.release((Component)parser);
}
} else {
- Parser parser = null;
+ SAXParser parser = null;
try {
- parser = (Parser)manager.lookup(Parser.ROLE);
+ parser = (SAXParser)manager.lookup(SAXParser.ROLE);
IncludeXMLConsumer xinclude_handler = new
IncludeXMLConsumer(super.contentHandler,super.lexicalHandler);
parser.parse(input, xinclude_handler);
} finally {
1.10 +4 -4 xml-cocoon2/src/java/org/apache/cocoon/xml/dom/DOMUtil.java
Index: DOMUtil.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/xml/dom/DOMUtil.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DOMUtil.java 17 Jan 2003 23:47:19 -0000 1.9
+++ DOMUtil.java 22 Jan 2003 05:19:19 -0000 1.10
@@ -52,11 +52,11 @@
import org.apache.excalibur.source.SourceParameters;
import org.apache.xpath.XPathAPI;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.xpath.XPathUtil;
import org.apache.cocoon.xml.IncludeXMLConsumer;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.excalibur.xml.sax.XMLizable;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
@@ -253,7 +253,7 @@
* has more than one root node. This xml is parsed by the
* specified parser instance and a DOM DocumentFragment is created.
*/
- public static DocumentFragment getDocumentFragment(Parser parser,
+ public static DocumentFragment getDocumentFragment(SAXParser parser,
Reader stream)
throws ProcessingException {
DocumentFragment frag = null;
1.8 +4 -4
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java
Index: SlideRepository.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideRepository.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SlideRepository.java 14 Jan 2003 09:29:28 -0000 1.7
+++ SlideRepository.java 22 Jan 2003 05:19:19 -0000 1.8
@@ -72,7 +72,7 @@
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.slide.common.EmbeddedDomain;
@@ -139,14 +139,14 @@
*/
public void initialize() throws Exception {
SourceResolver resolver = null;
- Parser parser = null;
+ SAXParser parser = null;
Source source = null;
Configuration configuration = null;
try {
resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
- parser = (Parser)this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
SAXConfigurationHandler confighandler = new SAXConfigurationHandler();
source = resolver.resolveURI(this.file);
1.8 +2 -2
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XPathSourceInspector.java
Index: XPathSourceInspector.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/impl/XPathSourceInspector.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XPathSourceInspector.java 15 Jan 2003 10:39:34 -0000 1.7
+++ XPathSourceInspector.java 22 Jan 2003 05:19:19 -0000 1.8
@@ -55,7 +55,7 @@
package org.apache.cocoon.components.source.impl;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
1.5 +4 -4
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/RequestAttributeGenerator.java
Index: RequestAttributeGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/RequestAttributeGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RequestAttributeGenerator.java 14 Jan 2003 09:29:28 -0000 1.4
+++ RequestAttributeGenerator.java 22 Jan 2003 05:19:19 -0000 1.5
@@ -58,7 +58,7 @@
import org.apache.avalon.framework.component.Component;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.http.HttpEnvironment;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -131,7 +131,7 @@
* @since 1.0
*/
public void generate() throws SAXException, ProcessingException {
- Parser parser = null;
+ SAXParser parser = null;
String parameter = parameters.getParameter(REQUEST_ATTRIBUTE_NAME,
REQUEST_ATTRIBUTE_NAME_DEFAULT);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Expecting xml data in request-attribute " +
parameter);
@@ -162,7 +162,7 @@
if (charset != null) {
inputSource.setEncoding(charset);
}
- parser = (Parser) this.manager.lookup(Parser.ROLE);
+ parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
parser.parse(inputSource, super.xmlConsumer);
} catch (Exception e) {
getLogger().error("Could not get parser", e);
1.10 +2 -2
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java
Index: XPathDirectoryGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/XPathDirectoryGenerator.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XPathDirectoryGenerator.java 15 Jan 2003 10:39:34 -0000 1.9
+++ XPathDirectoryGenerator.java 22 Jan 2003 05:19:19 -0000 1.10
@@ -50,7 +50,7 @@
*/
package org.apache.cocoon.generation;
-import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.ProcessingException;
1.16 +5 -5
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java
Index: Paginator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Paginator.java 14 Jan 2003 09:00:29 -0000 1.15
+++ Paginator.java 22 Jan 2003 05:19:20 -0000 1.16
@@ -74,7 +74,7 @@
import org.apache.excalibur.source.impl.validity.AggregatedValidity;
import org.apache.excalibur.source.impl.validity.TimeStampValidity;
import org.apache.excalibur.store.Store;
-import org.apache.excalibur.xml.sax.Parser;
+import org.apache.excalibur.xml.sax.SAXParser;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
@@ -96,7 +96,7 @@
public static final String PAGINATE_PREFIX_TOKEN = PAGINATE_PREFIX + ":";
private ComponentManager manager;
- private Parser parser;
+ private SAXParser parser;
private Store store;
private Source inputSource;
private Parameters par;
@@ -118,8 +118,8 @@
public void compose(ComponentManager manager) {
try {
this.manager = manager;
- getLogger().debug("Looking up " + Parser.ROLE);
- this.parser = (Parser) manager.lookup(Parser.ROLE);
+ getLogger().debug("Looking up " + SAXParser.ROLE);
+ this.parser = (SAXParser) manager.lookup(SAXParser.ROLE);
getLogger().debug("Looking up " + Store.ROLE + "/TransientStore");
this.store = (Store) manager.lookup(Store.ROLE + "/TransientStore");
} catch (Exception e) {
1.56 +4 -4 xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf
Index: cocoon.xconf
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- cocoon.xconf 15 Jan 2003 10:39:34 -0000 1.55
+++ cocoon.xconf 22 Jan 2003 05:19:20 -0000 1.56
@@ -27,7 +27,7 @@
class="org.apache.excalibur.xml.impl.XercesParser"
You will also need to add a system property to your JVM,
probably on the startup of your servlet engine like this:
- -Dorg.apache.excalibur.xml.sax.Parser=org.apache.excalibur.xml.impl.XercesParser
+
-Dorg.apache.excalibur.xml.sax.SAXParser=org.apache.excalibur.xml.impl.XercesParser
Configuration for the JaxpParser (not the XercesParser!):
- validate (boolean, default = false): This parameter causes the parser
@@ -120,7 +120,7 @@
<!-- Xpath Processor:
-->
- <xpath-processor class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"
logger="core.xpath-processor"/>
+ <xpath-processor class="org.apache.excalibur.xml.xpath.XPathProcessorImpl"
logger="core.xpath-processor"/>
<!-- URL Factory:
The url factory adds special url protocols to the system, they are then
@@ -165,8 +165,8 @@
<!-- The XMLizer converts different mime-types to XML -->
<xmlizer>
- <parser role="org.apache.excalibur.xml.sax.Parser/HTML"
mime-type="text/html"/>
- <parser role="org.apache.excalibur.xml.sax.Parser" mime-type="text/xml"/>
+ <parser role="org.apache.excalibur.xml.sax.SAXParser/HTML"
mime-type="text/html"/>
+ <parser role="org.apache.excalibur.xml.sax.SAXParser"
mime-type="text/xml"/>
</xmlizer>
<!-- Program Generator:
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]