cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <cocoonge...@yahoo.com>
Subject RE: Sample Sitemap.xmap file
Date Thu, 10 Oct 2002 20:17:21 GMT
You are talking about two different things.  The
sitemap Robert sent will only work as a _SUB_sitemap
mounted off a self-sufficient sitemap that defines all
the needed components.  

I've included one below that should get you what you
want.  It will handle static xml as well as xsp, which
should handle most basic usage.  Note also that not
many of the examples will run on this sitemap.  You
could probably get rid of more, but I wanted to leave
at least the default in each component category.  That
long selectors configuration for browser selector is
probably a good candidate if you're not using it.

Geoff Howard

BASIC sitemap.xmap:
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap
xmlns:map="http://apache.org/cocoon/sitemap/1.0">

<!-- =========================== Components
================================ -->
 <map:components>
   <map:generators default="file">
     <map:generator label="content,data"
logger="sitemap.generator.file" name="file"
pool-grow="4" pool-max="32" pool-min="8"
src="org.apache.cocoon.generation.FileGenerator"/>
     <map:generator label="content,data"
logger="sitemap.generator.serverpages"
name="serverpages" pool-grow="2" pool-max="32"
pool-min="4"
src="org.apache.cocoon.generation.ServerPagesGenerator"/>
   </map:generators>

   <map:transformers default="xslt">
     <map:transformer
logger="sitemap.transformer.xslt" name="xslt"
pool-grow="2" pool-max="32" pool-min="8"
src="org.apache.cocoon.transformation.TraxTransformer">
     
<use-request-parameters>false</use-request-parameters>
     
<use-browser-capabilities-db>false</use-browser-capabilities-db>
      <use-deli>false</use-deli>
     </map:transformer>
   </map:transformers>

  <map:readers default="resource">
    <map:reader logger="sitemap.reader.resource"
name="resource" pool-max="32"
src="org.apache.cocoon.reading.ResourceReader"/>
  </map:readers>
  <map:serializers default="html">
    <map:serializer logger="sitemap.serializer.xml"
mime-type="text/xml" name="xml"
src="org.apache.cocoon.serialization.XMLSerializer"/>
    <map:serializer logger="sitemap.serializer.html"
mime-type="text/html" name="html" pool-grow="4"
pool-max="32" pool-min="4"
src="org.apache.cocoon.serialization.HTMLSerializer">
      <buffer-size>1024</buffer-size>
    </map:serializer>
  </map:serializers>

  <map:matchers default="wildcard">
    <map:matcher logger="sitemap.matcher.wildcard"
name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  </map:matchers>

  <map:selectors default="browser">
   <map:selector logger="sitemap.selector.browser"
name="browser"
src="org.apache.cocoon.selection.BrowserSelector">
    <!-- # NOTE: The appearance indicates the search
order. This is very important since
         #       some words may be found in more than
one browser description. (MSIE is
         #       presented as "Mozilla/4.0
(Compatible; MSIE 4.01; ...")
    -->
    <browser name="explorer" useragent="MSIE"/>
    <browser name="pocketexplorer" useragent="MSPIE"/>
    <browser name="handweb" useragent="HandHTTP"/>
    <browser name="avantgo" useragent="AvantGo"/>
    <browser name="imode" useragent="DoCoMo"/>
    <browser name="opera" useragent="Opera"/>
    <browser name="lynx" useragent="Lynx"/>
    <browser name="java" useragent="Java"/>
    <browser name="wap" useragent="Nokia"/>
    <browser name="wap" useragent="UP"/>
    <browser name="wap" useragent="Wapalizer"/>
    <browser name="mozilla5" useragent="Mozilla/5"/>
    <browser name="mozilla5" useragent="Netscape6/"/>
    <browser name="netscape" useragent="Mozilla"/>
   </map:selector>
  </map:selectors>

  <map:actions>
  </map:actions>
 </map:components>

<!-- =========================== Views
=================================== -->
 <map:views>
  <map:view from-label="content" name="content">
   <map:serialize type="xml"/>
  </map:view>
 </map:views>

<!-- =========================== Resources
================================= -->
 <map:resources>
 </map:resources>

<!-- ========================== Action sets
================================ -->
 <map:action-sets>
 </map:action-sets>

<!-- =========================== Pipelines
================================= -->
 <map:pipelines>
   <map:pipeline>
 </map:pipeline>
</map:sitemap><!-- end of file -->

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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