cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Sitemap configuration issues
Date Wed, 12 Jul 2000 13:57:40 GMT
Hi all

For the Sitemap we need to come to a consensus what the most complex and still legal configuration
is for components in the <map:components> section. These configurations are passed as
a tree of
org.apache.avalon.Configuration objects to the components immediately after instantiation
with a
call to their setConfiguration method if they implement the org.apache.avalon.Configurable
interface. And also we need to know what is not allowed or doesn't make sense as for a
configuration syntax. To begin the dicussion I put the following snipped into it. Please make
your
additions, suggestions and comments based on this:

  <map:serializer name="html" 
      src="class:///org.apache.cocoon.serializer.HTMLSerializer">
    <mime-type>text/html</mime-type>
    <doctype-public map:value="-//W3C//DTD HTML 4.0 Transitional//EN"/>
    <doctype-system map:value="http://www.w3.org/TR/REC-html40/loose.dtd"/>
    <preserve-space map:value="true"/>
    <encoding map:value="UTF-8"/>
    <indent>1</indent>
    <colors>
      <foreground map:value="white"/>
      <borders>
        <left map:value="blue"/>
        <right>red</right>
      </borders>
      <text>black</text>
      <lines>
        <left map:value="cyan"/>
        <right>orange</right>
      </lines>
      <background>green</background>
    </colors>
    <map:param name="foo" value="bar"/>
    <map:param name="baz">foobar</map:param>
    <line-width map:value="120"/>
  </map:serializer>

Stefano also stated in the sitemap-working-draft.xmap that:

  The syntax
    
    <xxx map:value="yyy">
      
  is completely equivalent to
    
    <xxx>yyy</xxx>
      
  throughout the entire sitemap.

And I will state the following for discussion:

Attributes at the component element are reserved for exclusive use by the Sitemap engine and
are
not passed to the component as configuration attributes.

This is correct:
  <map:serializer type="html" 
      src="class:///org.apache.cocoon.serializer.HTMLSerializer"/>

because type= and src= are attribute recognized by the Sitemap engine.

This doesn't make sence because the component will not get the mime-type attribute:
  <map:serializer type="html" mime-type="text/html"
      src="class:///org.apache.cocoon.serializer.HTMLSerializer"/>

instead it has to be written as:
  <map:serializer type="html" 
      src="class:///org.apache.cocoon.serializer.HTMLSerializer"/>
    <mime-type map:value="text/html"/>
  </map:serializer>

or
  <map:serializer type="html" mime-type="text/html"
      src="class:///org.apache.cocoon.serializer.HTMLSerializer"/>
    <mime-type>text/html</mime-type>
  </map:serializer>

I will also state that the following as illegal:
  <map:serializer type="html" 
      src="class:///org.apache.cocoon.serializer.HTMLSerializer"/>
    <mime-type>text/html</mime-type>
    <map:param name="foo" value="bar"/>
    <map:param name="baz">foobar</map:param>
  </map:serializer>

simply because we don't need a construct like <map:param .../>

Please, all, help to reach a common sense concerning component configuration at init time.

I will soon start another thread which enters the configuration of component at run time (that
is
during request processing).

Giacomo

=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail  Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message