cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ContentAggregator.java
Date Tue, 24 Apr 2001 19:22:18 GMT
>   - cleanup a bit.
>   - XIncludeSAXConnector needs Sitemap.
>    (I don't like this set of changes, but is there an alternative?)

yes, there is an alternative.

 <role name="org.apache.cocoon.components.language.generator.ServerPagesSelector"
       shorthand="server-pages"
       default-class="org.apache.cocoon.components.language.generator.GeneratorSelector"/>

The ServerPagesSelector is the home for all compiled elements, including the sitemap.
The root sitemap has an alias hint called "sitemap".  You can get this instance by using
the following code:


ComponentSelector selector = (ComponentSelector) manager.lookup(Roles.SERVERPAGES);
Sitemap sitemap = (Sitemap) selector.select("sitemap");

Hopefully, once you have the root sitemap, you will be able to get to anything you need
from there.

The hints for the SERVERPAGES selector correspond to the NormalizedName in the
ProgramGenerator component--with the addition of the alias for the root sitemap.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message