You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ro...@elastica.com on 2000/10/25 20:10:03 UTC
Having problems with Cocoon
Ok so I have a RequestProducer who's getStream looks like this
public Reader getStream(HttpServletRequest request) throws IOException {
String urlString = request.getParameter("url");
if (urlString == null) return null;
URL url = new URL(urlString);
System.out.println("Got here");
System.out.println("Get path translated" +
request.getPathTranslated())\
;
return new InputStreamReader(url.openStream());
}
This works fine in that in Cocoon when I specify the following url
http://localhost:8080/cocoon/resume.xml?producer=com.elastica.cocoon.RequestPro\
ducer&url=http://www.elastica.com/resume.xml
I see my .xml in the browser.
So.... what I need to know is how I can get it to recognise my stylesheet.
I'm running Cocoon locally with Tomcat but the .xml and .xsl are on
another server.
So I see the following stylesheet reference in the .xml document
<?xml-stylesheet
href="http://www.elastica.com/resume-html.xsl" type="text/xsl"\
?>
Q: What is the href relative to? here I'm using an absolute url because
I'm doing this over the network.
and in my .xsl file I have.
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:processing-instruction name="cocoon-format">
type="text/html"
</xsl:processing-instruction>
however I get no information from Cocoon that suggests it's seeing my
.xsl file at all.