cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@vern.chem.tu-berlin.de>
Subject Sources, Components and cocoon.xmap
Date Tue, 07 May 2002 16:30:49 GMT
Hi,

It is possible for components in the cocoon.xmap to get source over
the SourceResolver from the sitemap.

cocoon.xconf:
 <component role=".." class=".." logger="..">
  <entry source="cocoon://..."/>
 </component>

My second question is about the validity of sources. Is this
the correct way to test if a file has changed?

resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
source = resolver.resolveURI("file://...");

[...after a time delay..]

if (!source.getValidity().isValid())
{
  // For a new source, if the file has changed
  source = resolver.resolveURI(reference);
  [ do something ]
}

Tanks, Stephan Michels.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message