List Info

Thread: Re: XSPectomy




Re: XSPectomy
country flaguser name
Switzerland
2008-02-08 05:43:18
Jörn Nettingsmeier schrieb:
> Andreas Hartmann wrote:
>> Jörn Nettingsmeier schrieb:
>>> nah.
>> If the patch for htt
ps://issues.apache.org/jira/browse/COCOON-2166 
>> proves useful (or we find another solution), this
will fortunately
>> not be necessary.
> 
> i just looked at the patch - if i understand it
correctly, it's really
> slick!
> 
> i'm not sure i understand vadim's comment, though:
> 
>> Vadim Gritsenko - 07/Feb/08 07:28 PM You should
differentiate the
>> case when source exists but not cacheable, and when
source does not
>> exist. Otherwise you will be caching what must not
be cached.
> 
> isn't that what
> 
>    return (newValidity == null) ? SourceValidity.VALID
>                                 :
SourceValidity.INVALID;

I think the problem is that "Source.getValidity() ==
null" doesn't tell 
you if the source doesn't exist or just can't be cached. IMO
the whole 
null value business is a PITA [1]. I'll try to find out if
it can 
determined if the source really doesn't exist.
Unfortunately, the 
SitemapSource doesn't seem to be very cooperative in this
regard. For 
our scenario the patch probably works, maybe we can use a 
special-purpose subclass of the InludeTransformer /
MultiSourceValidity.

-- Andreas


[1] http:/
/c2.com/cgi/wiki?NoNullBeyondMethodScope

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: XSPectomy
user name
2008-02-08 05:55:16
Andreas Hartmann wrote:
> Jörn Nettingsmeier schrieb:
>> i'm not sure i understand vadim's comment, though:
>>
>>> Vadim Gritsenko - 07/Feb/08 07:28 PM You should
differentiate the
>>> case when source exists but not cacheable, and
when source does not
>>> exist. Otherwise you will be caching what must
not be cached.
>>
>> isn't that what
>>
>>    return (newValidity == null) ?
SourceValidity.VALID
>>                                 :
SourceValidity.INVALID;
> 
> I think the problem is that "Source.getValidity()
== null" doesn't tell
> you if the source doesn't exist or just can't be
cached.

ah, ok. i thought null meant "does not exist", and
for all existing
sources, there'd be a validity object that would indicate if
it's
cacheable or not...

> IMO the whole
> null value business is a PITA [1]. I'll try to find out
if it can
> determined if the source really doesn't exist.
Unfortunately, the
> SitemapSource doesn't seem to be very cooperative in
this regard. For
> our scenario the patch probably works,

maybe, but it's a huge potential bug....

> maybe we can use a
> special-purpose subclass of the InludeTransformer /
MultiSourceValidity.

not so nice imho - let's keep close to cocoon. this feature
would make
sense for others as well, so it should go upstream. maybe
the thread you
started on cocoon-dev turns up something useful..


-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000
lines of code."
  - Ken Thompson.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )