You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/04/24 21:22:18 UTC

Re: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ContentAggregator.java

>   - 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