bloritsch 00/12/27 10:43:05
Modified: src/org/apache/cocoon/components/language/markup/xsp/java
Tag: xml-cocoon2 util.xsl
Log:
util:include-file works as long as you have an absolute path. The relative
path doesn't work because the ServletContext is not set.
Revision Changes Path
No revision
No revision
1.1.2.2 +10 -9
xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl
Index: util.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/util.xsl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- util.xsl 2000/12/22 18:08:58 1.1.2.1
+++ util.xsl 2000/12/27 18:43:04 1.1.2.2
@@ -68,6 +68,7 @@
<xsp:include>java.net.URL</xsp:include>
<xsp:include>java.util.Date</xsp:include>
<xsp:include>java.text.SimpleDateFormat</xsp:include>
+
<xsp:include>org.apache.cocoon.components.language.markup.xsp.XSPUtil</xsp:include>
</xsp:structure>
<xsl:apply-templates/>
@@ -135,7 +136,7 @@
URL __url = new URL(__name);
InputSource __is = new InputSource(__url.openStream());
__is.setSystemId(__url.toString());
- newParser = (Parser) this.manager.lookup(Roles.PARSER);
+ org.apache.cocoon.components.parser.Parser newParser =
(org.apache.cocoon.components.parser.Parser) this.manager.lookup(Roles.PARSER);
XSPUtil.include(__is, this.contentHandler, newParser);
} catch (Exception e) {
@@ -162,13 +163,13 @@
new FileReader(
XSPUtil.relativeFilename(
<xsl:copy-of select="$name"/>,
- request,
- (ServletContext) context
+ this.request,
+ this.context
)
)
);
- __is.setSystemId(__url.toString());
- newParser = (Parser) this.manager.lookup(Roles.PARSER);
+
+ org.apache.cocoon.components.parser.Parser newParser =
(org.apache.cocoon.components.parser.Parser) this.manager.lookup(Roles.PARSER);
XSPUtil.include(__is, this.contentHandler, newParser);
} catch (Exception e) {
@@ -195,8 +196,8 @@
String.valueOf(<xsl:copy-of select="$expr"/>)
)
);
- __is.setSystemId(__url.toString());
- newParser = (Parser) this.manager.lookup(Roles.PARSER);
+
+ org.apache.cocoon.components.parser.Parser newParser =
(org.apache.cocoon.components.parser.Parser) this.manager.lookup(Roles.PARSER);
XSPUtil.include(__is, this.contentHandler, newParser);
} catch (Exception e) {
@@ -222,8 +223,8 @@
XSPUtil.getFileContents(
XSPUtil.relativeFilename(
String.valueOf(<xsl:copy-of select="$name"/>),
- request,
- (ServletContext) context
+ this.request,
+ this.context
), "<xsl:value-of select="@encoding"/>"
)
</xsp:expr>