bloritsch 01/02/05 14:06:17
Modified: src Tag: xml-cocoon2 Manifest.mf
src/org/apache/cocoon/components/language/markup Tag:
xml-cocoon2 AbstractMarkupLanguage.java
src/org/apache/cocoon/transformation Tag: xml-cocoon2
XalanTransformer.java
Log:
Fixed XSP lookup errors.
Revision Changes Path
No revision
No revision
1.1.2.7 +1 -1 xml-cocoon/src/Manifest.mf
Index: Manifest.mf
===================================================================
RCS file: /home/cvs/xml-cocoon/src/Manifest.mf,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- Manifest.mf 2001/01/31 15:03:51 1.1.2.6
+++ Manifest.mf 2001/02/05 22:06:15 1.1.2.7
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Main-Class: org.apache.cocoon.Main
Class-Path: avalonapi.jar batik-all.jar bsf.jar fop-0_16_0.jar
- jakarta-regexp-1.2.jar jstyle.jar rhino.jar xalan_2_0_D07.jar
+ jakarta-regexp-1.2.jar jstyle.jar rhino.jar xalan-2.0.0.jar
xerces_1_2_3.jar xt.jar
Name: org/apache/cocoon/components/markup/sitemap/java/sitemap.xsl
No revision
No revision
1.1.2.23 +5 -9
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.22
retrieving revision 1.1.2.23
diff -u -r1.1.2.22 -r1.1.2.23
--- AbstractMarkupLanguage.java 2001/02/01 18:44:38 1.1.2.22
+++ AbstractMarkupLanguage.java 2001/02/05 22:06:16 1.1.2.23
@@ -44,7 +44,7 @@
* Base implementation of <code>MarkupLanguage</code>. This class uses
* logicsheets as the only means of code generation. Code generation should
be decoupled from this context!!!
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.22 $ $Date: 2001/02/01 18:44:38 $
+ * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/02/05 22:06:16 $
*/
public abstract class AbstractMarkupLanguage extends AbstractLoggable
implements MarkupLanguage, Composer, Configurable {
/** The supported language table */
@@ -271,14 +271,10 @@
getLogger().debug("This should never happen: codeGenerator
is null");
throw new SAXException("codeGenerator must never be null.");
}
- if (logicsheetLocation.indexOf(":/") < 0) { // Relative to
Cocoon root
- inputSource = entityResolver.resolveEntity(null,
logicsheetLocation);
- systemId = inputSource.getSystemId();
- } else { // Fully resolved URL
- systemId = logicsheetLocation;
- inputSource = new InputSource(systemId);
- }
- URL url = new URL(systemId);
+
+ URL url = NetUtils.getURL(logicsheetLocation);
+ inputSource = new InputSource(url.openStream());
+
String logicsheetName = url.toExternalForm();
CachedURL entry =
(CachedURL)this.logicsheetCache.get(logicsheetName);
Logicsheet logicsheet = null;
No revision
No revision
1.1.2.30 +9 -11
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.29
retrieving revision 1.1.2.30
diff -u -r1.1.2.29 -r1.1.2.30
--- XalanTransformer.java 2001/01/23 17:47:14 1.1.2.29
+++ XalanTransformer.java 2001/02/05 22:06:17 1.1.2.30
@@ -55,16 +55,17 @@
* (Apache Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1.2.29 $ $Date: 2001/01/23 17:47:14 $
+ * @version CVS $Revision: 1.1.2.30 $ $Date: 2001/02/05 22:06:17 $
*/
public class XalanTransformer extends ContentHandlerWrapper
implements Transformer, Composer, Poolable, Configurable {
+ private static String FILE = "file:/";
/** The store service instance */
private Store store = null;
/** The trax TransformerFactory */
- private SAXTransformerFactory tfactory = null;
+ private SAXTransformerFactory tfactory = (SAXTransformerFactory)
TransformerFactory.newInstance();
/** The trax TransformerHandler */
private TransformerHandler transformerHandler = null;
@@ -75,24 +76,21 @@
TransformerHandler getTransformerHandler(EntityResolver resolver, String
xsluri)
throws SAXException, ProcessingException, IOException,
TransformerConfigurationException
{
- // Initialize a shared Transformer factory instance.
- if(tfactory == null)
- tfactory = (SAXTransformerFactory)
TransformerFactory.newInstance();
-
- // Only local files are checked for midification for compatibility
reasons!
+ // Only local files are checked for modification for compatibility
reasons!
// Using the entity resolver we get the filename of the current file:
- // The systemID if such a resource starts with file:/.
+ // The systemID if such a resource starts with file://.
Templates templates = null;
InputSource src = resolver.resolveEntity(null, xsluri);
String systemID = src.getSystemId();
+
if (this.useCache == true)
{
// Is this a local file
- if (systemID.startsWith("file:/") == true) {
+ if (systemID.startsWith(FILE) == true) {
// Cached is an array of the template and the caching time
if (store.containsKey(xsluri) == true) {
Object[] templateAndTime = (Object[])store.get(xsluri);
- File xslFile = new File(systemID.substring(6));
+ File xslFile = new
File(systemID.substring(FILE.length()));
long cachedTime = ((Long)templateAndTime[1]).longValue();
if (cachedTime < xslFile.lastModified()) {
templates = null;
@@ -113,7 +111,7 @@
if (this.useCache == true)
{
// Is this a local file
- if (systemID.startsWith("file:/") == true) {
+ if (systemID.startsWith(FILE) == true) {
// Cached is an array of the template and the current
time
Object[] templateAndTime = new Object[2];
templateAndTime[0] = templates;