cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay Prabhakar" <Vijay.Prabha...@eoncompany.com>
Subject XSLTProcessor
Date Tue, 15 May 2001 19:56:46 GMT
	I was taking a look at the source for the XSLTProcessor in
Cocoon v1.8 and I noticed that it calls the Producer.getPath() method.
However, XSLTProcessor.getResource() gets the "path" variable, but
doesn't do anything with it.  I think it ought to be concatenating the
"href" attribute with it to create the appropriate path.  Here's a bit
of code to explain what I mean, starting at line 161 in
XSLTProcessor.java:



  String type = (String) attributes.get("type");
            if ((type != null) && (type.equals("text/xsl"))) {
                String url = (String) attributes.get("href");

                if (url != null) {
                    Object local = null;

					url = path+url;  // I added this
line

                    try {
                        if (url.charAt(0) == '/') {
                            local = new File(Utils.getRootpath(request,
context) + url);
                        } else if (url.indexOf("://") < 0) {
                            local = new File(Utils.getBasepath(request,
context) + url);
                        } else {
                            local = new URL(url);
                        }

Without the line I added, it seems like the path variable is ignored,
which seems to essentially ignore any values returned by
Producer.getPath().  I'm not 100% sure that I'm using Producer.getPath()
in the way that it ought to, but this fix seemed to make sense.  Any
comments?


vijay prabhakar
team lead
the eon company
www.eoncompany.com

o 212.401.5024
m 410.961.8404
e vijay.prabhakar@eoncompany.com


Mime
View raw message