bloritsch 00/10/19 09:40:21
Modified: lib Tag: xml-cocoon2 xalan.jar
src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
src/org/apache/cocoon/components/language/markup Tag:
xml-cocoon2 AbstractMarkupLanguage.java
Logicsheet.java LogicsheetCodeGenerator.java
src/org/apache/cocoon/components/language/markup/sitemap/java
Tag: xml-cocoon2 sitemap.xsl
src/org/apache/cocoon/transformation Tag: xml-cocoon2
XalanTransformer.java
src/org/apache/cocoon/util Tag: xml-cocoon2 DOMUtils.java
Log:
Upgrade to the new XalanJ2. It fixes some package name references and
namespace issues.
Revision Changes Path
No revision
No revision
1.1.2.2 +2338 -2335xml-cocoon/lib/Attic/xalan.jar
<<Binary file>>
No revision
No revision
1.4.2.33 +2 -2 xml-cocoon/src/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.4.2.32
retrieving revision 1.4.2.33
diff -u -r1.4.2.32 -r1.4.2.33
--- Cocoon.java 2000/10/19 14:42:29 1.4.2.32
+++ Cocoon.java 2000/10/19 16:39:05 1.4.2.33
@@ -43,7 +43,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.4.2.32 $ $Date: 2000/10/19 14:42:29 $
+ * @version CVS $Revision: 1.4.2.33 $ $Date: 2000/10/19 16:39:05 $
*/
public class Cocoon
implements Component, Configurable, ComponentManager, Modifiable,
Processor, Constants {
@@ -97,7 +97,7 @@
String processor = System.getProperty(PROCESSOR_PROPERTY,
DEFAULT_PROCESSOR);
try {
- trax.Processor.setPlatformDefaultProcessor(processor);
+ org.apache.trax.Processor.setPlatformDefaultProcessor(processor);
this.components.put(Roles.PROCESSOR,
ClassUtils.loadClass(processor));
} catch (Exception e) {
throw new ConfigurationException("Error creating processor (" +
processor + ")");
No revision
No revision
1.1.2.10 +4 -4
xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/AbstractMarkupLanguage.java
Index: AbstractMarkupLanguage.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/AbstractMarkupLanguage.java,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- AbstractMarkupLanguage.java 2000/10/19 14:43:15 1.1.2.9
+++ AbstractMarkupLanguage.java 2000/10/19 16:39:20 1.1.2.10
@@ -28,9 +28,9 @@
import org.xml.sax.helpers.XMLFilterImpl;
import org.xml.sax.helpers.XMLReaderFactory;
-import trax.Processor;
-import trax.Transformer;
-import trax.Templates;
+import org.apache.trax.Processor;
+import org.apache.trax.Transformer;
+import org.apache.trax.Templates;
import org.apache.avalon.Composer;
import org.apache.avalon.Component;
@@ -51,7 +51,7 @@
* be decoupled from this context!!!
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.9 $ $Date: 2000/10/19 14:43:15 $
+ * @version CVS $Revision: 1.1.2.10 $ $Date: 2000/10/19 16:39:20 $
*/
public abstract class AbstractMarkupLanguage
implements MarkupLanguage, Composer, Configurable
1.1.2.5 +5 -11
xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/Logicsheet.java
Index: Logicsheet.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/Logicsheet.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- Logicsheet.java 2000/10/12 16:43:15 1.1.2.4
+++ Logicsheet.java 2000/10/19 16:39:23 1.1.2.5
@@ -32,10 +32,10 @@
import org.xml.sax.helpers.XMLReaderFactory;
-import trax.Templates;
-import trax.Processor;
-import trax.Transformer;
-import trax.TemplatesBuilder;
+import org.apache.trax.Templates;
+import org.apache.trax.Processor;
+import org.apache.trax.Transformer;
+import org.apache.trax.TemplatesBuilder;
/**
* A code-generation logicsheet. This class is actually a wrapper for
@@ -46,7 +46,7 @@
* This class should probably be based on an interface...
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/10/12 16:43:15 $
+ * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/10/19 16:39:23 $
*/
public class Logicsheet {
/**
@@ -257,12 +257,6 @@
originalNamepaces.put(prefix, uri);
super.startPrefixMapping(prefix, uri);
}
-
- public void startElement (String namespaceURI, String localName,
- String qName, Attributes atts) throws
SAXException {
- super.startElement(namespaceURI, localName, qName, atts);
- }
-
}
/**
1.1.2.5 +6 -6
xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/LogicsheetCodeGenerator.java
Index: LogicsheetCodeGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/Attic/LogicsheetCodeGenerator.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- LogicsheetCodeGenerator.java 2000/10/12 16:43:16 1.1.2.4
+++ LogicsheetCodeGenerator.java 2000/10/19 16:39:26 1.1.2.5
@@ -21,18 +21,18 @@
import java.io.IOException;
import org.xml.sax.SAXException;
-import serialize.SerializerFactory;
-import serialize.Method;
-import serialize.Serializer;
-import serialize.OutputFormat;
+import org.apache.serialize.SerializerFactory;
+import org.apache.serialize.Method;
+import org.apache.serialize.Serializer;
+import org.apache.serialize.OutputFormat;
-import trax.Transformer;
+import org.apache.trax.Transformer;
/**
* A logicsheet-based implementation of <code>MarkupCodeGenerator</code>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/10/12 16:43:16 $
+ * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/10/19 16:39:26 $
*/
public class LogicsheetCodeGenerator implements MarkupCodeGenerator {
No revision
No revision
1.1.2.50 +2 -4
xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
Index: sitemap.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
retrieving revision 1.1.2.49
retrieving revision 1.1.2.50
diff -u -r1.1.2.49 -r1.1.2.50
--- sitemap.xsl 2000/10/19 14:43:23 1.1.2.49
+++ sitemap.xsl 2000/10/19 16:39:44 1.1.2.50
@@ -70,7 +70,7 @@
* This is the automatically generated class from the sitemap definitions
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo
Pati</a>
- * @version CVS $Revision: 1.1.2.49 $ $Date: 2000/10/19 14:43:23 $
+ * @version CVS $Revision: 1.1.2.50 $ $Date: 2000/10/19 16:39:44 $
*/
public class <xsl:value-of select="@file-name"/> extends AbstractSitemap
{
static {
@@ -388,9 +388,7 @@
</xsl:variable>
<!-- get the name of this matcher in case it is defined in this sitemap
? -->
- <xsl:variable name="local-matcher">
- <xsl:value-of
select="/map:sitemap/map:components/map:matchers/map:[EMAIL PROTECTED]"/>
- </xsl:variable>
+ <xsl:variable name="local-matcher"
select="/map:sitemap/map:components/map:matchers/map:[EMAIL PROTECTED]"/>
<!-- check if this matcher is a factory ? -->
<xsl:variable name="is-factory">
No revision
No revision
1.1.2.15 +9 -14
xml-cocoon/src/org/apache/cocoon/transformation/Attic/XalanTransformer.java
Index: XalanTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/XalanTransformer.java,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -r1.1.2.14 -r1.1.2.15
--- XalanTransformer.java 2000/10/19 14:44:37 1.1.2.14
+++ XalanTransformer.java 2000/10/19 16:40:00 1.1.2.15
@@ -25,6 +25,7 @@
import org.apache.cocoon.Roles;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.store.Store;
+import org.apache.cocoon.util.DOMUtils;
import org.apache.cocoon.xml.XMLConsumer;
import org.apache.cocoon.xml.ContentHandlerWrapper;
@@ -36,11 +37,13 @@
import org.xml.sax.helpers.XMLReaderFactory;
import org.xml.sax.XMLReader;
+import org.apache.trax.Templates;
+import org.apache.trax.Processor;
/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1.2.14 $ $Date: 2000/10/19 14:44:37 $
+ * @version CVS $Revision: 1.1.2.15 $ $Date: 2000/10/19 16:40:00 $
*/
public class XalanTransformer extends ContentHandlerWrapper
implements Transformer, Composer, Poolable {
@@ -49,27 +52,19 @@
private Store store = null;
/** The XALAN Transformer */
- trax.Transformer transformer = null;
+ org.apache.trax.Transformer transformer = null;
/** Hash table for Templates */
private static Hashtable templatesCache = new Hashtable();
- private static trax.Transformer getTransformer(EntityResolver resolver,
String xsluri)
+ private static org.apache.trax.Transformer getTransformer(EntityResolver
resolver, String xsluri)
throws SAXException, ProcessingException, IOException
{
- trax.Templates templates =
(trax.Templates)templatesCache.get(xsluri);
+ Templates templates = (Templates)templatesCache.get(xsluri);
if(templates == null)
{
- trax.Processor processor =
- org.apache.cocoon.util.DOMUtils.getXSLTProcessor();
- XMLReader reader =
- XMLReaderFactory.createXMLReader();
- reader.setFeature("http://xml.org/sax/features/namespaces",
true);
- trax.TemplatesBuilder templatesBuilder =
- processor.getTemplatesBuilder();
- reader.setContentHandler (templatesBuilder);
- reader.parse(resolver.resolveEntity(null,xsluri));
- templates = templatesBuilder.getTemplates();
+ Processor processor = DOMUtils.getXSLTProcessor();
+ templates = processor.process(resolver.resolveEntity(null, xsluri));
templatesCache.put(xsluri,templates);
}
return templates.newTransformer();
No revision
No revision
1.1.2.5 +20 -15 xml-cocoon/src/org/apache/cocoon/util/Attic/DOMUtils.java
Index: DOMUtils.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/util/Attic/DOMUtils.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- DOMUtils.java 2000/10/12 16:44:09 1.1.2.4
+++ DOMUtils.java 2000/10/19 16:40:12 1.1.2.5
@@ -10,7 +10,10 @@
import java.util.Vector;
import java.util.Hashtable;
+import javax.xml.parsers.ParserConfigurationException;
+
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Document;
@@ -18,24 +21,25 @@
import org.w3c.dom.ProcessingInstruction;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXNotSupportedException;
import java.io.IOException;
import org.xml.sax.SAXException;
import java.net.MalformedURLException;
import java.util.NoSuchElementException;
-import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.xerces.parsers.DOMParser;
-import trax.Processor;
-import trax.Result;
-import trax.Transformer;
-import trax.Templates;
+import org.apache.trax.Processor;
+import org.apache.trax.ProcessorFactoryException;
+import org.apache.trax.Result;
+import org.apache.trax.Transformer;
+import org.apache.trax.Templates;
-import serialize.OutputFormat;
+import org.apache.serialize.OutputFormat;
import org.apache.xalan.templates.StylesheetRoot;
import org.apache.xalan.templates.Stylesheet;
@@ -46,23 +50,23 @@
* add (needed!) DOM support.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/10/12 16:44:09 $
+ * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/10/19 16:40:12 $
*/
public class DOMUtils {
/** reuse the trax.Processor instance */
- private static trax.Processor traxProcessor = null;
+ private static Processor traxProcessor = null;
/** reuse the DocumentBuilder instance */
private static DocumentBuilder docBuilder = null;
/**
- * Return a trax.Processor which can be used to process a style sheet.
+ * Return an org.apache.trax.Processor which can be used to process a
style sheet.
*
* @return The Processor instance.
*/
- public static trax.Processor getXSLTProcessor()
- throws trax.ProcessorFactoryException
+ public static Processor getXSLTProcessor()
+ throws ProcessorFactoryException
{
if(traxProcessor == null)
traxProcessor = Processor.newInstance("xslt");
@@ -75,7 +79,7 @@
* @return The DocumentBuilder instance.
*/
private static DocumentBuilder getDocumentBuilder()
- throws javax.xml.parsers.ParserConfigurationException
+ throws ParserConfigurationException
{
if(docBuilder == null)
{
@@ -112,7 +116,7 @@
throw(e);
}
} else {
- throw new org.xml.sax.SAXNotSupportedException("DOM node processing
not supported!");
+ throw new SAXNotSupportedException("DOM node processing not
supported!");
}
}
@@ -220,11 +224,12 @@
* @return A (possibly empty) vector containing all namespace declarations
* as a <code>String</code> array of 2 elements (attribue name,
uri)
*/
- public static Vector getNamespaces(trax.Templates templates)
+ public static Vector getNamespaces(Templates templates)
{
Vector vector = new Vector();
// FIXME: Need to figure out how to get the namespaces from Templates.
- // The following code throws an exception.
+ // The following code throws an exception.
+ // (SSA) this method should not be needed anymore, as XSP went SAX based.
/*
try
{