giacomo 00/07/28 09:20:51
Modified: conf Tag: xml-cocoon2 sitemap.xmap
samples/documents Tag: xml-cocoon2 jakarta_apache_org.xml
samples/stylesheets Tag: xml-cocoon2
jakarta_apache_org-html.xsl simple-welcome2html.xsl
src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
src/org/apache/cocoon/components/language/markup/sitemap/java
Tag: xml-cocoon2 sitemap.xsl
src/org/apache/cocoon/environment Tag: xml-cocoon2
Environment.java
src/org/apache/cocoon/environment/http Tag: xml-cocoon2
HttpEnvironment.java
src/org/apache/cocoon/generation Tag: xml-cocoon2
AbstractGenerator.java AbstractServerPage.java
ComposerGenerator.java FileGenerator.java
src/org/apache/cocoon/matching Tag: xml-cocoon2
WildcardURIMatcherFactory.java
src/org/apache/cocoon/reading Tag: xml-cocoon2 Reader.java
src/org/apache/cocoon/sitemap Tag: xml-cocoon2
AbstractSitemap.java ResourcePipeline.java
SitemapHandler.java SitemapManager.java
src/org/apache/cocoon/transformation Tag: xml-cocoon2
XalanTransformer.java
Added: src/org/apache/cocoon/reading Tag: xml-cocoon2
AbstractReader.java ResourceReader.java
Removed: src/org/apache/cocoon Tag: xml-cocoon2 Request.java
Response.java
src/org/apache/cocoon/servlet Tag: xml-cocoon2
CocoonServletRequest.java
CocoonServletResponse.java
src/org/apache/cocoon/sitemap Tag: xml-cocoon2
AbstractSitemapComponent.java LinkResolver.java
LinkTranslator.java Matcher.java
Log:
Changes to some classes to make Cocoon 2 run out of the box
There is some problem with building the war file. Ant seems to
mess around with the images in the samle directory. They would
not display correctly in the browser. Copy the images
(banner.gif and cocoon.png) to the appropriete directory and
enjoy Cocoon 2 serving images and css files directly.
Revision Changes Path
No revision
No revision
1.1.2.4 +48 -35 xml-cocoon/conf/Attic/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/xml-cocoon/conf/Attic/sitemap.xmap,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- sitemap.xmap 2000/07/27 21:49:47 1.1.2.3
+++ sitemap.xmap 2000/07/28 16:19:49 1.1.2.4
@@ -1,11 +1,11 @@
-<?xml version="1.0"?>
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-<!-- =========================== Components ================================
-->
-
- <map:components>
+<?xml version="1.0"?>
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+<!-- =========================== Components ================================
-->
+ <map:components>
+
<map:generators default="file">
<map:generator name="file"
src="org.apache.cocoon.generation.FileGenerator"/>
<map:generator name="request"
src="org.apache.cocoon.generation.RequestGenerator"/>
@@ -23,7 +23,8 @@
<map:transformer name="xinclude"
src="org.apache.cocoon.transformation.XIncludeTransformer"/>
</map:transformers>
- <map:readers default="binary">
+ <map:readers default="resource">
+ <map:reader name="resource"
src="org.apache.cocoon.reading.ResourceReader"/>
</map:readers>
<map:serializers default="html">
@@ -32,31 +33,31 @@
<map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FO2PDFSerializer"/>
<map:serializer name="svg2jpg"
src="org.apache.cocoon.serialization.SVGSerializer"/>
<map:serializer name="image"
src="org.apache.cocoon.serialization.ImageSerializer"/>
- </map:serializers>
-
- <map:selectors default="browser">
- </map:selectors>
-
- <map:matchers default="uri-regexp">
- <map:matcher name="uri-regexp"
factory="org.apache.cocoon.matching.RegexpURIMatcherFactory"/>
- </map:matchers>
-
- </map:components>
-
-<!-- =========================== Views ===================================
-->
-
- <map:views>
- </map:views>
-
-<!-- =========================== Resources =================================
-->
-
- <map:resources>
- </map:resources>
+ </map:serializers>
+
+ <map:selectors default="browser">
+ </map:selectors>
+
+ <map:matchers default="uri-regexp">
+ <map:matcher name="uri-regexp"
factory="org.apache.cocoon.matching.RegexpURIMatcherFactory"/>
+ </map:matchers>
+
+ </map:components>
+
+<!-- =========================== Views ===================================
-->
+
+ <map:views>
+ </map:views>
+
+<!-- =========================== Resources =================================
-->
+
+ <map:resources>
+ </map:resources>
<!-- =========================== Pipelines =================================
-->
- <map:pipelines>
- <map:pipeline>
+ <map:pipelines>
+ <map:pipeline>
<map:match pattern="^welcome$">
<map:generate src="documents/welcome.xml"/>
@@ -88,6 +89,18 @@
</map:serialize>
</map:match>
+ <map:match pattern="^(.*).css$">
+ <map:read src="{1}.css" mime-type="text/css"/>
+ </map:match>
+
+ <map:match pattern="^resources/(.*).gif$">
+ <map:read src="resources/images/{1}.gif" mime-type="image/gif"/>
+ </map:match>
+
+ <map:match pattern="^resources/(.*).png$">
+ <map:read src="resources/images/{1}.png" mime-type="image/png"/>
+ </map:match>
+
<map:match pattern="^simple_dynamic_page$">
<map:generate type="serverpages"
src="documents/simple-dynamic-page.xsp"/>
<map:transform src="stylesheets/dynamic-page2html.xsl"/>
@@ -112,9 +125,9 @@
</map:serialize>
</map:match>
- </map:pipeline>
- </map:pipelines>
+ </map:pipeline>
+ </map:pipelines>
-</map:sitemap>
-
-<!-- end of file -->
+</map:sitemap>
+
+<!-- end of file -->
No revision
No revision
1.1.2.2 +1 -0 xml-cocoon/samples/documents/Attic/jakarta_apache_org.xml
Index: jakarta_apache_org.xml
===================================================================
RCS file:
/home/cvs/xml-cocoon/samples/documents/Attic/jakarta_apache_org.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- jakarta_apache_org.xml 2000/06/06 23:19:59 1.1.2.1
+++ jakarta_apache_org.xml 2000/07/28 16:19:52 1.1.2.2
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<page title="The Jakarta Project">
+ <logo href="resources/banner.gif"/>
<sidebar>
<group name="Essentials">
<link href="index.html">Front Page</link>
No revision
No revision
1.1.2.2 +11 -1
xml-cocoon/samples/stylesheets/Attic/jakarta_apache_org-html.xsl
Index: jakarta_apache_org-html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/samples/stylesheets/Attic/jakarta_apache_org-html.xsl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- jakarta_apache_org-html.xsl 2000/06/06 23:20:04 1.1.2.1
+++ jakarta_apache_org-html.xsl 2000/07/28 16:19:54 1.1.2.2
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- Author: Stefano Mazzocchi "[EMAIL PROTECTED]" -->
-<!-- Version: $Id: jakarta_apache_org-html.xsl,v 1.1.2.1 2000/06/06 23:20:04
stefano Exp $ -->
+<!-- Version: $Id: jakarta_apache_org-html.xsl,v 1.1.2.2 2000/07/28 16:19:54
giacomo Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -13,6 +13,16 @@
<link rel="stylesheet" href="style.css"><!-- no not remove this comment
--></link>
</head>
<body bgcolor="#FFFFFF">
+ <table width="100%" border="0">
+ <tr>
+ <td>
+ <p>
+ <a href="welcome"><img src="{/page/logo/@href}"
+ alt="The Jakarta Project" border="0"/></a>
+ </p>
+ </td>
+ </tr>
+ </table>
<table width="100%" border="0" cellpadding="10" cellspacing="0">
<tr valign="top">
<xsl:apply-templates/>
1.1.2.2 +5 -5
xml-cocoon/samples/stylesheets/Attic/simple-welcome2html.xsl
Index: simple-welcome2html.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/samples/stylesheets/Attic/simple-welcome2html.xsl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- simple-welcome2html.xsl 2000/06/06 23:20:05 1.1.2.1
+++ simple-welcome2html.xsl 2000/07/28 16:19:55 1.1.2.2
@@ -9,16 +9,16 @@
</head>
<body bgcolor="#ffffff">
<p align="center">The Apache Software Foundation is proud to
present...</p>
-
+
<!-- Need to implement <read> in the sitemap before turning this on (SM)
-->
- <!-- <p align="center"><img border="0" src="{welcome/logo/@href}"/></p>
-->
-
+ <p align="center"><img border="0" src="{welcome/logo/@href}"/></p>
+
<h1 align="center"><xsl:value-of select="welcome/@title"/></h1>
-
+
<h3 align="center">version 2.0a1</h3>
<p><br/></p>
-
+
<xsl:apply-templates/>
<p align="center">
No revision
No revision
1.4.2.16 +5 -11 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.15
retrieving revision 1.4.2.16
diff -u -r1.4.2.15 -r1.4.2.16
--- Cocoon.java 2000/07/27 21:48:31 1.4.2.15
+++ Cocoon.java 2000/07/28 16:20:00 1.4.2.16
@@ -32,7 +32,7 @@
import org.apache.cocoon.serialization.Serializer;
import org.apache.cocoon.sitemap.SitemapManager;
-import org.xml.sax.EntityResolver;
+//import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -40,7 +40,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.4.2.15 $ $Date: 2000/07/27 21:48:31 $
+ * @version CVS $Revision: 1.4.2.16 $ $Date: 2000/07/28 16:20:00 $
*/
public class Cocoon
implements Component, Configurable, ComponentManager, Modifiable,
@@ -146,7 +146,6 @@
Configuration co=(Configuration)e.nextElement();
String ro=co.getAttribute("role");
String cl=co.getAttribute("class");
- System.out.println("Adding component: "+ro);
this.components.put(ro,this.getClass(cl,co));
this.configurations.put(ro,co);
}
@@ -158,7 +157,6 @@
this.sitemapManager.setComponentManager(this);
this.sitemapManager.setConfiguration(conf);
this.sitemapFileName = sconf.getAttribute("file");
- System.out.println("The root sitemap is located at
\""+this.sitemapFileName+"\"");
}
/**
@@ -175,13 +173,9 @@
*/
public boolean process(Environment environment, OutputStream out)
throws Exception {
- String s =
environment.resolveEntity(this.sitemapFileName).getSystemId();
- if (s.startsWith("file:")) {
- if (s.startsWith("file://"))
- s = s.substring(7);
- else
- s = s.substring(5);
- }
+ String s =
environment.resolveEntity(null,this.sitemapFileName).getSystemId();
+ URL url = new URL (s);
+ s = url.getFile();
return this.sitemapManager.invoke (environment, "",
s, true, out);
}
No revision
No revision
1.1.2.16 +30 -8
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.15
retrieving revision 1.1.2.16
diff -u -r1.1.2.15 -r1.1.2.16
--- sitemap.xsl 2000/07/27 21:48:46 1.1.2.15
+++ sitemap.xsl 2000/07/28 16:20:06 1.1.2.16
@@ -2,7 +2,7 @@
<!-- Sitemap Core logicsheet for the Java language -->
<!--
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.15 $ $Date: 2000/07/27 21:48:46 $
+ * @version CVS $Revision: 1.1.2.16 $ $Date: 2000/07/28 16:20:06 $
-->
<xsl:stylesheet
@@ -347,6 +347,7 @@
<xsl:with-param name="default-component"
select="/map:sitemap/map:components/map:serializers/@default"/>
<xsl:with-param name="method">setSerializer</xsl:with-param>
<xsl:with-param name="prefix">serializer</xsl:with-param>
+ <xsl:with-param name="mime-type" select="@mime-type"/>
</xsl:call-template>
return pipeline.process (environment, out);
</xsl:template> <!-- match="map:serialize" -->
@@ -356,6 +357,7 @@
<xsl:with-param name="default-component"
select="/map:sitemap/map:components/map:readers/@default"/>
<xsl:with-param name="method">setReader</xsl:with-param>
<xsl:with-param name="prefix">reader</xsl:with-param>
+ <xsl:with-param name="mime-type" select="@mime-type"/>
</xsl:call-template>
return pipeline.process (environment, out);
</xsl:template> <!-- match="map:read" -->
@@ -493,6 +495,7 @@
<xsl:param name="default-component"/>
<xsl:param name="method"/>
<xsl:param name="prefix"/>
+ <xsl:param name="mime-type"/>
<xsl:variable name="component-type">
<xsl:call-template name="get-parameter">
<xsl:with-param name="parname">type</xsl:with-param>
@@ -521,15 +524,34 @@
<xsl:apply-templates select="parameter"/>
<xsl:choose>
<xsl:when test="$component-source='null'">
- pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
- null, <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
- <xsl:value-of select="$component-param"/>);
+ <xsl:choose>
+ <xsl:when test="$mime-type!=''">
+ pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
+ null, <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
+ <xsl:value-of select="$component-param"/>,"<xsl:value-of
select="$mime-type"/>");
+ </xsl:when>
+ <xsl:otherwise>
+ pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
+ null, <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
+ <xsl:value-of select="$component-param"/>);
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
- pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
- substitute(listOfLists,"<xsl:value-of
select="$component-source"/>"),
- <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
- <xsl:value-of select="$component-param"/>);
+ <xsl:choose>
+ <xsl:when test="$mime-type!=''">
+ pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
+ substitute(listOfLists,"<xsl:value-of
select="$component-source"/>"),
+ <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
+ <xsl:value-of select="$component-param"/>,"<xsl:value-of
select="$mime-type"/>");
+ </xsl:when>
+ <xsl:otherwise>
+ pipeline.<xsl:value-of select="$method"/> (<xsl:value-of
select="$prefix"/>_<xsl:value-of select="$component-type"/>,
+ substitute(listOfLists,"<xsl:value-of
select="$component-source"/>"),
+ <xsl:value-of select="$prefix"/>_config_<xsl:value-of
select="$component-type"/>,
+ <xsl:value-of select="$component-param"/>);
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
No revision
No revision
1.1.2.5 +1 -0
xml-cocoon/src/org/apache/cocoon/environment/Attic/Environment.java
Index: Environment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/environment/Attic/Environment.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- Environment.java 2000/07/27 21:48:58 1.1.2.4
+++ Environment.java 2000/07/28 16:20:10 1.1.2.5
@@ -19,4 +19,5 @@
throws MalformedURLException;
public String getView ();
public String getUri ();
+ public void setContentType (String mimeType);
}
No revision
No revision
1.1.2.6 +18 -22
xml-cocoon/src/org/apache/cocoon/environment/http/Attic/HttpEnvironment.java
Index: HttpEnvironment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/environment/http/Attic/HttpEnvironment.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- HttpEnvironment.java 2000/07/27 21:48:58 1.1.2.5
+++ HttpEnvironment.java 2000/07/28 16:20:14 1.1.2.6
@@ -58,19 +58,13 @@
this.req = new HttpRequest (req, this);
this.res = new HttpResponse (res);
this.servletContext = servletContext;
- System.out.println ("HttpEnvironment: Context path is
\""+req.getContextPath()+"\"");
- System.out.println ("HttpEnvironment: Servlet path is
\""+req.getServletPath()+"\"");
- System.out.println ("HttpEnvironment: Translated path is
\""+req.getPathTranslated()+"\"");
- System.out.println ("HttpEnvironment: Real path is
\""+servletContext.getRealPath("/")+"\"");
this.context = new URL("file://"+servletContext.getRealPath("/"));
- System.out.println ("HttpEnvironment: Context path is
\""+servletContext.getRealPath("/")+"\"");
}
/**
* Adds an prefix to the overall stripped off prefix from the request uri
*/
public void changeContext(String prefix, String context)
throws MalformedURLException {
- System.out.println ("Environment:
addUriPrefix(\""+prefix+"\",\""+context+"\")");
if (uri.startsWith (prefix)) {
this.prefix.append (prefix);
uri = uri.substring(prefix.length());
@@ -79,11 +73,9 @@
this.context=f.getParentFile().toURL();
else
this.context = f.toURL();
- System.out.println ("HttpEnvironment: New context path set to
\""+this.context+"\"");
} else {
//FIXME: should we throw an error here ?
}
- System.out.println ("Environment: addUriPrefix: new
uri=\""+this.uri+"\", new context=\""+this.context+"\")");
}
/**
@@ -97,38 +89,42 @@
* Returns the uri in progress. The prefix is stripped off
*/
public String getUri () {
- System.out.println ("Environment: getUri = \""+this.uri+"\"");
return this.uri;
}
/**
- * Returns a wrapped HttpRequest object of the real HttpRequest in
progress
+ * Returns a wrapped HttpResponse object of the real HttpServletResponse
in progress
*/
+ public HttpResponse getResponse () {
+ return this.res;
+ }
+
+ /**
+ * Returns a wrapped HttpRequest object of the real HttpServletRequest
in progress
+ */
public HttpRequest getRequest () {
return this.req;
}
/**
- * Returns a wrapped HttpResponse object of the real HttpResponse in
progress
+ * Set the ContentType
*/
- public HttpResponse getResponse () {
- return this.res;
+ public void setContentType (String contentType) {
+ this.res.setContentType (contentType);
}
-
- /**
- * Resolve an entity.
- */
- public InputSource resolveEntity(String systemId)
- throws SAXException, IOException {
- return(this.resolveEntity(null,systemId));
- }
+
+ /**
+ * Returns the ServletContext in progress
+ */
+ public ServletContext getContext () {
+ return this.servletContext;
+ }
/**
* Resolve an entity.
*/
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException {
- System.out.println ("Environment:
resolveEntity(\""+publicId+"\",\""+systemId+"\")");
if (systemId==null) throw new SAXException("Invalid System ID");
if (systemId.length()==0)
No revision
No revision
1.1.2.3 +39 -39
xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractGenerator.java
Index: AbstractGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractGenerator.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- AbstractGenerator.java 2000/07/22 20:41:46 1.1.2.2
+++ AbstractGenerator.java 2000/07/28 16:20:16 1.1.2.3
@@ -1,39 +1,39 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
-package org.apache.cocoon.generation;
-
-import org.apache.avalon.utils.Parameters;
-import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.xml.AbstractXMLProducer;
-
-/**
- *
- * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
- * (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/22 20:41:46 $
- */
-public abstract class AbstractGenerator extends AbstractXMLProducer
-implements Generator {
-
- /** The current <code>Environment</code>. */
- protected Environment environment=null;
- /** The current <code>Parameters</code>. */
- protected Parameters parameters=null;
- /** The source URI associated with the request or <b>null</b>. */
- protected String source=null;
-
- /**
- * Set the <code>Environment</code> and sitemap
- * <code>Parameters</code> used to process the request.
- */
- public void setup(Environment environment, String src, Parameters par) {
- this.environment=environment;
- this.source=src;
- this.parameters=par;
- }
-}
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
*
+ * -------------------------------------------------------------------------
*
+ * This software is published under the terms of the Apache Software License
*
+ * version 1.1, a copy of which has been included with this distribution in
*
+ * the LICENSE file.
*
+
*****************************************************************************/
+package org.apache.cocoon.generation;
+
+import org.apache.avalon.utils.Parameters;
+import org.apache.cocoon.environment.Environment;
+import org.apache.cocoon.xml.AbstractXMLProducer;
+
+/**
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
+ * (Apache Software Foundation, Exoffice Technologies)
+ * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/28 16:20:16 $
+ */
+public abstract class AbstractGenerator extends AbstractXMLProducer
+implements Generator {
+
+ /** The current <code>Environment</code>. */
+ protected Environment environment=null;
+ /** The current <code>Parameters</code>. */
+ protected Parameters parameters=null;
+ /** The source URI associated with the request or <b>null</b>. */
+ protected String source=null;
+
+ /**
+ * Set the <code>Environment</code> and sitemap
+ * <code>Parameters</code> used to process the request.
+ */
+ public void setup(Environment environment, String src, Parameters par) {
+ this.environment=environment;
+ this.source=src;
+ this.parameters=par;
+ }
+}
1.1.2.3 +4 -3
xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java
Index: AbstractServerPage.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- AbstractServerPage.java 2000/07/22 20:41:46 1.1.2.2
+++ AbstractServerPage.java 2000/07/28 16:20:17 1.1.2.3
@@ -10,7 +10,8 @@
import org.apache.avalon.Modifiable;
import java.io.File;
-import org.apache.cocoon.Request;
+//import org.apache.cocoon.Request;
+import org.apache.cocoon.environment.Environment;
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.SAXException;
@@ -20,7 +21,7 @@
* declares variables that must be explicitly initialized by code generators.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/22 20:41:46 $
+ * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/28 16:20:17 $
*/
public abstract class AbstractServerPage
extends ComposerGenerator
@@ -75,7 +76,7 @@
* dynamically generated content has changed
* @return Whether content has changes for this request's data
*/
- public boolean hasContentChanged(Request request) {
+ public boolean hasContentChanged(Environment environment) {
return true;
}
1.1.2.4 +1 -3
xml-cocoon/src/org/apache/cocoon/generation/Attic/ComposerGenerator.java
Index: ComposerGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/ComposerGenerator.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- ComposerGenerator.java 2000/07/27 21:49:00 1.1.2.3
+++ ComposerGenerator.java 2000/07/28 16:20:18 1.1.2.4
@@ -15,7 +15,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/27 21:49:00 $
+ * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/28 16:20:18 $
*/
public abstract class ComposerGenerator extends AbstractGenerator
implements Composer {
@@ -29,7 +29,5 @@
*/
public void setComponentManager(ComponentManager manager) {
this.manager=manager;
-System.out.println ("ComposerGenerator.setComponentManager: manager is "
-+((this.manager == null)?"null":"set"));
}
}
1.1.2.5 +2 -2
xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java
Index: FileGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- FileGenerator.java 2000/07/27 21:49:00 1.1.2.4
+++ FileGenerator.java 2000/07/28 16:20:18 1.1.2.5
@@ -16,7 +16,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/27 21:49:00 $
+ * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/07/28 16:20:18 $
*/
public class FileGenerator extends ComposerGenerator {
@@ -28,6 +28,6 @@
Parser parser=(Parser)this.manager.getComponent("parser");
parser.setContentHandler(this.contentHandler);
parser.setLexicalHandler(this.lexicalHandler);
- parser.parse(super.environment.resolveEntity(this.source));
+ parser.parse(super.environment.resolveEntity(null,this.source));
}
}
No revision
No revision
1.1.2.7 +1 -16
xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java
Index: WildcardURIMatcherFactory.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- WildcardURIMatcherFactory.java 2000/07/27 21:49:03 1.1.2.6
+++ WildcardURIMatcherFactory.java 2000/07/28 16:20:24 1.1.2.7
@@ -19,7 +19,7 @@
* for request URIs
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/07/27 21:49:03 $
+ * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/07/28 16:20:24 $
*/
public class WildcardURIMatcherFactory /*extends PatternTranslator*/
implements MatcherFactory {
@@ -151,19 +151,4 @@
expr[y]=MATCH_END;
return(expr);
}
-
- /** Testing */
- public static void main(String argv[]) {
- try {
- if (argv.length<1) return;
- System.out.println("Matching Expr. \""+argv[0]+"\"");
- WildcardURIMatcherFactory wm = new WildcardURIMatcherFactory();
- System.out.println(wm.generateClassSource ("", argv[0], null));
- System.out.println(wm.generateMethodSource ("", argv[0], null));
- } catch (Exception e) {
- System.out.println(e.getClass().getName());
- System.out.println(e.getMessage());
- }
- }
-
}
No revision
No revision
1.1.2.2 +30 -30
xml-cocoon/src/org/apache/cocoon/reading/Attic/Reader.java
Index: Reader.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/Reader.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- Reader.java 2000/07/22 22:40:55 1.1.2.1
+++ Reader.java 2000/07/28 16:20:31 1.1.2.2
@@ -1,30 +1,30 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
-package org.apache.cocoon.reading;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.sitemap.SitemapComponent;
-
-import org.xml.sax.SAXException;
-
-/**
- *
- * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/22 22:40:55 $
- */
-public interface Reader extends SitemapComponent {
-
- /**
- * Set the <code>OutputStream</code> where the XML should be serialized.
- */
- public void setOutputStream(OutputStream out);
- public void generate() throws IOException, ProcessingException;
-}
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
*
+ * -------------------------------------------------------------------------
*
+ * This software is published under the terms of the Apache Software License
*
+ * version 1.1, a copy of which has been included with this distribution in
*
+ * the LICENSE file.
*
+
*****************************************************************************/
+package org.apache.cocoon.reading;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.sitemap.SitemapComponent;
+
+import org.xml.sax.SAXException;
+
+/**
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
+ * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/28 16:20:31 $
+ */
+public interface Reader extends SitemapComponent {
+
+ /**
+ * Set the <code>OutputStream</code> where the XML should be serialized.
+ */
+ public void setOutputStream(OutputStream out);
+ public void generate() throws IOException, ProcessingException;
+}
No revision
No revision
1.1.2.1 +36 -0
xml-cocoon/src/org/apache/cocoon/reading/Attic/AbstractReader.java
1.1.2.1 +72 -0
xml-cocoon/src/org/apache/cocoon/reading/Attic/ResourceReader.java
No revision
No revision
1.1.2.3 +1 -2
xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java
Index: AbstractSitemap.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemap.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- AbstractSitemap.java 2000/07/27 21:49:05 1.1.2.2
+++ AbstractSitemap.java 2000/07/28 16:20:38 1.1.2.3
@@ -28,7 +28,7 @@
* Base class for generated <code>Sitemap</code> classes
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/27 21:49:05 $
+ * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/28 16:20:38 $
*/
public abstract class AbstractSitemap
implements Sitemap {
@@ -46,7 +46,6 @@
* <code>Composer</code>.
*/
public void setComponentManager(ComponentManager manager) {
-System.out.println ("AbstractSitemap.setComponentManager manager =
"+(manager==null?"null":"set"));
this.manager=manager;
}
1.1.2.9 +20 -7
xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java
Index: ResourcePipeline.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- ResourcePipeline.java 2000/07/27 21:49:05 1.1.2.8
+++ ResourcePipeline.java 2000/07/28 16:20:41 1.1.2.9
@@ -30,7 +30,7 @@
/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.8 $ $Date: 2000/07/27 21:49:05 $
+ * @version CVS $Revision: 1.1.2.9 $ $Date: 2000/07/28 16:20:41 $
*/
public class ResourcePipeline implements Composer {
private Generator generator = null;
@@ -39,12 +39,14 @@
private Reader reader = null;
private Parameters readerParam = null;
private String readerSource = null;
+ private String readerMimeType = null;
private Vector transformers = new Vector();
private Vector transformerParams = new Vector();
private Vector transformerSources = new Vector();
private Serializer serializer = null;
private Parameters serializerParam = null;
private String serializerSource = null;
+ private String serializerMimeType = null;
/** the component manager */
private ComponentManager manager = null;
@@ -54,17 +56,11 @@
public void setComponentManager (ComponentManager manager) {
this.manager = manager;
-System.out.println ("ResourcePipeline.setComponentManager: manager is "
-+((this.manager == null)?"null":"set"));
}
public void setGenerator (Generator generator, String source,
Configuration conf, Parameters param)
throws InstantiationException, IllegalAccessException {
this.generator = (Generator)generator.getClass().newInstance();
-System.out.println ("ResourcePipeline.setGenerator: object is "
-+((this.generator instanceof Composer)?"a":"not a")+" Composer");
-System.out.println ("ResourcePipeline.setGenerator: manager is "
-+((this.manager == null)?"null":"set"));
if (this.generator instanceof Composer)
((Composer)this.generator).setComponentManager (manager);
if (this.generator instanceof Configurable)
@@ -76,6 +72,12 @@
public void setReader (Reader reader, String source,
Configuration conf, Parameters param)
throws InstantiationException, IllegalAccessException {
+ this.setReader (reader, source, conf, param, null);
+ }
+
+ public void setReader (Reader reader, String source,
+ Configuration conf, Parameters param, String
mimeType)
+ throws InstantiationException, IllegalAccessException {
this.reader = (Reader)reader.getClass().newInstance();
if (this.reader instanceof Composer)
((Composer)this.generator).setComponentManager (manager);
@@ -83,11 +85,18 @@
((Configurable)this.reader).setConfiguration (conf);
this.readerSource = source;
this.readerParam = param;
+ this.readerMimeType = mimeType;
}
public void setSerializer (Serializer serializer, String source,
Configuration conf, Parameters param)
throws InstantiationException, IllegalAccessException {
+ this.setSerializer (serializer, source, conf, param, null);
+ }
+
+ public void setSerializer (Serializer serializer, String source,
+ Configuration conf, Parameters param, String
mimeType)
+ throws InstantiationException, IllegalAccessException {
this.serializer = (Serializer)serializer.getClass().newInstance();
if (this.serializer instanceof Composer)
((Composer)this.generator).setComponentManager (manager);
@@ -114,6 +123,8 @@
throws ProcessingException, IOException,
SAXException {
if (generator == null) {
if (reader != null) {
+ if (readerMimeType != null)
+ environment.setContentType (readerMimeType);
reader.setup (environment, readerSource, readerParam);
reader.setOutputStream (out);
reader.generate();
@@ -137,6 +148,8 @@
producer = transformer;
}
+ if (serializerMimeType != null)
+ environment.setContentType (readerMimeType);
serializer.setup (environment, serializerSource,
serializerParam);
serializer.setOutputStream (out);
producer.setConsumer (serializer);
1.1.2.6 +3 -29
xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapHandler.java
Index: SitemapHandler.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapHandler.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- SitemapHandler.java 2000/07/27 21:49:05 1.1.2.5
+++ SitemapHandler.java 2000/07/28 16:20:42 1.1.2.6
@@ -28,7 +28,7 @@
* Handles the manageing and stating of one <code>Sitemap</code>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/07/27 21:49:05 $
+ * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/07/28 16:20:42 $
*/
public class SitemapHandler implements Runnable, Configurable, Composer {
@@ -65,17 +65,14 @@
}
protected SitemapHandler (String source, boolean check_reload) throws
FileNotFoundException {
- System.out.println("SitemapHandler: Instantiating sitemap
\""+source+"\"");
this.check_reload = check_reload;
String s = null;
-System.out.println("SitemapHandler: source=\""+source+"\"");
if (source.charAt(source.length()-1) == File.separatorChar) {
s = source+"sitemap.xmap";
this.sourceFile = new File (s);
} else {
sourceFile = new File (source);
if (!sourceFile.isFile()) {
-System.out.println("SitemapHandler: source=\""+source+"\" is not a file");
s = source+File.separatorChar+"sitemap.xmap";
sourceFile = new File (s);
}
@@ -83,12 +80,10 @@
throw new FileNotFoundException ("file "+s+" not found or
cannot be opened for reading");
}
}
- System.out.println("SitemapHandler: Instantiatet sitemap
\""+sourceFile.getPath()+"\"");
}
protected void throwError ()
throws ProcessingException, SAXException, IOException,
InterruptedException {
- System.out.println("SitemapHandler.throwError()");
Exception e = exception;
exception = null;
if (e instanceof ProcessingException) {
@@ -103,35 +98,27 @@
throw new ProcessingException ("Unknown Exception raised: "
+ exception.toString());
}
- System.out.println("SitemapHandler.throwError() no Exception to
throw");
}
protected boolean available () {
- System.out.println("SitemapHandler.available() =
"+(sitemap!=null?"true":"false"));
return (sitemap != null);
}
protected boolean hasChanged () {
- System.out.print("SitemapHandler.hasChanged() = ");
if (sitemap != null) {
if (check_reload) {
-
System.out.println((sitemap.modifiedSince(this.sourceFile.lastModified())?"true":"false"));
return sitemap.modifiedSince(this.sourceFile.lastModified());
}
- System.out.println("false");
return false;
}
- System.out.println("true");
return true;
}
protected boolean isRegenerating () {
- System.out.print("SitemapHandler.isRegenerating() =
"+(isRegenerationRunning?"true":"false"));
return isRegenerationRunning;
}
protected synchronized void regenerateAsynchroniously (Environment
environment) {
- System.out.println("SitemapHandler.regenerateAsynchroniously()");
if (!this.isRegenerationRunning) {
isRegenerationRunning = true;
regeneration = new Thread (this);
@@ -142,35 +129,28 @@
protected synchronized void regenerate (Environment environment)
throws ProcessingException, SAXException, IOException,
InterruptedException {
- System.out.println("SitemapHandler.regenerate()");
if (!this.isRegenerationRunning) {
- System.out.println("SitemapHandler.regenerate(): regenerating");
isRegenerationRunning = true;
regeneration = new Thread (this);
this.environment = environment;
regeneration.start();
- regeneration.join();
- throwError();
- } else {
- System.out.println("SitemapHandler.regenerate(): regenerating
already in progress");
}
+ regeneration.join();
+ throwError();
}
public boolean process (Environment environment, OutputStream out)
throws Exception {
- System.out.println("SitemapHandler.process()");
this.throwError();
return sitemap.process (environment, out);
}
/** Generate the Sitemap class */
public void run() {
- System.out.println("SitemapHandler.run()");
Sitemap smap = null;
InputSource inputSource = new InputSource (sourceFile.getPath());
String systemId = inputSource.getSystemId();
- System.out.println ("C2 generateSitemap: "+systemId);
File file = new File(systemId);
@@ -179,25 +159,19 @@
ProgramGenerator programGenerator = null;
- System.out.println ("C2 generateSitemap: obtaining
programGenerator");
programGenerator = (ProgramGenerator)
this.manager.getComponent("program-generator");
- System.out.println ("C2 generateSitemap: programGenerator obtained");
- System.out.println ("C2 generateSitemap: obtaining generator");
try {
smap = (Sitemap) programGenerator.load(file, markupLanguage,
programmingLanguage, environment);
- System.out.println ("C2 generateSitemap: generator obtained");
if (smap instanceof Composer)
smap.setComponentManager(this.manager);
if (smap instanceof Configurable)
smap.setConfiguration(this.conf);
this.sitemap = smap;
- System.out.println ("C2 generateSitemap: generator called");
} catch (Exception e) {
synchronized (this.exception) {
this.exception = e;
}
} finally {
- System.out.println("SitemapHandler.run(): finally");
regeneration = null;
environment = null;
isRegenerationRunning = false;
1.1.2.5 +1 -11
xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapManager.java
Index: SitemapManager.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/SitemapManager.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- SitemapManager.java 2000/07/27 21:49:05 1.1.2.4
+++ SitemapManager.java 2000/07/28 16:20:42 1.1.2.5
@@ -31,7 +31,7 @@
* checking regeneration of the sub <code>Sitemap</code>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/27 21:49:05 $
+ * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/07/28 16:20:42 $
*/
public class SitemapManager implements Configurable, Composer {
@@ -53,17 +53,13 @@
public void setComponentManager (ComponentManager manager) {
this.manager = manager;
-System.out.println ("SitemapManager.setComponentManager: manager is "
-+((this.manager == null)?"null":"set"));
}
public boolean invoke (Environment environment, String uri_prefix,
String source, boolean check_reload, OutputStream
out)
throws Exception {
SitemapHandler sitemapHandler = (SitemapHandler) sitemaps.get
(source);
- System.out.println
("SitemapManager.invoke(\""+uri_prefix+"\",\""+source+"\")");
if (sitemapHandler != null) {
- System.out.println ("SitemapManager.invoke: SitemapHandler
found");
sitemapHandler.throwError();
if (sitemapHandler.available()) {
if (check_reload
@@ -76,35 +72,29 @@
} else {
sitemapHandler.regenerate(environment);
}
- System.out.println ("SitemapManager.invoke: setting uri prefix");
environment.changeContext (uri_prefix, source);
return sitemapHandler.process (environment, out);
} else {
- System.out.println ("SitemapManager.invoke: instantiating
SitemapHandler");
sitemapHandler = new SitemapHandler(source, check_reload);
if (sitemapHandler instanceof Composer)
sitemapHandler.setComponentManager (this.manager);
if (sitemapHandler instanceof Configurable)
sitemapHandler.setConfiguration (this.conf);
sitemaps.put(source, sitemapHandler);
sitemapHandler.regenerate(environment);
- System.out.println ("SitemapManager.invoke: setting uri prefix");
environment.changeContext (uri_prefix, source);
return sitemapHandler.process (environment, out);
}
}
public boolean hasChanged () {
- System.out.print("SitemapManager.hasChanged() = ");
SitemapHandler sitemapHandler = null;
Enumeration enum = sitemaps.elements();
while (enum.hasMoreElements()) {
sitemapHandler = (SitemapHandler) enum.nextElement ();
if (sitemapHandler != null) {
-
System.out.println((sitemapHandler.hasChanged()?"true":"false"));
if (sitemapHandler.hasChanged())
return true;
}
}
- System.out.println("true");
return true;
}
}
No revision
No revision
1.1.2.4 +2 -2
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.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- XalanTransformer.java 2000/07/25 18:48:47 1.1.2.3
+++ XalanTransformer.java 2000/07/28 16:20:49 1.1.2.4
@@ -39,7 +39,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/25 18:48:47 $
+ * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/28 16:20:49 $
*/
public class XalanTransformer extends DocumentHandlerWrapper
implements Transformer, Composer {
@@ -67,7 +67,7 @@
StylesheetRoot stylesheet=null;
if (true) {
XSLTProcessor
loaderprocessor=XSLTProcessorFactory.getProcessor();
- InputSource xslsrc=environment.resolveEntity(xsluri);
+ InputSource xslsrc=environment.resolveEntity(null,xsluri);
XSLTInputSource style=new XSLTInputSource(xslsrc);
stylesheet=loaderprocessor.processStylesheet(style);
}