cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: XSLTProcessor
Date Wed, 23 May 2001 05:57:36 GMT
On Tue, 15 May 2001, Vijay Prabhakar wrote:

> 	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?

i can't say i'm terribly familiar with this bit of code. does your system
operate properly with this patch? what effect does it have on c1?

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message