Doug Chestnut wrote:


Andreas Hartmann wrote:

Doug Chestnut wrote:

The SourceCacheImpl class uses the source uri for a key to the cached object. I believe that I have run into problems with this in the past with templated publications. fallback://config/ac/usecase-policies.xml can refer to a number of different files depending upon the publication from which it is being used, but it is used for the key to the cached object in SourceCacheImpl. This has the potential to produce unexpected results.



Yes, I guess you're right.

Should the SourceCache objects be publication specific (key of something like {pub}:fallback://config/ac/usecase-policies.xml)? I guess we could also just use the absolute url as a key for the cached object.



IMO the absolute URL approach is more appropriate for SoC reasons.
The problem with the {pub}:fallback:// approach is that the actual
URL might change (e.g. when a formerly missing file is added to the
current publication), so the fallback resolving has to happen each
time the source is requested.

Thanks for the pointer, would you mind filing a bug or even fix it?
It would be great to have a unit test to verify the problem and
its solution.

Sure, I will give it a try. (unit test / fix)
Well, I couldn't produce any problems with the SourceCache. It still seems suspect to me though.

Anyway, I forgot that the problems that I have experienced in the past have been related to the use-store parameter being set to true and using xsl:include and xsl:import elements with hrefs utilizing fallback or template-fallback sources (http://lenya.apache.org/1_4/reference/publication-templating/index.html#XSLT+Include+and+Import).

I use this patch to fix:
<xconf xpath="/cocoon/[EMAIL PROTECTED]'org.apache.excalibur.xml.xslt.XSLTProcessor/xalan']" remove="/cocoon/[EMAIL PROTECTED]'org.apache.excalibur.xml.xslt.XSLTProcessor/xalan']/[EMAIL PROTECTED]'use-store']">

    <parameter name="use-store" value="false"/>

</xconf>




--Doug


-- Andreas



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


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

Reply via email to