Hi all,

I've been struggling a few days with adding a locale parameter to the local 
URLs in pages I serve. It should be really simple, just add the parameter to 
all hrefs that points to a resource within the site. I've tried to do it with 
XSLT through various approaches, but all unsuccessful, it is either very 
fragile string matching, too fragile to be useful, or too complicated, in 
that it breaks my architecture. 

However, I see that the EncodeURLTransformer is doing almost the same thing. 
It add a session-id parameter if it is doesn't exist, mine should add a 
locale parameter if it doesn't exist. 

EncodeURLTransformer are 400 lines of code though, some of which I don't 
understand, so I'm hesitant to hack based on it. For one thing, I don't 
understand if it restricts the URL rewriting to URLs that point to resources 
on the same site, and if so, how it does it.

So, I was wondering if someone has time to hold my hand while doing this? 
Also, this might be useful for the Cocoon project, as I think it is really 
important for LocaleAction to be useful, it's request feature is really quite 
useless without such a transformer. 

Please?


Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Direct: +47 6783 1136 | Mobile: +47 986 48 234
Email: [EMAIL PROTECTED]   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  Vollsveien 9, PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | 
Fax:+47 6783 1001


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to