cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: xslt parameter patch
Date Tue, 02 May 2000 21:37:42 GMT
Donald Ball <> wrote:

>On Tue, 2 May 2000, Robin Green wrote:
> > Thanx for the patch!
> >
> > Personally I prefer some indication of what has gone wrong. Also the 
> > of the parameter also needs to be checked. Here is a different patch 
> > checks both and gives some indication of errors (to someone who is 
> > their code).
>Couple of questions about your patch:
>1. why validate the value? It doesn't have to be a qname, right?

The value can't contain $ for instance, or at least that's what I've found.

>2. your patch doesn't exactly provide an indication that something went
>wrong, it just turns invalid qnames into "invalidXSLTstring". why not
>simply translate invalid characters into valid ones (e.g. all invalid
>characters into _)?

That would be better, I didn't have the time.

>personally, i think this is bad since you're allowing
>for name collision, but others might think it's an acceptable tradeoff.

Hey, it's a Hashtable! If you put two identical keys in it, it will ignore 
the second. No problem. The only purpose of putting in "invalidXSLTstring" 
was to signal an error.

>3. how _should_ you provide an indication that something went wrong (i
>agree that it would be nice)? most people would argue that this is a
>non-fatal error, so we shouldn't simply toss an exception and bail out. It
>would be nice if we could log a warning and continue. Doesn't cocoon-1.x
>have a logging facility now?

Yes indeed, getActor("logger") from your Director :-)

Like I say, it was a quick-and-dirty patch.


270+ Open Source Java links!

Get Your Private, Free E-mail from MSN Hotmail at

View raw message