cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@apache.org>
Subject Re: Rewriting links in js files
Date Tue, 06 Feb 2007 12:32:03 GMT
HI

If you are using Dojo, it can already do this on the client.

for instance :

	templatePath: dojo.uri.dojoUri("../viewr/templates/HtmlStory.html"),

Gives you a url relative to where Dojo loaded from.

HTH

regards Jeremy


On 1 Feb 2007, at 23:13, Grzegorz Kossakowski wrote:

> Hi,
>
> Yes, it's me n-th time ;)
>
> I would like to discuss link rewriting in js files and other text
> resources (css for example). Obviosuly, soon or later, there will be
> need (actually it already is, in Forms) to store some paths in JS  
> files.
> That means that we have to take care of rewriting links in this  
> kind of
> resources.
>
> My proposal is to introduce new reader for this task. It would scan
> whole content of file for valid URLs to rewrite, and do the job. I
> think, it could be easily achieved by use of some regexps. Of course,
> this new reader would implement caching because rewriting of some big
> files would be quite time-consuming.
>
> I haven't looked into the code of LinkRewritingTransformer so I'm not
> sure if it's code could be reused. Even if I had to write it from
> scratch I'm enough motivated but need to be sure that my work is not
> waste of time.
>
> Do you have any thoughts? Other options?
>
> -- 
> Grzegorz Kossakowski


Mime
View raw message